|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.editpolicies.AbstractEditPolicy
org.eclipse.gef.editpolicies.GraphicalEditPolicy
org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramAssistantEditPolicy
Encapsulates behavior common to editpolicies that popup diagram assistants.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.draw2d.MouseMotionListener |
MouseMotionListener.Stub |
| Field Summary |
| Fields inherited from interface org.eclipse.gef.EditPolicy |
COMPONENT_ROLE, CONNECTION_BENDPOINTS_ROLE, CONNECTION_ENDPOINTS_ROLE, CONNECTION_ROLE, CONTAINER_ROLE, DIRECT_EDIT_ROLE, GRAPHICAL_NODE_ROLE, LAYOUT_ROLE, NODE_ROLE, PRIMARY_DRAG_ROLE, SELECTION_FEEDBACK_ROLE, TREE_CONTAINER_ROLE |
| 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 | |
DiagramAssistantEditPolicy()
Creates a new instance. |
|
| Method Summary | |
void |
activate()
|
void |
deactivate()
|
protected int |
getAppearanceDelay()
Gets the amount of time to wait before showing the diagram assistant. |
protected int |
getDisappearanceDelay()
Gets the amount of time to wait before hiding the diagram assistant after it has been made visible. |
protected int |
getDisappearanceDelayUponExit()
Gets the amount of time to wait before hiding the diagram assistant after the user has moved the mouse outside of the editpart. |
protected Point |
getMouseLocation()
Gets the current mouse location. |
protected abstract void |
hideDiagramAssistant()
Hides the diagram assistant figure(s). |
protected void |
hideDiagramAssistantAfterDelay(int delay)
Hides the diagram assistant after a certain amount of time has passed. |
protected abstract boolean |
isDiagramAssistant(java.lang.Object object)
Checks if the object is or is part of the diagram assistant figure. |
protected abstract boolean |
isDiagramAssistantShowing()
Returns true if the diagram assistant is currently showing; false otherwise. |
protected boolean |
isPreferenceOn()
Returns true if the preference to show this diagram assistant is on or if there is no applicable preference; false otherwise. |
void |
mouseDragged(MouseEvent me)
|
void |
mouseEntered(MouseEvent me)
|
void |
mouseExited(MouseEvent me)
|
void |
mouseHover(MouseEvent me)
|
void |
mouseMoved(MouseEvent me)
|
protected void |
setAvoidHidingDiagramAssistant(boolean avoidHidingDiagramAssistant)
Sets the flag to indicate that the diagram assistant should not be hidden. |
protected void |
setMouseLocation(Point mouseLocation)
Sets the current mouse location. |
protected boolean |
shouldAvoidHidingDiagramAssistant()
Returns true if the diagram assistant should not be hidden; false otherwise. |
protected boolean |
shouldShowDiagramAssistant()
Returns true if the diagram assistant should be shown; false otherwise. |
protected abstract void |
showDiagramAssistant(Point referencePoint)
Shows the diagram assistant figure(s). |
protected void |
showDiagramAssistantAfterDelay(int delay)
Shows the diagram assistant after a certain amount of time has passed. |
| Methods inherited from class org.eclipse.gef.editpolicies.GraphicalEditPolicy |
addFeedback, getFeedbackLayer, getHostFigure, getLayer, removeFeedback |
| Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy |
debugFeedback, eraseSourceFeedback, eraseTargetFeedback, getCommand, getHost, getTargetEditPart, setHost, showSourceFeedback, showTargetFeedback, toString, understandsRequest |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DiagramAssistantEditPolicy()
| Method Detail |
protected abstract boolean isDiagramAssistant(java.lang.Object object)
object - the object in question
protected abstract boolean isDiagramAssistantShowing()
protected abstract void showDiagramAssistant(Point referencePoint)
referencePoint - The reference point which may be used to determine where the
diagram assistant should be located. This is most likely the
current mouse location. This could be null, for example, when
the host gains focus via the space bar, in which case the
diagram assistant should be shown in a default location.protected abstract void hideDiagramAssistant()
protected boolean shouldShowDiagramAssistant()
protected boolean isPreferenceOn()
protected void showDiagramAssistantAfterDelay(int delay)
delay - the delay in millisecondsprotected void hideDiagramAssistantAfterDelay(int delay)
delay - the delay in millisecondspublic void activate()
activate in interface EditPolicypublic void deactivate()
deactivate in interface EditPolicypublic void mouseEntered(MouseEvent me)
mouseEntered in interface MouseMotionListenerpublic void mouseExited(MouseEvent me)
mouseExited in interface MouseMotionListenerpublic void mouseMoved(MouseEvent me)
mouseMoved in interface MouseMotionListenerpublic void mouseHover(MouseEvent me)
mouseHover in interface MouseMotionListenerpublic void mouseDragged(MouseEvent me)
mouseDragged in interface MouseMotionListenerprotected int getAppearanceDelay()
protected int getDisappearanceDelay()
protected int getDisappearanceDelayUponExit()
protected Point getMouseLocation()
protected void setMouseLocation(Point mouseLocation)
mouseLocation - the current mouse locationprotected void setAvoidHidingDiagramAssistant(boolean avoidHidingDiagramAssistant)
avoidHidingDiagramAssistant - Flag to indicate that the diagram assistant should not be
hiddenprotected boolean shouldAvoidHidingDiagramAssistant()
|
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.