de.tu_berlin.cs.tfs.muvitorkit.gef.editparts.policies
Class MuvitorXYLayoutEditPolicy

java.lang.Object
  extended by org.eclipse.gef.editpolicies.AbstractEditPolicy
      extended by org.eclipse.gef.editpolicies.GraphicalEditPolicy
          extended by org.eclipse.gef.editpolicies.LayoutEditPolicy
              extended by org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy
                  extended by org.eclipse.gef.editpolicies.XYLayoutEditPolicy
                      extended by de.tu_berlin.cs.tfs.muvitorkit.gef.editparts.policies.MuvitorXYLayoutEditPolicy
All Implemented Interfaces:
EditPolicy, RequestConstants

public abstract class MuvitorXYLayoutEditPolicy
extends XYLayoutEditPolicy

This layout editpolicy installs MuvitorXYLayoutEditPolicy.GhostFigureNonResizableEditPolicys on an editpart's children, which will automatically show a ghost figure on dragging for all children's figures that implement MuvitorXYLayoutEditPolicy.IGhostFigureProvider. Furthermore it return a generic command for clone requests.

Rating red

Nested Class Summary
protected static class MuvitorXYLayoutEditPolicy.GhostFigureNonResizableEditPolicy
           
static interface MuvitorXYLayoutEditPolicy.IGhostFigureProvider
           
 
Field Summary
 
Fields inherited from class org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy
UNSPECIFIED_SIZE
 
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
MuvitorXYLayoutEditPolicy()
           
 
Method Summary
protected  Command createAddCommand(EditPart child, Object constraint)
           
protected  EditPolicy createChildEditPolicy(EditPart child)
           
protected  Command getCloneCommand(ChangeBoundsRequest request)
           
protected  Command getDeleteDependantCommand(Request request)
           
protected  Dimension getMinimumSizeFor(GraphicalEditPart child)
           
protected abstract  void setConstraint(EObject model, Rectangle constraint)
           
 
Methods inherited from class org.eclipse.gef.editpolicies.XYLayoutEditPolicy
getConstraintFor, getConstraintFor, getConstraintFor, getCurrentConstraintFor, getLayoutOrigin, getXYLayout, setXyLayout, showSizeOnDropFeedback
 
Methods inherited from class org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy
createAddCommand, createChangeConstraintCommand, createChangeConstraintCommand, getAddCommand, getAlignChildrenCommand, getChangeConstraintCommand, getCommand, getConstraintFor, getConstraintFor, getConstraintForClone, getMoveChildrenCommand, getResizeChildrenCommand, translateToModelConstraint
 
Methods inherited from class org.eclipse.gef.editpolicies.LayoutEditPolicy
activate, createListener, createSizeOnDropFeedback, deactivate, decorateChild, decorateChildren, eraseLayoutTargetFeedback, eraseSizeOnDropFeedback, eraseTargetFeedback, getCreateCommand, getCreationFeedbackOffset, getLayoutContainer, getOrphanChildrenCommand, getSizeOnDropFeedback, getSizeOnDropFeedback, getTargetEditPart, setListener, showLayoutTargetFeedback, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MuvitorXYLayoutEditPolicy

public MuvitorXYLayoutEditPolicy()
Method Detail

createAddCommand

protected Command createAddCommand(EditPart child,
                                   Object constraint)
Overrides:
createAddCommand in class ConstrainedLayoutEditPolicy

getDeleteDependantCommand

protected Command getDeleteDependantCommand(Request request)
Overrides:
getDeleteDependantCommand in class LayoutEditPolicy

getCloneCommand

protected Command getCloneCommand(ChangeBoundsRequest request)
Overrides:
getCloneCommand in class LayoutEditPolicy

setConstraint

protected abstract void setConstraint(EObject model,
                                      Rectangle constraint)

createChildEditPolicy

protected EditPolicy createChildEditPolicy(EditPart child)
Overrides:
createChildEditPolicy in class ConstrainedLayoutEditPolicy

getMinimumSizeFor

protected Dimension getMinimumSizeFor(GraphicalEditPart child)
Overrides:
getMinimumSizeFor in class XYLayoutEditPolicy