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

java.lang.Object
  extended by DefaultContext
      extended by org.eclipse.graphiti.features.context.impl.ReconnectionContext
All Implemented Interfaces:
IContext, IReconnectionContext, IPropertyBag

public class ReconnectionContext
extends DefaultContext
implements IReconnectionContext

The Class ReconnectionContext.


Field Summary
private  Connection connection
           
private  Anchor newAnchor
           
private  Anchor oldAnchor
           
static String RECONNECT_SOURCE
          Constant used to indicate that the source end of an existing connection is being reconnected to a new source node.
static String RECONNECT_TARGET
          Constant used to indicate that the target end of an existing connection is being reconnected to a new target node.
private  String reconnectType
           
private  ILocation targetLocation
           
private  PictogramElement targetPictogramElement
           
 
Constructor Summary
ReconnectionContext(Connection connection, Anchor oldAnchor, Anchor newAnchor, ILocation targetLocation)
          Creates a new ReconnectionContext.
 
Method Summary
 Connection getConnection()
          Gets the connection.
 Anchor getNewAnchor()
          Gets the new anchor.
 Anchor getOldAnchor()
          Gets the old anchor.
 String getReconnectType()
          Indicate whether the end of an existing connection is being reconnected to a new source node or a new target node.
 ILocation getTargetLocation()
           
 PictogramElement getTargetPictogramElement()
          Gets the target pictogram element.
 void setConnection(Connection connection)
          Sets the connection.
 void setNewAnchor(Anchor newAnchor)
          Sets the new anchor.
 void setOldAnchor(Anchor oldAnchor)
          Sets the old anchor.
 void setReconnectType(String reconnectType)
          Sets the reconnection type.
 void setTargetLocation(ILocation targetLocation)
           
 void setTargetPictogramElement(PictogramElement targetPictogramElement)
          Sets the target pictogram element.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.graphiti.IPropertyBag
getProperty, putProperty
 

Field Detail

RECONNECT_SOURCE

public static String RECONNECT_SOURCE
Constant used to indicate that the source end of an existing connection is being reconnected to a new source node.


RECONNECT_TARGET

public static String RECONNECT_TARGET
Constant used to indicate that the target end of an existing connection is being reconnected to a new target node.


connection

private Connection connection

oldAnchor

private Anchor oldAnchor

newAnchor

private Anchor newAnchor

targetPictogramElement

private PictogramElement targetPictogramElement

reconnectType

private String reconnectType

targetLocation

private ILocation targetLocation
Constructor Detail

ReconnectionContext

public ReconnectionContext(Connection connection,
                           Anchor oldAnchor,
                           Anchor newAnchor,
                           ILocation targetLocation)
Creates a new ReconnectionContext.

Parameters:
connection - the connection
oldAnchor - the old anchor
newAnchor - the new anchor
Method Detail

getConnection

public Connection getConnection()
Gets the connection.

Specified by:
getConnection in interface IReconnectionContext
Returns:
Returns the connection.

setConnection

public void setConnection(Connection connection)
Sets the connection.

Parameters:
connection - The connection to set.

getNewAnchor

public Anchor getNewAnchor()
Gets the new anchor.

Specified by:
getNewAnchor in interface IReconnectionContext
Returns:
Returns the newAnchor.

setNewAnchor

public void setNewAnchor(Anchor newAnchor)
Sets the new anchor.

Parameters:
newAnchor - The newAnchor to set.

getOldAnchor

public Anchor getOldAnchor()
Gets the old anchor.

Specified by:
getOldAnchor in interface IReconnectionContext
Returns:
Returns the oldAnchor.

setOldAnchor

public void setOldAnchor(Anchor oldAnchor)
Sets the old anchor.

Parameters:
oldAnchor - The oldAnchor to set.

getTargetPictogramElement

public PictogramElement getTargetPictogramElement()
Description copied from interface: IReconnectionContext
Gets the target pictogram element.

Specified by:
getTargetPictogramElement in interface IReconnectionContext
Returns:
the target pictogram element

setTargetPictogramElement

public void setTargetPictogramElement(PictogramElement targetPictogramElement)
Description copied from interface: IReconnectionContext
Sets the target pictogram element.

Specified by:
setTargetPictogramElement in interface IReconnectionContext
Parameters:
targetPictogramElement - the new target pictogram element

toString

public String toString()

getReconnectType

public String getReconnectType()
Indicate whether the end of an existing connection is being reconnected to a new source node or a new target node.

Specified by:
getReconnectType in interface IReconnectionContext
Returns:
RECONNECT_TARGET or RECONNECT_SOURCE

setReconnectType

public void setReconnectType(String reconnectType)
Sets the reconnection type. RECONNECT_TARGET or RECONNECT_SOURCE

Parameters:
reconnectType -

getTargetLocation

public ILocation getTargetLocation()
Specified by:
getTargetLocation in interface IReconnectionContext
Returns:
the targetLocation

setTargetLocation

public void setTargetLocation(ILocation targetLocation)
Parameters:
targetLocation - the targetLocation to set


Copyright (c) SAP AG 2005, 2010.