|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.util.FlagSupport
org.eclipse.gef.tools.AbstractTool
org.eclipse.gef.tools.TargetingTool
org.eclipse.gef.tools.CreationTool
org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool
Generic Creation Tool - creates a semantic model element and a view for it The usual usecase is to create "one" element and view. However, in case multiple elements are needed, specialized Semantic and View requests are needed to create new adapters that can adapt to multiple semantic elements and views in the same time
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.gef.tools.AbstractTool |
AbstractTool.Input |
| Field Summary | |
protected boolean |
antiScroll
the anti scroll flag |
| Fields inherited from class org.eclipse.gef.tools.CreationTool |
PROPERTY_CREATION_FACTORY |
| Fields inherited from class org.eclipse.gef.tools.TargetingTool |
MAX_FLAG |
| Fields inherited from class org.eclipse.gef.tools.AbstractTool |
MAX_STATE, MOUSE_BUTTON_ANY, MOUSE_BUTTON1, MOUSE_BUTTON2, MOUSE_BUTTON3, PROPERTY_UNLOAD_WHEN_FINISHED, STATE_ACCESSIBLE_DRAG, STATE_ACCESSIBLE_DRAG_IN_PROGRESS, STATE_DRAG, STATE_DRAG_IN_PROGRESS, STATE_INITIAL, STATE_INVALID, STATE_TERMINAL |
| Fields inherited from interface org.eclipse.gef.RequestConstants |
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER |
| Constructor Summary | |
protected |
CreationTool()
Default constructor to allow subclasses to not require an element type. |
|
CreationTool(IElementType elementType)
Method CreationTool. |
| Method Summary | |
Request |
createCreateRequest()
Creates the request. |
protected void |
createShapeAt(Point point)
Create the shape corresponding to the current selected tool on the current diagram at the point specified |
protected Request |
createTargetRequest()
|
void |
deactivate()
Since both the view and semantic requests contain results we need to free them when the tool is deactivated |
protected void |
doAutoexpose()
|
protected Command |
getCommand()
|
IElementType |
getElementType()
|
protected PreferencesHint |
getPreferencesHint()
Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. |
protected boolean |
handleDoubleClick(int button)
Handles double click to create the shape in defualt position |
protected void |
handleFinished()
Overridden so that the current tool will remain active (locked) if the user is pressing the ctrl key. |
protected boolean |
handleKeyUp(KeyEvent e)
|
protected boolean |
handleMove()
|
protected void |
performCreation(int button)
|
protected void |
revealEditPart(EditPart editPart)
Reveals the newly created editpart |
protected void |
selectAddedObject(EditPartViewer viewer,
java.util.Collection objects)
Select the newly added shape view by default |
void |
selectNewShapes(EditPartViewer viewer,
java.util.Collection objects)
Selects the new shapes and puts them in direct edit mode if desired. |
protected void |
setTargetEditPart(EditPart editpart)
|
| Methods inherited from class org.eclipse.gef.tools.CreationTool |
applyProperty, calculateCursor, getCommandName, getCreateRequest, getDebugName, getFactory, handleButtonDown, handleButtonUp, handleDragInProgress, handleDragStarted, handleFocusLost, handleHover, setFactory, updateTargetRequest |
| Methods inherited from class org.eclipse.gef.util.FlagSupport |
getFlag, setFlag |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean antiScroll
| Constructor Detail |
public CreationTool(IElementType elementType)
elementType - protected CreationTool()
| Method Detail |
protected PreferencesHint getPreferencesHint()
protected Request createTargetRequest()
public void deactivate()
protected void performCreation(int button)
protected void selectAddedObject(EditPartViewer viewer,
java.util.Collection objects)
viewer - objects - protected boolean handleDoubleClick(int button)
protected void createShapeAt(Point point)
point specified
point - to create shape atprotected boolean handleKeyUp(KeyEvent e)
protected void setTargetEditPart(EditPart editpart)
public IElementType getElementType()
protected void handleFinished()
protected boolean handleMove()
protected void doAutoexpose()
protected Command getCommand()
protected void revealEditPart(EditPart editPart)
editPart - public final Request createCreateRequest()
CreationTool.createTargetRequest()
public final void selectNewShapes(EditPartViewer viewer,
java.util.Collection objects)
viewer - the editpart viewerobjects - the collection of new shapesCreationTool.selectAddedObject(EditPartViewer, Collection)
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.