Class ReconnectionContext
- java.lang.Object
-
- org.eclipse.graphiti.PropertyBag
-
- org.eclipse.graphiti.internal.features.context.impl.base.DefaultContext
-
- 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
Fields Modifier and Type Field Description static java.lang.StringRECONNECT_SOURCEConstant used to indicate that the source end of an existing connection is being reconnected to a new source node.static java.lang.StringRECONNECT_TARGETConstant used to indicate that the target end of an existing connection is being reconnected to a new target node.
-
Constructor Summary
Constructors Constructor Description ReconnectionContext(Connection connection, Anchor oldAnchor, Anchor newAnchor, ILocation targetLocation)Creates a newReconnectionContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection()Gets the connection.AnchorgetNewAnchor()Gets the new anchor.AnchorgetOldAnchor()Gets the old anchor.java.lang.StringgetReconnectType()Indicate whether the end of an existing connection is being reconnected to a new source node or a new target node.ILocationgetTargetLocation()PictogramElementgetTargetPictogramElement()Gets the target pictogram element.voidsetConnection(Connection connection)Sets the connection.voidsetNewAnchor(Anchor newAnchor)Sets the new anchor.voidsetOldAnchor(Anchor oldAnchor)Sets the old anchor.voidsetReconnectType(java.lang.String reconnectType)Sets the reconnection type.voidsetTargetLocation(ILocation targetLocation)voidsetTargetPictogramElement(PictogramElement targetPictogramElement)Sets the target pictogram element.java.lang.StringtoString()-
Methods inherited from class org.eclipse.graphiti.PropertyBag
getProperty, getPropertyKeys, putProperty
-
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, getPropertyKeys, putProperty
-
-
-
-
Field Detail
-
RECONNECT_SOURCE
public static java.lang.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 java.lang.String RECONNECT_TARGET
Constant used to indicate that the target end of an existing connection is being reconnected to a new target node.
-
-
Constructor Detail
-
ReconnectionContext
public ReconnectionContext(Connection connection, Anchor oldAnchor, Anchor newAnchor, ILocation targetLocation)
Creates a newReconnectionContext.- Parameters:
connection- the connectionoldAnchor- the old anchornewAnchor- the new anchor
-
-
Method Detail
-
getConnection
public Connection getConnection()
Gets the connection.- Specified by:
getConnectionin interfaceIReconnectionContext- 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:
getNewAnchorin interfaceIReconnectionContext- 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:
getOldAnchorin interfaceIReconnectionContext- 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:IReconnectionContextGets the target pictogram element.- Specified by:
getTargetPictogramElementin interfaceIReconnectionContext- Returns:
- the target pictogram element
-
setTargetPictogramElement
public void setTargetPictogramElement(PictogramElement targetPictogramElement)
Description copied from interface:IReconnectionContextSets the target pictogram element.- Specified by:
setTargetPictogramElementin interfaceIReconnectionContext- Parameters:
targetPictogramElement- the new target pictogram element
-
toString
public java.lang.String toString()
- Overrides:
toStringin classDefaultContext
-
getReconnectType
public java.lang.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:
getReconnectTypein interfaceIReconnectionContext- Returns:
RECONNECT_TARGETorRECONNECT_SOURCE
-
setReconnectType
public void setReconnectType(java.lang.String reconnectType)
Sets the reconnection type.RECONNECT_TARGETorRECONNECT_SOURCE- Parameters:
reconnectType-
-
getTargetLocation
public ILocation getTargetLocation()
- Specified by:
getTargetLocationin interfaceIReconnectionContext- Returns:
- the targetLocation
-
setTargetLocation
public void setTargetLocation(ILocation targetLocation)
- Parameters:
targetLocation- the targetLocation to set
-
-