Package 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,- ISelectionProvider
An EditPartViewer implementation based on a
 
Tree.- 
Nested Class SummaryNested classes/interfaces inherited from interface org.eclipse.gef.EditPartViewerEditPartViewer.Conditional
- 
Field SummaryFields inherited from class org.eclipse.gef.ui.parts.AbstractEditPartViewerconstantSelection, focusPart, selection, selectionListeners
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncreateControl(Composite parent) Creates the default tree and sets it as the control.findObjectAtExcluding(Point pt, Collection exclude, EditPartViewer.Conditional condition) Returnsnullor theEditPartat the specified location, using the given exclusion set and conditional.protected voidFires selection changed to the registered listeners at the time called.Returnsnullor the SWTControlfor this viewer.protected void"Hooks up" a Control, i.e. sets it as the control for the RootTreeEditPart, adds necessary listener for proper operation, etc.voidReveals the given EditPart if it is not visible.protected voidUnhooks a control so that it can be reset.Methods inherited from class org.eclipse.gef.ui.parts.AbstractEditPartVieweraddDragSourceListener, addDragSourceListener, addDropTargetListener, addDropTargetListener, addPropertyChangeListener, addSelectionChangedListener, appendSelection, deselect, deselectAll, findObjectAt, findObjectAtExcluding, flush, getContents, getContextMenu, getDelegatingDragAdapter, getDelegatingDropAdapter, getDragSource, getDropTarget, getEditDomain, getEditPartFactory, getEditPartForModel, getEditPartRegistry, getFocusEditPart, getKeyHandler, getProperty, getResourceManager, getRootEditPart, getSelectedEditParts, getSelection, getSelectionManager, getVisualPartMap, handleDispose, hookDragSource, hookDropTarget, init, primGetSelectedEditParts, refreshDragSourceAdapter, refreshDropTargetAdapter, registerAccessibleEditPart, removeDragSourceListener, removeDragSourceListener, removeDropTargetListener, removeDropTargetListener, removePropertyChangeListener, removeSelectionChangedListener, select, setContents, setContents, setContextMenu, setControl, setCursor, setDragSource, setDropTarget, setEditDomain, setEditPartFactory, setFocus, setKeyHandler, setProperty, setRootEditPart, setRouteEventsToEditDomain, setSelection, setSelectionManager, unregisterAccessibleEditPart
- 
Constructor Details- 
TreeViewerpublic TreeViewer()Constructs a TreeViewer with the default root editpart.
 
- 
- 
Method Details- 
createControlCreates the default tree and sets it as the control. The default styles will show scrollbars as needed, and allows for multiple selection.- Specified by:
- createControlin interface- EditPartViewer
- Specified by:
- createControlin class- AbstractEditPartViewer
- Parameters:
- parent- The parent for the Tree
- Returns:
- the control
- See Also:
 
- 
findObjectAtExcludingpublic EditPart findObjectAtExcluding(Point pt, Collection exclude, EditPartViewer.Conditional condition) Description copied from interface:EditPartViewerReturnsnullor theEditPartat the specified location, using the given exclusion set and conditional. This method behaves similarly toEditPartViewer.findObjectAt(Point).- Parameters:
- pt- The mouse location
- exclude- The set of IFigures to be excluded
- condition- the Conditional used to evaluate a potential hit
- Returns:
- nullor an EditPart
- See Also:
 
- 
fireSelectionChangedprotected void fireSelectionChanged()Description copied from class:AbstractEditPartViewerFires selection changed to the registered listeners at the time called.- Overrides:
- fireSelectionChangedin class- AbstractEditPartViewer
- See Also:
 
- 
getControlDescription copied from interface:EditPartViewerReturnsnullor the SWTControlfor this viewer. The control is either set explicitly or can be created by the viewer.- Specified by:
- getControlin interface- EditPartViewer
- Overrides:
- getControlin class- AbstractEditPartViewer
- Returns:
- the SWT Control
- Since:
- 3.16
- See Also:
 
- 
hookControlprotected void hookControl()"Hooks up" a Control, i.e. sets it as the control for the RootTreeEditPart, adds necessary listener for proper operation, etc.- Overrides:
- hookControlin class- AbstractEditPartViewer
- See Also:
 
- 
revealDescription copied from interface:EditPartViewerReveals the given EditPart if it is not visible.- Specified by:
- revealin interface- EditPartViewer
- Overrides:
- revealin class- AbstractEditPartViewer
- Parameters:
- part- the EditPart to reveal
- See Also:
 
- 
unhookControlprotected 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:
- unhookControlin class- AbstractEditPartViewer
 
 
-