|
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.LayoutEditPolicy
org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy
org.topcased.modeler.edit.policies.MultiPortLayoutEditPolicy
public class MultiPortLayoutEditPolicy
A Policy that provides support for the creation Command of a GraphNode and the drop Command. Creation : 24 oct. 2005
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 | |
---|---|
MultiPortLayoutEditPolicy()
|
Method Summary | |
---|---|
protected org.eclipse.draw2d.geometry.Point |
calculateChildPosition(org.eclipse.draw2d.geometry.Rectangle constraint,
GraphNode childGraphNode)
Calculate the Point where to create the child node |
protected org.eclipse.gef.commands.Command |
createAddCommand(org.eclipse.gef.EditPart child,
org.eclipse.gef.EditPart after)
|
protected org.eclipse.gef.EditPolicy |
createChildEditPolicy(org.eclipse.gef.EditPart child)
|
protected org.eclipse.gef.commands.Command |
createMoveChildCommand(org.eclipse.gef.EditPart child,
org.eclipse.gef.EditPart after)
|
protected org.eclipse.gef.commands.Command |
getCreateCommand(org.eclipse.gef.requests.CreateRequest request)
|
protected org.eclipse.gef.commands.Command |
getCreateCommand(GraphNode parent,
GraphNode child,
org.eclipse.draw2d.geometry.Point loc,
org.eclipse.draw2d.geometry.Dimension dim,
boolean needModelUpdate)
Returns the command for the GraphElement creation |
protected org.eclipse.gef.commands.Command |
getDeleteDependantCommand(org.eclipse.gef.Request request)
|
protected org.eclipse.gef.EditPart |
getInsertionReference(org.eclipse.gef.Request request)
|
protected EObject |
getParentContainerEObject(GraphElement parent)
By default, it is the model object associated with the parent node that should contain the child |
protected boolean |
isExternalObjectAllowed(GraphNode parent,
GraphNode child)
Returns true if an external object can be displayed in
this container. |
protected boolean |
isSeveralDisplayAllowed(GraphNode parent,
GraphNode child,
boolean needModelUpdate)
Returns true if an model object can be displayed several
time in the same diagram. |
protected boolean |
isValid(EObject child,
EObject parent)
Check if the current EObject is a valid child for the parent EObject. |
Methods inherited from class org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy |
---|
getAddCommand, getMoveChildrenCommand |
Methods inherited from class org.eclipse.gef.editpolicies.LayoutEditPolicy |
---|
activate, createListener, createSizeOnDropFeedback, deactivate, decorateChild, decorateChildren, eraseLayoutTargetFeedback, eraseSizeOnDropFeedback, eraseTargetFeedback, getCloneCommand, getCommand, getCreationFeedbackOffset, getLayoutContainer, getOrphanChildrenCommand, getSizeOnDropFeedback, getSizeOnDropFeedback, getTargetEditPart, setListener, showLayoutTargetFeedback, showSizeOnDropFeedback, showTargetFeedback, undecorateChild, undecorateChildren |
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, getHost, setHost, showSourceFeedback, toString, understandsRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiPortLayoutEditPolicy()
Method Detail |
---|
protected org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gef.requests.CreateRequest request)
getCreateCommand
in class org.eclipse.gef.editpolicies.LayoutEditPolicy
LayoutEditPolicy.getCreateCommand(org.eclipse.gef.requests.CreateRequest)
protected org.eclipse.gef.commands.Command getCreateCommand(GraphNode parent, GraphNode child, org.eclipse.draw2d.geometry.Point loc, org.eclipse.draw2d.geometry.Dimension dim, boolean needModelUpdate)
parent
- The containerchild
- The child to addloc
- The positiondim
- The selected areaneedModelUpdate
- true
if the model must be updated
with this children, false
if we only went to
add its graphical representation.
protected boolean isExternalObjectAllowed(GraphNode parent, GraphNode child)
true
if an external object can be displayed in
this container. External objects are objects included in a different
container.
parent
- The containerchild
- the child GraphNode
false
protected boolean isSeveralDisplayAllowed(GraphNode parent, GraphNode child, boolean needModelUpdate)
true
if an model object can be displayed several
time in the same diagram.
parent
- The containerchild
- the child GraphNodeneedModelUpdate
- true
if the model is modified by
the command
false
protected EObject getParentContainerEObject(GraphElement parent)
parent
- the parent node
protected boolean isValid(EObject child, EObject parent)
child
- the child EObjectparent
- the parent EObject
protected org.eclipse.draw2d.geometry.Point calculateChildPosition(org.eclipse.draw2d.geometry.Rectangle constraint, GraphNode childGraphNode)
constraint
- the rectangle constraintchildGraphNode
- the graphNode to create
protected org.eclipse.gef.commands.Command createMoveChildCommand(org.eclipse.gef.EditPart child, org.eclipse.gef.EditPart after)
createMoveChildCommand
in class org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy
OrderedLayoutEditPolicy.createMoveChildCommand(org.eclipse.gef.EditPart,
org.eclipse.gef.EditPart)
protected org.eclipse.gef.EditPart getInsertionReference(org.eclipse.gef.Request request)
getInsertionReference
in class org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy
OrderedLayoutEditPolicy.getInsertionReference(org.eclipse.gef.Request)
protected org.eclipse.gef.commands.Command getDeleteDependantCommand(org.eclipse.gef.Request request)
getDeleteDependantCommand
in class org.eclipse.gef.editpolicies.LayoutEditPolicy
LayoutEditPolicy.getDeleteDependantCommand(org.eclipse.gef.Request)
protected org.eclipse.gef.EditPolicy createChildEditPolicy(org.eclipse.gef.EditPart child)
createChildEditPolicy
in class org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy
LayoutEditPolicy.createChildEditPolicy(org.eclipse.gef.EditPart)
protected org.eclipse.gef.commands.Command createAddCommand(org.eclipse.gef.EditPart child, org.eclipse.gef.EditPart after)
createAddCommand
in class org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy
OrderedLayoutEditPolicy.createAddCommand(org.eclipse.gef.EditPart,
org.eclipse.gef.EditPart)
|
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.