Eclipse GEF 3.3

## 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 with `FlowLayout`. This EditPolicy knows how to map an <x,y> coordinate 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
`FlowLayoutEditPolicy()`

Method Summary
`protected void` `eraseLayoutTargetFeedback(Request request)` Erases target layout feedback.
`protected int` `getFeedbackIndexFor(Request request)`
`protected EditPart` `getInsertionReference(Request request)` Calculates a reference `EditPart` using the specified `Request`.
`protected Polyline` `getLineFeedback()` Lazily creates and returns a `Polyline` Figure for use as feedback.
`protected boolean` `isHorizontal()`
`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`

Methods inherited from class org.eclipse.gef.editpolicies.LayoutEditPolicy

`activate, createListener, createSizeOnDropFeedback, deactivate, decorateChild, decorateChildren, eraseSizeOnDropFeedback, eraseTargetFeedback, getCloneCommand, getCommand, getCreateCommand, getCreationFeedbackOffset, getDeleteDependantCommand, getLayoutContainer, getOrphanChildrenCommand, getSizeOnDropFeedback, getSizeOnDropFeedback, getTargetEditPart, setListener, 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

### FlowLayoutEditPolicy

    public FlowLayoutEditPolicy()

Method Detail

### eraseLayoutTargetFeedback

    protected void eraseLayoutTargetFeedback(Request request)

  Description copied from class: `LayoutEditPolicy`
  Erases target layout feedback. This method is the inverse of `LayoutEditPolicy.showLayoutTargetFeedback(Request)`.

  Overrides:
    `eraseLayoutTargetFeedback` in class `LayoutEditPolicy`
  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 reference `EditPart` using the specified `Request`. 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 class `OrderedLayoutEditPolicy`
  Parameters:
    `request` - the Request
  Returns:
    `null` or a reference EditPart
  See Also:
    `OrderedLayoutEditPolicy.getInsertionReference(Request)`

### getLineFeedback

    protected Polyline getLineFeedback()

  Lazily creates and returns a `Polyline` Figure for use as feedback.

  Returns:
    a Polyline figure

### isHorizontal

    protected boolean isHorizontal()

  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 class `LayoutEditPolicy`
  Parameters:
    `request` - the Request
  See Also:
    `LayoutEditPolicy.showLayoutTargetFeedback(Request)`

Eclipse GEF 3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.