|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.eclipse.gef.DefaultEditDomain
A default implementation of the EditDomain interface. This implementation will create a CommandStack by default. A SelectionTool will be used if no Palette or Tool is set. Users of this class must provide one or more EditPartViewers.
| Constructor Summary | |
DefaultEditDomain(IEditorPart editorPart)
Creates a DefaultEditDomain for the given IEditorPart |
|
| Method Summary | |
void |
addViewer(EditPartViewer viewer)
Adds a new viewer to the editor. |
protected CommandStack |
createCommandStack()
Creates the default command Stack |
void |
focusGained(FocusEvent event,
EditPartViewer viewer)
Called when a viewer that the editor controls has gained focus. |
void |
focusLost(FocusEvent event,
EditPartViewer viewer)
Called when a viewer that the editor controls has lost focus. |
Tool |
getActiveTool()
Return the current tool for the editor. |
CommandStack |
getCommandStack()
Returns the command stack of this Editor. |
Tool |
getDefaultTool()
Gets the default tool for this Editor. |
IEditorPart |
getEditorPart()
|
protected void |
init()
|
void |
keyDown(KeyEvent keyEvent,
EditPartViewer viewer)
Called when a key is pressed within a viewer that the editor controls. |
void |
keyUp(KeyEvent keyEvent,
EditPartViewer viewer)
Called when a key is pressed within a viewer that the editor controls. |
void |
loadDefaultTool()
Sets the current tool to the default tool. |
void |
mouseDoubleClick(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been double clicked over a viewer that the editor controls. |
void |
mouseDown(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been pressed over a viewer that the editor controls. |
void |
mouseDrag(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been dragged over a viewer that the editor controls. |
void |
mouseHover(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been dragged over a viewer that the editor controls. |
void |
mouseMove(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been moved over a viewer that the editor controls. |
void |
mouseUp(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse button has been released over a viewer that the editor controls. |
void |
removeViewer(EditPartViewer viewer)
Removes an already added viewer from the editor. |
void |
setCommandStack(CommandStack stack)
Sets the command stack of this Editor with the input stack given. |
void |
setDefaultTool(Tool tool)
Sets the default tool, which is used if the PaletteRoot has no default entry. |
protected void |
setEditorPart(IEditorPart editorPart)
|
void |
setPaletteRoot(PaletteRoot root)
Called to set the palette model for this Editor. |
void |
setPaletteViewer(PaletteViewer palette)
Sets the palette viewer to be used by the editor. |
void |
setTool(Tool newTool)
Set the current tool for the editor. |
void |
viewerEntered(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse has entered a viewer that the editor controls. |
void |
viewerExited(MouseEvent mouseEvent,
EditPartViewer viewer)
Called when the mouse has exited a viewer that the editor controls. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultEditDomain(IEditorPart editorPart)
| Method Detail |
public void addViewer(EditPartViewer viewer)
addViewer in interface EditDomainviewer - The viewer to addprotected CommandStack createCommandStack()
public void focusGained(FocusEvent event,
EditPartViewer viewer)
EditDomainfocusGained in interface EditDomainEditDomain.focusGained(FocusEvent, EditPartViewer)
public void focusLost(FocusEvent event,
EditPartViewer viewer)
EditDomainfocusLost in interface EditDomainEditDomain.focusLost(FocusEvent, EditPartViewer)public Tool getActiveTool()
getActiveTool in interface EditDomainpublic CommandStack getCommandStack()
getCommandStack in interface EditDomainpublic Tool getDefaultTool()
public IEditorPart getEditorPart()
protected void init()
public void keyDown(KeyEvent keyEvent,
EditPartViewer viewer)
keyDown in interface EditDomainkeyEvent - Event representing the key press.viewer - Viewer where the key was pressed.
public void keyUp(KeyEvent keyEvent,
EditPartViewer viewer)
keyUp in interface EditDomainkeyEvent - Event representing the key press.viewer - Viewer where the key was pressed.public void loadDefaultTool()
loadDefaultTool in interface EditDomain
public void mouseDoubleClick(MouseEvent mouseEvent,
EditPartViewer viewer)
mouseDoubleClick in interface EditDomainmouseEvent - Event representing the mouse double-click.viewer - Viewer where the mouse was double-clicked.
public void mouseDown(MouseEvent mouseEvent,
EditPartViewer viewer)
mouseDown in interface EditDomainmouseEvent - Event representing the mouse press down.viewer - Viewer where the mouse was pressed.
public void mouseDrag(MouseEvent mouseEvent,
EditPartViewer viewer)
mouseDrag in interface EditDomainmouseEvent - Event representing the mouse drag.viewer - Viewer where the mouse was dragged.
public void mouseHover(MouseEvent mouseEvent,
EditPartViewer viewer)
mouseHover in interface EditDomainmouseEvent - Event representing the mouse drag.viewer - Viewer where the mouse was dragged.
public void mouseMove(MouseEvent mouseEvent,
EditPartViewer viewer)
mouseMove in interface EditDomainmouseEvent - Event representing the mouse move.viewer - Viewer where the mouse was moved.
public void mouseUp(MouseEvent mouseEvent,
EditPartViewer viewer)
mouseUp in interface EditDomainmouseEvent - Event representing the mouse press release.viewer - Viewer where the mouse was released.public void removeViewer(EditPartViewer viewer)
removeViewer in interface EditDomainviewer - The viewer to removepublic void setCommandStack(CommandStack stack)
stack - The new command stack for this Editor.public void setDefaultTool(Tool tool)
tool - Default tool for this Editor.protected void setEditorPart(IEditorPart editorPart)
public void setPaletteRoot(PaletteRoot root)
root - Model of the new palette.public void setPaletteViewer(PaletteViewer palette)
palette - Viewer of the palette for this Editor.public void setTool(Tool newTool)
setTool in interface EditDomainnewTool - The new tool for this Editor.
public void viewerEntered(MouseEvent mouseEvent,
EditPartViewer viewer)
viewerEntered in interface EditDomainmouseEvent - Event representing the mouse press down.viewer - Viewer that the mouse entered.
public void viewerExited(MouseEvent mouseEvent,
EditPartViewer viewer)
viewerExited in interface EditDomainmouseEvent - Event representing the mouse press down.viewer - Viewer that the mouse exited.
|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||