org.eclipse.gef.ui.parts
Class TreeViewer
java.lang.Object
|
+--org.eclipse.gef.ui.parts.AbstractEditPartViewer
|
+--org.eclipse.gef.ui.parts.TreeViewer
- All Implemented Interfaces:
- EditPartViewer, IMenuListener, ISelectionProvider
- public class TreeViewer
- extends AbstractEditPartViewer
| Methods inherited from class org.eclipse.gef.ui.parts.AbstractEditPartViewer |
addDragSourceListener, addDropTargetListener, addSelectionChangedListener, appendSelection, deselect, deselectAll, dispose, expose, flush, getContents, getContextMenuProvider, getControl, getDelegatingDragAdapter, getDelegatingDropAdapter, getDragSource, getDropTarget, getEditDomain, getEditPartFactory, getEditPartRegistry, getFocusEditPart, getKeyHandler, getRootEditPart, getSelectedEditParts, getSelection, getVisualPartMap, hookDropTarget, init, menuAboutToShow, primGetSelectedEditParts, refreshDragSourceAdapter, refreshDropTargetAdapter, registerAccessibleEditPart, removeDragSourceListener, removeDropTargetListener, removeSelectionChangedListener, select, setContents, setContents, setContextMenuProvider, setControl, setCursor, setDropTarget, setEditDomain, setEditPartFactory, setFocus, setKeyHandler, setRootEditPart, setRouteEventsToEditor, setSelection, unregisterAccessibleEditPart |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeViewer
public TreeViewer()
- The constructor. It sets up the default root edit part.
The setEditor() and either one of createControl() or setControl()
methods should be called to completely set up the GEFTreeViewer.
createControl
public Control createControl(Composite parent)
- Creates the default tree and sets it as the control.
- Overrides:
createControl in class AbstractEditPartViewer
- Parameters:
parent - The parent Composite for the Control (tree).
findObjectAt
public EditPart findObjectAt(Point pt)
- Returns the
Data of the TreeItem at the given point.
Returns null if the Point is not on the Control (Tree). Returns
the data of the Tree if there is no TreeItem at the given point.
- Parameters:
pt - The location at which to look for a TreeItem
findObjectAtExcluding
public EditPart findObjectAtExcluding(Point pt,
Collection exclude)
- Returns the
Data of the TreeItem at the given point.
Returns null if the Point is not on the Control (Tree). Returns
the data of the Tree if there is no TreeItem at the given point.
At this point, the collection is ignored. Sub-classes can override
this method to respect the request to exclude the Objects in the
given Collection.
- Parameters:
pt - The location at which to look for a TreeItemexclude - The collection of EditParts to be excluded.
NOTE: The current implementation ignores this Collection.
fireSelectionChanged
protected void fireSelectionChanged()
- Overrides:
fireSelectionChanged in class AbstractEditPartViewer
hookControl
protected void hookControl()
- "Hooks up" a Control, i.e. sets it as the control for the RootTreeEditPart,
adds necessary listener for proper operation, etc.
- Overrides:
hookControl in class AbstractEditPartViewer
hookDragSource
protected void hookDragSource()
- Overrides:
hookDragSource in class AbstractEditPartViewer
unhookControl
protected void unhookControl()
- Unhooks a control so that it can be reset. This method deactivates
the contents, removes the Control as being the Control of the
RootTreeEditPart, etc. It does not remove the listeners because
it is causing errors, although that would be a desirable outcome.
- Overrides:
unhookControl in class AbstractEditPartViewer