|
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.EditDomain
The collective state of a GEF "application", loosely defined by a CommandStack,
one or more EditPartViewers, and the active Tool. An EditDomain is usually tied with an
Eclipse IEditorPart
). However, the distinction
between EditorPart and EditDomain was made to allow for much flexible use of the
Graphical Editing Framework.
Constructor Summary | |
EditDomain()
Constructs an EditDomain and loads the default tool. |
Method Summary | |
void |
addViewer(EditPartViewer viewer)
Adds an EditPartViewer into the EditDomain. |
void |
focusGained(FocusEvent event,
EditPartViewer viewer)
Called when one of the EditDomain's Viewers receives keyboard focus. |
void |
focusLost(FocusEvent event,
EditPartViewer viewer)
Called when one of the EditDomain's Viewers is losing keyboard focus. |
Tool |
getActiveTool()
Returns the active Tool |
CommandStack |
getCommandStack()
Returns the CommandStack. |
Tool |
getDefaultTool()
Returns the default tool for this edit domain. |
void |
keyDown(KeyEvent keyEvent,
EditPartViewer viewer)
Called when a key is pressed on a Viewer. |
void |
keyUp(KeyEvent keyEvent,
EditPartViewer viewer)
Called when a key is released on a Viewer. |
void |
loadDefaultTool()
Loads the default Tool. |
void |
mouseDoubleClick(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been double-clicked on a Viewer. |
void |
mouseDown(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been pressed on a Viewer. |
void |
mouseDrag(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse has been dragged within a Viewer. |
void |
mouseHover(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse has hovered on a Viewer. |
void |
mouseMove(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse has been moved on a Viewer. |
void |
mouseUp(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been released on a Viewer. |
void |
nativeDragFinished(DragSourceEvent event,
EditPartViewer viewer)
Called when a native drag has finished on a Viewer. |
void |
nativeDragStarted(DragSourceEvent event,
EditPartViewer viewer)
Called when a native drag has started on a Viewer. |
void |
removeViewer(EditPartViewer viewer)
Removes a previously added viewer from the EditDomain. |
void |
setActiveTool(Tool tool)
Sets the active Tool for this EditDomain. |
void |
setCommandStack(CommandStack stack)
Sets the CommandStack . |
void |
setDefaultTool(Tool tool)
Sets the default Tool, which is used if the Palette does not provide a default |
void |
setPaletteRoot(PaletteRoot root)
Sets the PalatteRoot for this EditDomain. |
void |
setPaletteViewer(PaletteViewer palette)
Sets the PaletteViewer for this EditDomain |
void |
viewerEntered(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse enters a Viewer. |
void |
viewerExited(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse exits a Viewer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EditDomain()
Method Detail |
public void addViewer(EditPartViewer viewer)
WorkbenchPart
of some form, such as the IEditorPart or
an IViewPart.
viewer
- The EditPartViewerpublic void focusGained(FocusEvent event, EditPartViewer viewer)
event
- The SWT focus eventviewer
- the Viewer that received the event.public void focusLost(FocusEvent event, EditPartViewer viewer)
event
- The SWT focus eventviewer
- the Viewer that received the event.public Tool getActiveTool()
public CommandStack getCommandStack()
public Tool getDefaultTool()
SelectionTool
unless specifically replaced using setDefaultTool(Tool)
.
public void keyDown(KeyEvent keyEvent, EditPartViewer viewer)
keyEvent
- The SWT keyboard eventviewer
- The source of the event.public void keyUp(KeyEvent keyEvent, EditPartViewer viewer)
keyEvent
- The SWT keyboard eventviewer
- the source of the event.public void loadDefaultTool()
SelectionTool
.
public void mouseDoubleClick(MouseEvent mouseEvent, EditPartViewer viewer)
mouseEvent
- The SWT mouse eventviewer
- The source of the event.public void mouseDown(MouseEvent mouseEvent, EditPartViewer viewer)
mouseEvent
- The SWT mouse eventviewer
- The source of the event.public void mouseDrag(MouseEvent mouseEvent, EditPartViewer viewer)
mouseEvent
- The SWT mouse eventviewer
- The source of the event.public void mouseHover(MouseEvent mouseEvent, EditPartViewer viewer)
mouseEvent
- The SWT mouse eventviewer
- The source of the event.public void mouseMove(MouseEvent mouseEvent, EditPartViewer viewer)
mouseEvent
- The SWT mouse eventviewer
- The viewer that the mouse event is over.public void mouseUp(MouseEvent mouseEvent, EditPartViewer viewer)
mouseEvent
- The SWT mouse eventviewer
- The source of the event.public void nativeDragFinished(DragSourceEvent event, EditPartViewer viewer)
event
- The DragSourceEventviewer
- The viewer where the drag finishedpublic void nativeDragStarted(DragSourceEvent event, EditPartViewer viewer)
event
- The DragSourceEventviewer
- The viewer where the drag startedpublic void removeViewer(EditPartViewer viewer)
viewer
- the Viewer being removedpublic void setCommandStack(CommandStack stack)
CommandStack
.
stack
- the CommandStackpublic void setDefaultTool(Tool tool)
tool
- null
or a Toolpublic void setPaletteRoot(PaletteRoot root)
root
- the palette's rootpublic void setPaletteViewer(PaletteViewer palette)
PaletteViewer
for this EditDomain
palette
- the PaletteViewerpublic void setActiveTool(Tool tool)
tool
- the Toolpublic void viewerEntered(MouseEvent mouseEvent, EditPartViewer viewer)
mouseEvent
- the SWT mouse eventviewer
- the Viewer being enteredpublic void viewerExited(MouseEvent mouseEvent, EditPartViewer viewer)
mouseEvent
- the SWT mouse eventviewer
- the Viewer being exited
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |