|
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.editpolicies.AbstractEditPolicy
|
+--org.eclipse.gef.editpolicies.GraphicalEditPolicy
|
+--org.eclipse.gef.editpolicies.SelectionEditPolicy
|
+--org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy
|
+--org.eclipse.gef.editpolicies.BendpointEditPolicy
This EditPolicy defines the behavior of Bendpoints on a Connection.
| Fields inherited from class org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy |
handles |
| 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 |
| Constructor Summary | |
BendpointEditPolicy()
|
|
| Method Summary | |
void |
activate()
Adds a PropertyChangeListener to the Connection so we can react to point changes in the connection. |
protected List |
createSelectionHandles()
Creates selection handles for the bendpoints. |
void |
deactivate()
Removes this from the Connection's list of PropertyChangeListeners. |
protected void |
eraseConnectionFeedback(BendpointRequest request)
Erases bendpoint feedback. |
void |
eraseSourceFeedback(Request request)
Erases feedback, when appropriate. |
Command |
getCommand(Request request)
Returns the appropriate Command for the request type given. |
protected Connection |
getConnection()
Returns the Connection associated with this EditPolicy. |
protected abstract Command |
getCreateBendpointCommand(BendpointRequest request)
Implement this method to return a Command that will create a bendpoint. |
protected abstract Command |
getDeleteBendpointCommand(BendpointRequest request)
Implement this method to return a Command that will delete a bendpoint. |
protected abstract Command |
getMoveBendpointCommand(BendpointRequest request)
Implement this method to return a Command that will move a bendpoint. |
void |
propertyChange(PropertyChangeEvent evt)
Adds selection handles to the Connection, if it is selected, when the points property changes. |
protected void |
restoreOriginalConstraint()
Restores the original constraint that was saved before feedback began to show. |
protected void |
saveOriginalConstraint()
Since the original figure is used for feedback, this method saves the original constraint, so that is can be restored when the feedback is erased. |
protected void |
showCreateBendpointFeedback(BendpointRequest request)
Shows feedback when a bendpoint is being created. |
protected void |
showDeleteBendpointFeedback(BendpointRequest request)
Shows feedback when a bendpoint is being deleted. |
protected void |
showMoveBendpointFeedback(BendpointRequest request)
Shows feedback when a bendpoint is being moved. |
void |
showSourceFeedback(Request request)
Shows feedback, when appropriate. |
| Methods inherited from class org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy |
addSelectionHandles, getAdapter, hideSelection, removeSelectionHandles, showSelection |
| Methods inherited from class org.eclipse.gef.editpolicies.SelectionEditPolicy |
addSelectionListener, getTargetEditPart, hideFocus, removeSelectionListener, setFocus, setSelectedState, showFocus, showPrimarySelection |
| Methods inherited from class org.eclipse.gef.editpolicies.GraphicalEditPolicy |
addFeedback, getHostFigure, getLayer, removeFeedback |
| Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy |
debugFeedback, eraseTargetFeedback, getHost, initialize, setHost, showTargetFeedback, toString, understandsRequest |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BendpointEditPolicy()
| Method Detail |
public void activate()
activate in class SelectionEditPolicySelectionEditPolicy.activate()protected List createSelectionHandles()
BendpointMoveHandles on them with a single
BendpointCreationHandle between 2 consecutive explicit bendpoints.
If implicit bendpoints (such as those created by the AutomaticRouter)
are used, one BendpointCreationHandle is placed in the middle
of the Connection.createSelectionHandles in class SelectionHandlesEditPolicypublic void deactivate()
deactivate in class SelectionEditPolicySelectionEditPolicy.deactivate()protected void eraseConnectionFeedback(BendpointRequest request)
public void eraseSourceFeedback(Request request)
eraseSourceFeedback in class AbstractEditPolicyeraseConnectionFeedback(BendpointRequest)public Command getCommand(Request request)
getCommand in class AbstractEditPolicygetCreateBendpointCommand(BendpointRequest),
getMoveBendpointCommand(BendpointRequest),
getDeleteBendpointCommand(BendpointRequest)protected Connection getConnection()
protected abstract Command getCreateBendpointCommand(BendpointRequest request)
protected abstract Command getDeleteBendpointCommand(BendpointRequest request)
protected abstract Command getMoveBendpointCommand(BendpointRequest request)
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerprotected void restoreOriginalConstraint()
protected void saveOriginalConstraint()
protected void showCreateBendpointFeedback(BendpointRequest request)
protected void showDeleteBendpointFeedback(BendpointRequest request)
protected void showMoveBendpointFeedback(BendpointRequest request)
showDeleteBendpointFeedback(BendpointRequest)
if needed. The original figure is used for feedback and the original constraint is
saved, so that it can be restored when feedback is erased.public void showSourceFeedback(Request request)
showSourceFeedback in class AbstractEditPolicyshowCreateBendpointFeedback(BendpointRequest),
showMoveBendpointFeedback(BendpointRequest)
|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||