|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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, selection, selectionListeners |
Constructor Summary | |
GraphicalViewerImpl()
Constructs a GraphicalViewerImpl. |
Method Summary | |
Control |
createControl(Composite composite)
Optionally creates the default Control using
the default style. |
protected void |
createDefaultRoot()
Creates the default root editpart. |
protected LightweightSystem |
createLightweightSystem()
Creates the lightweight system used to host figures. |
Handle |
findHandleAt(Point p)
Returns the Handle at the specified Point. |
EditPart |
findObjectAtExcluding(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 LightweightSystem |
getLightweightSystem()
Returns the lightweight system. |
protected 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 |
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 ExposeHelper s. |
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(IFigure figure)
Sets the lightweight system's root figure. |
void |
setRouteEventsToEditDomain(boolean value)
Turns on/off the routing of events directly to the Editor. |
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, getSelection, removeSelectionChangedListener, setSelection |
Constructor Detail |
public GraphicalViewerImpl()
Method Detail |
public Control createControl(Composite composite)
EditPartViewer
Control
using
the default style. The Control can also be created externally and then set into the
Viewer.
createControl
in interface EditPartViewer
createControl
in class AbstractEditPartViewer
composite
- the parent in which create the SWT Control
EditPartViewer.createControl(org.eclipse.swt.widgets.Composite)
protected void createDefaultRoot()
protected LightweightSystem createLightweightSystem()
protected void handleDispose(DisposeEvent e)
AbstractEditPartViewer
Control
is disposed. Subclasses may extend this
method to perform additional cleanup.
handleDispose
in class AbstractEditPartViewer
e
- the disposeeventAbstractEditPartViewer.handleDispose(org.eclipse.swt.events.DisposeEvent)
public Handle findHandleAt(Point p)
GraphicalViewer
Handle
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 GraphicalViewer
p
- the location relative to the Control's client area
null
or a HandleGraphicalViewer.findHandleAt(org.eclipse.draw2d.geometry.Point)
public EditPart findObjectAtExcluding(Point pt, Collection exclude, EditPartViewer.Conditional condition)
EditPartViewer
null
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 EditPartViewer
pt
- 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 EditPartViewer
flush
in class AbstractEditPartViewer
EditPartViewer.flush()
protected DomainEventDispatcher getEventDispatcher()
protected LayerManager getLayerManager()
protected LightweightSystem getLightweightSystem()
protected IFigure getRootFigure()
protected void hookDropTarget()
hookDropTarget
in class AbstractEditPartViewer
AbstractEditPartViewer.hookDropTarget()
protected void hookControl()
hookControl
in class AbstractEditPartViewer
AbstractEditPartViewer.hookControl()
public void registerAccessibleEditPart(AccessibleEditPart acc)
registerAccessibleEditPart
in interface EditPartViewer
registerAccessibleEditPart
in class AbstractEditPartViewer
acc
- the accessiblepublic void reveal(EditPart part)
ExposeHelper
s. 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 EditPartViewer
reveal
in class AbstractEditPartViewer
part
- the EditPart to revealEditPartViewer.reveal(EditPart)
public void setContextMenu(MenuManager contextMenu)
setContextMenu
in interface EditPartViewer
setContextMenu
in class AbstractEditPartViewer
contextMenu
- the ContextMenuProvider
EditPartViewer.setContextMenu(org.eclipse.jface.action.MenuManager)
public void setCursor(Cursor newCursor)
EditPartViewer
Control
. This method should only be
called by Tools
. null
can be used to indicate that the
default cursor should be restored.
setCursor
in interface EditPartViewer
setCursor
in class AbstractEditPartViewer
newCursor
- null
or a CursorEditPartViewer.setCursor(org.eclipse.swt.graphics.Cursor)
protected void setDragSource(DragSource source)
setDragSource
in class AbstractEditPartViewer
source
- null
or a drag sourceAbstractEditPartViewer.setDragSource(org.eclipse.swt.dnd.DragSource)
public void setEditDomain(EditDomain domain)
EditPartViewer
EditDomain
for this viewer. The Viewer will route all mouse and
keyboard events to the EditDomain.
setEditDomain
in interface EditPartViewer
setEditDomain
in class AbstractEditPartViewer
domain
- The EditDomainEditPartViewer.setEditDomain(org.eclipse.gef.EditDomain)
public void setRootEditPart(RootEditPart editpart)
EditPartViewer
setRootEditPart
in interface EditPartViewer
setRootEditPart
in class AbstractEditPartViewer
editpart
- the RootEditPartEditPartViewer.setRootEditPart(org.eclipse.gef.RootEditPart)
protected void setRootFigure(IFigure figure)
figure
- the root figurepublic void setRouteEventsToEditDomain(boolean value)
EditPartViewer
EditDomain
rather than
handled in the default way.
setRouteEventsToEditDomain
in interface EditPartViewer
setRouteEventsToEditDomain
in class AbstractEditPartViewer
value
- true if the viewer should route events to the EditDomainEditPartViewer.setRouteEventsToEditDomain(boolean)
public void unregisterAccessibleEditPart(AccessibleEditPart acc)
EditPartViewer
unregisterAccessibleEditPart
in interface EditPartViewer
unregisterAccessibleEditPart
in class AbstractEditPartViewer
acc
- the accessible partEditPartViewer.unregisterAccessibleEditPart(org.eclipse.gef.AccessibleEditPart)
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |