org.eclipse.graphiti.features.impl
Class DefaultMoveShapeFeature

java.lang.Object
  extended by org.eclipse.graphiti.features.impl.AbstractFeature
      extended by org.eclipse.graphiti.features.impl.AbstractMoveShapeFeature
          extended by org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature
All Implemented Interfaces:
IFeature, IFeatureProviderHolder, IMoveFeature, IMoveShapeFeature, IMoveShape, IDescription, IName

public class DefaultMoveShapeFeature
extends AbstractMoveShapeFeature

The Class DefaultMoveShapeFeature.


Constructor Summary
DefaultMoveShapeFeature(IFeatureProvider fp)
          Creates a new DefaultMoveShapeFeature.
 
Method Summary
protected  boolean avoidNegativeCoordinates()
          Sublasses can override this method.
private  FreeFormConnection[] calculateConnectedConnections(IMoveShapeContext context)
           
private  FreeFormConnection[] calculateContainerConnections(IMoveShapeContext context)
           
 boolean canMoveShape(IMoveShapeContext context)
          Can move shape.
private  java.util.List<Anchor> getAnchors(Shape theShape)
           
protected  void internalMove(IMoveShapeContext context)
          Internal move.
protected  void moveAllBendpoints(IMoveShapeContext context)
          Move all bendpoints.
private  void moveAllBendpointsOnFFConnection(FreeFormConnection connection, int deltaX, int deltaY)
           
 void moveShape(IMoveShapeContext context)
          Move shape.
protected  void postMoveShape(IMoveShapeContext context)
          Post move shape.
protected  void preMoveShape(IMoveShapeContext context)
          Pre move shape.
 
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractMoveShapeFeature
canExecute, execute, getName
 
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature
addGraphicalRepresentation, canUndo, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramEditor, getFeatureProvider, getProgressCallback, getUserDecision, hasDoneChanges, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, setProgressCallback, toString, updatePictogramElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.graphiti.features.IFeature
canUndo, hasDoneChanges, isAvailable
 
Methods inherited from interface org.eclipse.graphiti.IDescription
getDescription
 
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder
getFeatureProvider
 

Constructor Detail

DefaultMoveShapeFeature

public DefaultMoveShapeFeature(IFeatureProvider fp)
Creates a new DefaultMoveShapeFeature.

Parameters:
fp - the feature provider
Method Detail

avoidNegativeCoordinates

protected boolean avoidNegativeCoordinates()
Sublasses can override this method.

Returns:
true if moving to negative coordinates should not be possible

canMoveShape

public boolean canMoveShape(IMoveShapeContext context)
Description copied from interface: IMoveShape
Can move shape.

Parameters:
context - the context
Returns:
true, if successful

moveShape

public void moveShape(IMoveShapeContext context)
Description copied from interface: IMoveShape
Move shape.

Parameters:
context - the context

moveAllBendpoints

protected void moveAllBendpoints(IMoveShapeContext context)
Move all bendpoints. Move bendpoints within a container shape.

Parameters:
context - the context

postMoveShape

protected void postMoveShape(IMoveShapeContext context)
Post move shape.

Parameters:
context - the context

preMoveShape

protected void preMoveShape(IMoveShapeContext context)
Pre move shape.

Parameters:
context - the context

internalMove

protected void internalMove(IMoveShapeContext context)
Internal move.

Parameters:
context - the context

calculateContainerConnections

private FreeFormConnection[] calculateContainerConnections(IMoveShapeContext context)

calculateConnectedConnections

private FreeFormConnection[] calculateConnectedConnections(IMoveShapeContext context)

moveAllBendpointsOnFFConnection

private void moveAllBendpointsOnFFConnection(FreeFormConnection connection,
                                             int deltaX,
                                             int deltaY)

getAnchors

private java.util.List<Anchor> getAnchors(Shape theShape)


Copyright (c) SAP AG 2005, 2012.