|
Eclipse GEF 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.ui.parts.AbstractEditPartViewer
org.eclipse.gef.ui.parts.GraphicalViewerImpl
An EditPartViewer implementation based on Figures.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.gef.EditPartViewer |
EditPartViewer.Conditional |
| Field Summary |
| Fields inherited from class org.eclipse.gef.ui.parts.AbstractEditPartViewer |
constantSelection, focusPart, selection, selectionListeners |
| Constructor Summary | |
GraphicalViewerImpl()
Constructs a GraphicalViewerImpl with the default root editpart. |
|
| Method Summary | |
Control |
createControl(Composite composite)
Optionally creates the default Control using
the default style. |
protected void |
createDefaultRoot()
Creates the default root editpart. |
protected org.eclipse.draw2d.LightweightSystem |
createLightweightSystem()
Creates the lightweight system used to host figures. |
Handle |
findHandleAt(org.eclipse.draw2d.geometry.Point p)
Returns the Handle at the specified Point. |
EditPart |
findObjectAtExcluding(org.eclipse.draw2d.geometry.Point pt,
Collection exclude,
EditPartViewer.Conditional condition)
Returns null or the EditPart at the specified location,
using the given exclusion set and conditional. |
void |
flush()
Flushes and pending layouts and paints in the lightweight system. |
protected DomainEventDispatcher |
getEventDispatcher()
Deprecated. This method should not be called by subclasses |
protected LayerManager |
getLayerManager()
Convenience method for finding the layer manager. |
protected org.eclipse.draw2d.LightweightSystem |
getLightweightSystem()
Returns the lightweight system. |
protected org.eclipse.draw2d.IFigure |
getRootFigure()
Deprecated. There is no reason to call this method $TODO delete this method |
protected void |
handleDispose(DisposeEvent e)
Called if and when the Control is disposed. |
protected void |
handleFocusGained(FocusEvent fe)
This method is invoked when this viewer's control gains focus. |
protected void |
handleFocusLost(FocusEvent fe)
This method is invoked when this viewer's control loses focus. |
protected void |
hookControl()
Extended to tell the lightweight system what its control is. |
protected void |
hookDropTarget()
Extended to flush paints during drop callbacks. |
void |
registerAccessibleEditPart(AccessibleEditPart acc)
Registers the accessible editpart with the event dispatcher. |
void |
reveal(EditPart part)
Reveals the specified editpart by using ExposeHelpers. |
void |
setContextMenu(MenuManager contextMenu)
Extended implementation to flush the viewer as the context menu is shown. |
void |
setCursor(Cursor newCursor)
Sets the cursor for the viewer's Control. |
protected void |
setDragSource(DragSource source)
Extends the drag source to handle figures which handle MouseDown events, thereby aborting any DragDetect callbacks. |
void |
setEditDomain(EditDomain domain)
Sets the EditDomain for this viewer. |
void |
setRootEditPart(RootEditPart editpart)
Sets the root of this viewer. |
protected void |
setRootFigure(org.eclipse.draw2d.IFigure figure)
Sets the lightweight system's root figure. |
void |
setRouteEventsToEditDomain(boolean value)
Turns on/off the routing of events directly to the Editor. |
protected void |
unhookControl()
Called when the control is being set to null, but before it is null. |
void |
unregisterAccessibleEditPart(AccessibleEditPart acc)
Used for accessibility purposes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider |
addSelectionChangedListener, removeSelectionChangedListener, setSelection |
| Constructor Detail |
public GraphicalViewerImpl()
| Method Detail |
public Control createControl(Composite composite)
EditPartViewerControl using
the default style. The Control can also be created externally and then set into the
Viewer.
createControl in interface EditPartViewercreateControl in class AbstractEditPartViewerEditPartViewer.createControl(org.eclipse.swt.widgets.Composite)protected void createDefaultRoot()
protected org.eclipse.draw2d.LightweightSystem createLightweightSystem()
protected void handleDispose(DisposeEvent e)
AbstractEditPartViewerControl is disposed. Subclasses may extend this
method to perform additional cleanup.
handleDispose in class AbstractEditPartViewere - the disposeeventAbstractEditPartViewer.handleDispose(org.eclipse.swt.events.DisposeEvent)protected void handleFocusGained(FocusEvent fe)
focusPart, if there is one.
fe - the focusEvent received by this viewer's controlprotected void handleFocusLost(FocusEvent fe)
focusPart, if there is one.
fe - the focusEvent received by this viewer's controlpublic Handle findHandleAt(org.eclipse.draw2d.geometry.Point p)
GraphicalViewerHandle at the specified Point. Returns null if no
handle exists at the given Point. The specified point should be relative to the
client area for this
Viewer's Control.
findHandleAt in interface GraphicalViewerp - the location relative to the Control's client area
null or a HandleGraphicalViewer.findHandleAt(org.eclipse.draw2d.geometry.Point)
public EditPart findObjectAtExcluding(org.eclipse.draw2d.geometry.Point pt,
Collection exclude,
EditPartViewer.Conditional condition)
EditPartViewernull or the EditPart at the specified location,
using the given exclusion set and conditional. This method behaves similarly to EditPartViewer.findObjectAt(Point).
findObjectAtExcluding in interface EditPartViewerpt - The mouse locationexclude - The set of EditParts to be excludedcondition - the Conditional used to evaluate a potential hit
null or an EditPartEditPartViewer.findObjectAtExcluding(Point, Collection, EditPartViewer.Conditional)public void flush()
flush in interface EditPartViewerflush in class AbstractEditPartViewerEditPartViewer.flush()protected DomainEventDispatcher getEventDispatcher()
protected LayerManager getLayerManager()
protected org.eclipse.draw2d.LightweightSystem getLightweightSystem()
protected org.eclipse.draw2d.IFigure getRootFigure()
protected void hookDropTarget()
hookDropTarget in class AbstractEditPartViewerAbstractEditPartViewer.hookDropTarget()protected void hookControl()
hookControl in class AbstractEditPartViewerAbstractEditPartViewer.hookControl()public void registerAccessibleEditPart(AccessibleEditPart acc)
registerAccessibleEditPart in interface EditPartViewerregisterAccessibleEditPart in class AbstractEditPartVieweracc - the accessibleEditPartViewer.registerAccessibleEditPart(AccessibleEditPart)public void reveal(EditPart part)
ExposeHelpers. A bottom-up scan through
the parent-chain is performed, looking for expose helpers along the way, and asking
them to expose the given editpart.
reveal in interface EditPartViewerreveal in class AbstractEditPartViewerEditPartViewer.reveal(EditPart)public void setContextMenu(MenuManager contextMenu)
setContextMenu in interface EditPartViewersetContextMenu in class AbstractEditPartViewerEditPartViewer.setContextMenu(org.eclipse.jface.action.MenuManager)public void setCursor(Cursor newCursor)
EditPartViewerControl. This method should only be
called by Tools. null can be used to indicate that the
default cursor should be restored.
setCursor in interface EditPartViewersetCursor in class AbstractEditPartViewerEditPartViewer.setCursor(org.eclipse.swt.graphics.Cursor)protected void setDragSource(DragSource source)
setDragSource in class AbstractEditPartViewersource - null or a drag sourceAbstractEditPartViewer.setDragSource(org.eclipse.swt.dnd.DragSource)public void setEditDomain(EditDomain domain)
EditPartViewerEditDomain for this viewer. The Viewer will route all mouse and
keyboard events to the EditDomain.
setEditDomain in interface EditPartViewersetEditDomain in class AbstractEditPartViewerEditPartViewer.setEditDomain(org.eclipse.gef.EditDomain)public void setRootEditPart(RootEditPart editpart)
EditPartViewer
setRootEditPart in interface EditPartViewersetRootEditPart in class AbstractEditPartViewerEditPartViewer.setRootEditPart(org.eclipse.gef.RootEditPart)protected void setRootFigure(org.eclipse.draw2d.IFigure figure)
figure - the root figurepublic void setRouteEventsToEditDomain(boolean value)
EditPartViewerEditDomain rather than
handled in the default way.
setRouteEventsToEditDomain in interface EditPartViewersetRouteEventsToEditDomain in class AbstractEditPartViewerEditPartViewer.setRouteEventsToEditDomain(boolean)protected void unhookControl()
AbstractEditPartViewernull, but before it is null.
unhookControl in class AbstractEditPartViewerAbstractEditPartViewer.unhookControl()public void unregisterAccessibleEditPart(AccessibleEditPart acc)
EditPartViewer
unregisterAccessibleEditPart in interface EditPartViewerunregisterAccessibleEditPart in class AbstractEditPartViewerEditPartViewer.unregisterAccessibleEditPart(org.eclipse.gef.AccessibleEditPart)
|
Eclipse GEF 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||