Package org.eclipse.ui.views.framelist
Class TreeFrame
java.lang.Object
org.eclipse.ui.views.framelist.Frame
org.eclipse.ui.views.framelist.TreeFrame
Frame for tree viewers. This capture the viewer's input element, selection,
and expanded elements.
-
Constructor Summary
ConstructorDescriptionTreeFrame
(AbstractTreeViewer viewer) Constructs a frame for the specified tree viewer.TreeFrame
(AbstractTreeViewer viewer, Object input) Constructs a frame for the specified tree viewer. -
Method Summary
Modifier and TypeMethodDescriptionObject[]
Returns the expanded elements.getInput()
Returns the input element.Returns the selection.Returns the tree viewer.void
restoreState
(IMemento memento) Restore the frame from the specified memento.void
Save the frame state in the given memento.void
setExpandedElements
(Object[] expandedElements) Sets the expanded elements.void
Sets the input element.void
setSelection
(ISelection selection) Sets the selection.Methods inherited from class org.eclipse.ui.views.framelist.Frame
getIndex, getName, getParent, getToolTipText, setIndex, setName, setParent, setToolTipText
-
Constructor Details
-
TreeFrame
Constructs a frame for the specified tree viewer. The frame's input, name and tool tip text are not set.- Parameters:
viewer
- the tree viewer
-
TreeFrame
Constructs a frame for the specified tree viewer. The frame's input element is set to the specified input element. The frame's name and tool tip text are set to the text for the input element, as provided by the viewer's label provider.- Parameters:
viewer
- the tree viewerinput
- the input element
-
-
Method Details
-
getExpandedElements
Returns the expanded elements.- Returns:
- the expanded elements
-
getInput
Returns the input element.- Returns:
- the input element
-
getSelection
Returns the selection.- Returns:
- the selection
-
getViewer
Returns the tree viewer.- Returns:
- the tree viewer
-
restoreState
Restore the frame from the specified memento.- Parameters:
memento
- memento to restore frame from
-
saveState
Save the frame state in the given memento.- Parameters:
memento
- memento to persist the frame state in.
-
setInput
Sets the input element.- Parameters:
input
- the input element
-
setExpandedElements
Sets the expanded elements.- Parameters:
expandedElements
- the expanded elements
-
setSelection
Sets the selection.- Parameters:
selection
- the selection
-