org.eclipse.gef.editpolicies
Class ConstrainedLayoutEditPolicy
java.lang.Object
|
+--org.eclipse.gef.editpolicies.AbstractEditPolicy
|
+--org.eclipse.gef.editpolicies.GraphicalEditPolicy
|
+--org.eclipse.gef.editpolicies.LayoutEditPolicy
|
+--org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy
- All Implemented Interfaces:
- EditPolicy, RequestConstants
- Direct Known Subclasses:
- XYLayoutEditPolicy
- public abstract class ConstrainedLayoutEditPolicy
- extends LayoutEditPolicy
| 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_CHILD, REQ_ALIGN_CHILDREN, REQ_ANCESTOR_DELETED, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_BENDPOINT, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILD, REQ_MOVE_CHILDREN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_END, REQ_RECONNECT_SOURCE, REQ_RECONNECT_START, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILD, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER, REQ_SOURCE_DELETED, REQ_TARGET_DELETED |
| Methods inherited from class org.eclipse.gef.editpolicies.LayoutEditPolicy |
activate, createChildEditPolicy, createListener, deactivate, decorateChild, decorateChildren, eraseDragTargetFeedback, eraseSizeOnDropFeedback, eraseTargetFeedback, getDeleteDependantCommand, getFigure, getLayoutContainer, getOrphanChildrenCommand, getSizeOnDropFeedback, getTargetEditPart, setListener, showDragTargetFeedback, showSizeOnDropFeedback, showTargetFeedback, undecorateChild, undecorateChildren |
ConstrainedLayoutEditPolicy
public ConstrainedLayoutEditPolicy()
createAddCommand
protected abstract Command createAddCommand(EditPart child,
Object constraint)
createChangeConstraintCommand
protected abstract Command createChangeConstraintCommand(EditPart child,
Object constraint)
getAddCommand
protected Command getAddCommand(Request generic)
- Overrides:
getAddCommand in class LayoutEditPolicy
getAlignChildrenCommand
protected Command getAlignChildrenCommand(AlignmentRequest request)
getCommand
public Command getCommand(Request request)
- Description copied from interface:
EditPolicy
- Returns the command for a given request, or null if the EditPolicy does
not work with that request type.
null is treated as a no-op by the caller, or a zero contribution.
The EditPolicy must return an UnexectuableCommand
if it wishes to prevent the operation from being performed.
- Overrides:
getCommand in class LayoutEditPolicy
getConstraintFor
protected Object getConstraintFor(ChangeBoundsRequest request,
GraphicalEditPart child)
- Returns a draw2d constraint object for the given request.
The returned object can be translated to the model using
translateToModelConstraint(Object)
- See Also:
translateToModelConstraint(Object)
getConstraintFor
protected abstract Object getConstraintFor(Point point)
- The point here is relative to the client area of the figure.
It is not absolute.
getConstraintFor
protected abstract Object getConstraintFor(Rectangle rect)
- The rectangle here is relative to the client area of the figure.
It is not absolute.
getConstraintFor
protected Object getConstraintFor(CreateRequest request)
getCreateCommand
protected abstract Command getCreateCommand(CreateRequest request)
- Overrides:
getCreateCommand in class LayoutEditPolicy
translateToFigureConstraint
protected Object translateToFigureConstraint(Object modelConstraint)
- Deprecated. This is never used.
- Converts a constraint from the way it is stored in the model to the
form used by the LayoutManager
translateToModelConstraint
protected Object translateToModelConstraint(Object figureConstraint)
- Converts a constraint from the format used by LayoutManagers,
to the form stored in the model.
getResizeChildrenCommand
protected Command getResizeChildrenCommand(ChangeBoundsRequest request)
getMoveChildrenCommand
protected Command getMoveChildrenCommand(Request request)
- Overrides:
getMoveChildrenCommand in class LayoutEditPolicy
getLayoutOrigin
protected Point getLayoutOrigin()