Package org.eclipse.ui.views.framelist

## Class TreeFrame

- java.lang.Object
- - org.eclipse.ui.views.framelist.Frame
  - - org.eclipse.ui.views.framelist.TreeFrame

    public class TreeFrame
    extends Frame

Frame for tree viewers. This capture the viewer's input element, selection, and expanded elements.

### Constructor Summary

Constructors
`TreeFrame​(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

All Methods Instance Methods Concrete Methods
`Object[]` `getExpandedElements()` Returns the expanded elements.
`Object` `getInput()` Returns the input element.
`ISelection` `getSelection()` Returns the selection.
`AbstractTreeViewer` `getViewer()` Returns the tree viewer.
`void` `restoreState​(IMemento memento)` Restore the frame from the specified memento.
`void` `saveState​(IMemento memento)` Save the frame state in the given memento.
`void` `setExpandedElements​(Object[] expandedElements)` Sets the expanded elements.
`void` `setInput​(Object input)` 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TreeFrame

    public TreeFrame​(AbstractTreeViewer viewer)

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

    public TreeFrame​(AbstractTreeViewer viewer,
                     Object input)

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 viewer
  `input` - the input element

### Method Detail

#### getExpandedElements

    public Object[] getExpandedElements()

Returns the expanded elements.

Returns:
  the expanded elements

#### getInput

    public Object getInput()

Returns the input element.

Returns:
  the input element

#### getSelection

    public ISelection getSelection()

Returns the selection.

Returns:
  the selection

#### getViewer

    public AbstractTreeViewer getViewer()

Returns the tree viewer.

Returns:
  the tree viewer

#### restoreState

    public void restoreState​(IMemento memento)

Restore the frame from the specified memento.

Parameters:
  `memento` - memento to restore frame from

#### saveState

    public void saveState​(IMemento memento)

Save the frame state in the given memento.

Parameters:
  `memento` - memento to persist the frame state in.

#### setInput

    public void setInput​(Object input)

Sets the input element.

Parameters:
  `input` - the input element

#### setExpandedElements

    public void setExpandedElements​(Object[] expandedElements)

Sets the expanded elements.

Parameters:
  `expandedElements` - the expanded elements

#### setSelection

    public void setSelection​(ISelection selection)

Sets the selection.

Parameters:
  `selection` - the selection