public abstract class XYLayoutEditPolicy extends ConstrainedLayoutEditPolicy
Figures
in XYLayout
. The
constraint for XYLayout is a Rectangle
.
Created on :Nov 12, 2002UNSPECIFIED_SIZE
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
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 and Description |
---|
XYLayoutEditPolicy() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getConstraintFor(Point p)
Returns a Rectangle at the given Point with width and height of -1.
|
java.lang.Object |
getConstraintFor(Rectangle r)
Returns a new Rectangle equivalent to the passed Rectangle.
|
protected java.lang.Object |
getConstraintFor(Request request,
GraphicalEditPart child,
Rectangle rect)
Overridden to preserve existing width and height (as well as preferred
sizes) during MOVE requests.
|
protected Rectangle |
getCurrentConstraintFor(GraphicalEditPart child)
Retrieves the child's current constraint from the
LayoutManager . |
protected Point |
getLayoutOrigin()
Returns
XYLayout.getOrigin(IFigure) . |
protected Dimension |
getMinimumSizeFor(GraphicalEditPart child)
Deprecated.
Clients should no longer extend this method. Instead, the
resize tracker, constructed by the 'satellite' primary drag
edit policy should be parameterized with max and min size
constraints.
|
protected XYLayout |
getXYLayout() |
void |
setXyLayout(XYLayout xyLayout) |
protected void |
showSizeOnDropFeedback(CreateRequest request)
Shows size-on-drop feedback during creation.
|
createAddCommand, createAddCommand, createChangeConstraintCommand, createChangeConstraintCommand, createChildEditPolicy, getAddCommand, getAlignChildrenCommand, getChangeConstraintCommand, getCommand, getConstraintFor, getConstraintFor, getConstraintForClone, getMoveChildrenCommand, getResizeChildrenCommand, translateToModelConstraint
activate, createListener, createSizeOnDropFeedback, deactivate, decorateChild, decorateChildren, eraseLayoutTargetFeedback, eraseSizeOnDropFeedback, eraseTargetFeedback, getCloneCommand, getCreateCommand, getCreationFeedbackOffset, getDeleteDependantCommand, getLayoutContainer, getOrphanChildrenCommand, getSizeOnDropFeedback, getSizeOnDropFeedback, getTargetEditPart, setListener, showLayoutTargetFeedback, showTargetFeedback, translateFromAbsoluteToLayoutRelative, translateFromLayoutRelativeToAbsolute, undecorateChild, undecorateChildren
addFeedback, getFeedbackLayer, getHostFigure, getLayer, removeFeedback
debugFeedback, eraseSourceFeedback, getHost, setHost, showSourceFeedback, toString, understandsRequest
protected java.lang.Object getConstraintFor(Request request, GraphicalEditPart child, Rectangle rect)
getConstraintFor
in class ConstrainedLayoutEditPolicy
rect
- the Rectangle relative to the layout
origin
ConstrainedLayoutEditPolicy.getConstraintFor(org.eclipse.gef.Request,
org.eclipse.gef.GraphicalEditPart,
org.eclipse.draw2d.geometry.Rectangle)
public java.lang.Object getConstraintFor(Point p)
XYLayout
uses width or height equal to '-1' to mean use the
figure's preferred size.getConstraintFor
in class ConstrainedLayoutEditPolicy
p
- the input Pointpublic java.lang.Object getConstraintFor(Rectangle r)
getConstraintFor
in class ConstrainedLayoutEditPolicy
r
- the input Rectangleprotected Rectangle getCurrentConstraintFor(GraphicalEditPart child)
LayoutManager
.child
- the childprotected Point getLayoutOrigin()
XYLayout.getOrigin(IFigure)
.getLayoutOrigin
in class LayoutEditPolicy
LayoutEditPolicy.getLayoutOrigin()
protected XYLayout getXYLayout()
container
public void setXyLayout(XYLayout xyLayout)
xyLayout
- The xyLayout to set.protected void showSizeOnDropFeedback(CreateRequest request)
LayoutEditPolicy
showSizeOnDropFeedback
in class LayoutEditPolicy
request
- the CreateRequestLayoutEditPolicy.showSizeOnDropFeedback(org.eclipse.gef.requests.CreateRequest)
protected Dimension getMinimumSizeFor(GraphicalEditPart child)
ConstrainedLayoutEditPolicy.getConstraintFor(ChangeBoundsRequest, GraphicalEditPart)
. By
default, a small Dimension
is returned.child
- the childCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.