Package org.eclipse.gef.editpolicies
Class FlowLayoutEditPolicy
- java.lang.Object
-
- org.eclipse.gef.editpolicies.AbstractEditPolicy
-
- org.eclipse.gef.editpolicies.GraphicalEditPolicy
-
- org.eclipse.gef.editpolicies.LayoutEditPolicy
-
- org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy
-
- org.eclipse.gef.editpolicies.FlowLayoutEditPolicy
-
- All Implemented Interfaces:
EditPolicy
,RequestConstants
public abstract class FlowLayoutEditPolicy extends OrderedLayoutEditPolicy
An EditPolicy for use withFlowLayout
. This EditPolicy knows how to map ancoordinate on the layout container to the appropriate index for the operation being performed. It also shows target feedback consisting of an insertion line at the appropriate location. - Since:
- 2.0
-
-
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
Constructors Constructor Description FlowLayoutEditPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
eraseLayoutTargetFeedback(Request request)
Erases target layout feedback.protected int
getFeedbackIndexFor(Request request)
protected EditPart
getInsertionReference(Request request)
Calculates a referenceEditPart
using the specifiedRequest
.protected org.eclipse.draw2d.Polyline
getLineFeedback()
Lazily creates and returns aPolyline
Figure for use as feedback.protected boolean
isHorizontal()
Deprecated.UseOrderedLayoutEditPolicy.isLayoutHorizontal()
instead.protected void
showLayoutTargetFeedback(Request request)
Shows an insertion line if there is one or more current children.-
Methods inherited from class org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy
createAddCommand, createChildEditPolicy, createMoveChildCommand, getAddCommand, getMoveChildrenCommand, isLayoutHorizontal
-
Methods inherited from class org.eclipse.gef.editpolicies.LayoutEditPolicy
activate, createListener, createSizeOnDropFeedback, deactivate, decorateChild, decorateChildren, eraseSizeOnDropFeedback, eraseTargetFeedback, getCloneCommand, getCommand, getCreateCommand, getCreationFeedbackOffset, getDeleteDependantCommand, getLayoutContainer, getLayoutOrigin, getOrphanChildrenCommand, getSizeOnDropFeedback, getSizeOnDropFeedback, getTargetEditPart, setListener, showSizeOnDropFeedback, showTargetFeedback, translateFromAbsoluteToLayoutRelative, translateFromLayoutRelativeToAbsolute, 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
-
-
-
-
Method Detail
-
eraseLayoutTargetFeedback
protected void eraseLayoutTargetFeedback(Request request)
Description copied from class:LayoutEditPolicy
Erases target layout feedback. This method is the inverse ofLayoutEditPolicy.showLayoutTargetFeedback(Request)
.- Overrides:
eraseLayoutTargetFeedback
in classLayoutEditPolicy
- Parameters:
request
- the Request- See Also:
LayoutEditPolicy.eraseLayoutTargetFeedback(Request)
-
getFeedbackIndexFor
protected int getFeedbackIndexFor(Request request)
- Parameters:
request
- the Request- Returns:
- the index for the insertion reference
-
getInsertionReference
protected EditPart getInsertionReference(Request request)
Description copied from class:OrderedLayoutEditPolicy
Calculates a referenceEditPart
using the specifiedRequest
. The EditPart returned is used to mark the index coming after that EditPart.null
is used to indicate the index that comes after no EditPart, that is, it indicates the very last index.- Specified by:
getInsertionReference
in classOrderedLayoutEditPolicy
- Parameters:
request
- the Request- Returns:
null
or a reference EditPart- See Also:
OrderedLayoutEditPolicy.getInsertionReference(Request)
-
getLineFeedback
protected org.eclipse.draw2d.Polyline getLineFeedback()
Lazily creates and returns aPolyline
Figure for use as feedback.- Returns:
- a Polyline figure
-
isHorizontal
protected boolean isHorizontal()
Deprecated.UseOrderedLayoutEditPolicy.isLayoutHorizontal()
instead.- Returns:
true
if the host's LayoutManager is in a horizontal orientation
-
showLayoutTargetFeedback
protected void showLayoutTargetFeedback(Request request)
Shows an insertion line if there is one or more current children.- Overrides:
showLayoutTargetFeedback
in classLayoutEditPolicy
- Parameters:
request
- the Request- See Also:
LayoutEditPolicy.showLayoutTargetFeedback(Request)
-
-