|
Modelers | |||||||||
| 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.gef.editpolicies.SelectionEditPolicy
org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy
org.topcased.modeler.edit.policies.EdgeObjectEditPolicy
org.topcased.modeler.edit.policies.EdgeObjectUVEditPolicy
public abstract class EdgeObjectUVEditPolicy
An abstract edit policy to select and move
EdgeObjectUV relative to their owning
edge. Must be used only with
GraphEdgeEditPart.
Creation : 3 nov. 2005
| Field Summary |
|---|
| 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 |
| 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 | |
|---|---|
EdgeObjectUVEditPolicy()
|
|
| Method Summary | |
|---|---|
protected int[] |
computeUVDistance(org.eclipse.draw2d.geometry.Dimension moveDelta,
EdgeObjectUV edgeObject,
org.eclipse.draw2d.geometry.Point mouseLocation)
Compute a new uDistance and vDistance depending on the move delta and the edge object figure. |
protected org.eclipse.gef.Handle |
createSelectionHandle(EdgeObject edgeObject)
Create a selection handle for the given edge object. |
protected void |
eraseSourceFeedBack(int oldUDistance,
int oldVDistance,
EdgeObjectUV edgeObject)
Erases source feedback based on the given oldUDistance, oldVDistance and edge object. Subclass must reimplement this method to customize the feedback. Default implementation reinitialize the edge object figure with the initial edge object uDistance and vDistance. |
void |
eraseSourceFeedback(org.eclipse.gef.Request request)
|
org.eclipse.gef.commands.Command |
getCommand(org.eclipse.gef.Request request)
|
protected org.eclipse.gef.commands.Command |
getMoveEdgeObjectCommand(MoveEdgeObjectRequest request)
Gets the command to move an edge object. |
protected abstract boolean |
isEnd(IEdgeObjectFigure figure)
Returns true if the given edge ovject uv figure is located
at the end of the connection or false if it is located at
the start. |
protected void |
showSourceFeedBack(int newUDistance,
int newVDistance,
EdgeObjectUV edgeObject)
Shows or updates source feedback for the specified new uDistance, vDistance and edge object. Subclass must reimplement this method to customize the feedback. Default implementation makes the edge object figure follow the mouse. |
void |
showSourceFeedback(org.eclipse.gef.Request request)
|
| Methods inherited from class org.topcased.modeler.edit.policies.EdgeObjectEditPolicy |
|---|
activate, createSelectionHandles, deactivate, getFeedbackLayer, propertyChange |
| 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, setHost, showTargetFeedback, toString, understandsRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EdgeObjectUVEditPolicy()
| Method Detail |
|---|
protected org.eclipse.gef.Handle createSelectionHandle(EdgeObject edgeObject)
createSelectionHandle in class EdgeObjectEditPolicyedgeObject - the edge object for the one the selection handle has to
be created
null if the given edge object must
not have selection handlepublic void showSourceFeedback(org.eclipse.gef.Request request)
showSourceFeedback in interface org.eclipse.gef.EditPolicyshowSourceFeedback in class org.eclipse.gef.editpolicies.AbstractEditPolicyAbstractEditPolicy.showSourceFeedback(org.eclipse.gef.Request)
protected void showSourceFeedBack(int newUDistance,
int newVDistance,
EdgeObjectUV edgeObject)
uDistance - a new uDistancevDistance - a new vDistanceedgeObject - an edge objectpublic void eraseSourceFeedback(org.eclipse.gef.Request request)
eraseSourceFeedback in interface org.eclipse.gef.EditPolicyeraseSourceFeedback in class org.eclipse.gef.editpolicies.AbstractEditPolicyAbstractEditPolicy.eraseSourceFeedback(org.eclipse.gef.Request)
protected void eraseSourceFeedBack(int oldUDistance,
int oldVDistance,
EdgeObjectUV edgeObject)
uDistance - the old uDistance. It is the edge object uDistance hereedgeObject - an edge objectpublic org.eclipse.gef.commands.Command getCommand(org.eclipse.gef.Request request)
getCommand in interface org.eclipse.gef.EditPolicygetCommand in class org.eclipse.gef.editpolicies.AbstractEditPolicyAbstractEditPolicy.getCommand(org.eclipse.gef.Request)protected org.eclipse.gef.commands.Command getMoveEdgeObjectCommand(MoveEdgeObjectRequest request)
request - the move edge object request
protected abstract boolean isEnd(IEdgeObjectFigure figure)
true if the given edge ovject uv figure is located
at the end of the connection or false if it is located at
the start.
protected int[] computeUVDistance(org.eclipse.draw2d.geometry.Dimension moveDelta,
EdgeObjectUV edgeObject,
org.eclipse.draw2d.geometry.Point mouseLocation)
moveDelta - the current move deltaedgeObject - an edge objectmouseLocation - the mouse location
|
Modelers | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.