org.eclipse.graphiti.features.context.impl
Class MoveShapeContext

java.lang.Object
  extended by DefaultContext
      extended by org.eclipse.graphiti.features.context.impl.LocationContext
          extended by org.eclipse.graphiti.features.context.impl.MoveContext
              extended by org.eclipse.graphiti.features.context.impl.MoveShapeContext
All Implemented Interfaces:
IContext, ILocationContext, IMoveContext, IMoveShapeContext, IPictogramElementContext, ITargetConnectionContext, ITargetContext, IPropertyBag

public class MoveShapeContext
extends MoveContext
implements IMoveShapeContext

The Class MoveShapeContext.


Field Summary
private  int deltaX
           
private  int deltaY
           
private  Shape shape
           
private  ContainerShape sourceContainer
           
private  Connection targetConnection
           
private  ContainerShape targetContainer
           
 
Constructor Summary
MoveShapeContext(Shape shape)
          Creates a new MoveShapeContext.
 
Method Summary
 int getDeltaX()
          Gets the delta x.
 int getDeltaY()
          Gets the delta y.
 PictogramElement getPictogramElement()
          Gets the pictogram element.
 Shape getShape()
          Gets the shape.
 ContainerShape getSourceContainer()
          Gets the source container.
 Connection getTargetConnection()
          Gets the target connection.
 ContainerShape getTargetContainer()
          Gets the target container.
 void setDeltaX(int deltaX)
          Sets the delta x.
 void setDeltaY(int deltaY)
          Sets the delta y.
private  void setShape(Shape shape)
           
 void setSourceContainer(ContainerShape sourceContainer)
          Sets the source container.
 void setTargetConnection(Connection targetConnection)
          Sets the target connection.
 void setTargetContainer(ContainerShape targetContainer)
          Sets the target container.
 String toString()
           
 
Methods inherited from class org.eclipse.graphiti.features.context.impl.LocationContext
getX, getY, setLocation, setX, setY
 
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.context.ILocationContext
getX, getY
 
Methods inherited from interface org.eclipse.graphiti.IPropertyBag
getProperty, putProperty
 

Field Detail

deltaX

private int deltaX

deltaY

private int deltaY

shape

private Shape shape

sourceContainer

private ContainerShape sourceContainer

targetContainer

private ContainerShape targetContainer

targetConnection

private Connection targetConnection
Constructor Detail

MoveShapeContext

public MoveShapeContext(Shape shape)
Creates a new MoveShapeContext.

Parameters:
shape - the shape
Method Detail

getDeltaX

public int getDeltaX()
Description copied from interface: IMoveShapeContext
Gets the delta x.

Specified by:
getDeltaX in interface IMoveShapeContext
Returns:
the delta x

getDeltaY

public int getDeltaY()
Description copied from interface: IMoveShapeContext
Gets the delta y.

Specified by:
getDeltaY in interface IMoveShapeContext
Returns:
the delta y

getPictogramElement

public PictogramElement getPictogramElement()
Description copied from interface: IPictogramElementContext
Gets the pictogram element.

Specified by:
getPictogramElement in interface IPictogramElementContext
Returns:
the pictogram element

getShape

public Shape getShape()
Gets the shape.

Specified by:
getShape in interface IMoveShapeContext
Returns:
Returns the shape.

getSourceContainer

public ContainerShape getSourceContainer()
Description copied from interface: IMoveShapeContext
Gets the source container.

Specified by:
getSourceContainer in interface IMoveShapeContext
Returns:
the source container

getTargetConnection

public Connection getTargetConnection()
Description copied from interface: ITargetConnectionContext
Gets the target connection.

Specified by:
getTargetConnection in interface ITargetConnectionContext
Returns:
the target connection where the new pictogram element (currently this has to be a shape) has to be inserted

getTargetContainer

public ContainerShape getTargetContainer()
Description copied from interface: ITargetContext
Gets the target container.

Specified by:
getTargetContainer in interface ITargetContext
Returns:
the target container shape where the new pictogram element (currently this has to be a shape) has to be added

setDeltaX

public void setDeltaX(int deltaX)
Sets the delta x.

Parameters:
deltaX - the new delta x

setDeltaY

public void setDeltaY(int deltaY)
Sets the delta y.

Parameters:
deltaY - the new delta y

setShape

private void setShape(Shape shape)
Parameters:
shape - The shape to set.

setSourceContainer

public void setSourceContainer(ContainerShape sourceContainer)
Sets the source container.

Parameters:
sourceContainer - The sourceContainer to set.

setTargetConnection

public void setTargetConnection(Connection targetConnection)
Sets the target connection.

Parameters:
targetConnection - The target connection to set.

setTargetContainer

public void setTargetContainer(ContainerShape targetContainer)
Sets the target container.

Parameters:
targetContainer - The targetContainer to set.

toString

public String toString()
Overrides:
toString in class LocationContext


Copyright (c) SAP AG 2005, 2010.