org.openbp.cockpit.modeler.figures.tag
Class TagConnector

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractConnector
      extended by org.openbp.cockpit.modeler.figures.tag.TagConnector
All Implemented Interfaces:
CH.ifa.draw.framework.Connector, CH.ifa.draw.util.Storable, java.io.Serializable
Direct Known Subclasses:
ParamConnector

public class TagConnector
extends CH.ifa.draw.standard.AbstractConnector

Connector used within a tag. The orientation of the connector is determined by the orientation of the socket it belongs to.

Author:
Stephan Moritz
See Also:
Serialized Form

Constructor Summary
TagConnector(AbstractTagFigure connectorFigure)
          Default constructor.
 
Method Summary
protected  java.awt.Point findPoint(CH.ifa.draw.framework.ConnectionFigure connection)
           
 void flipOrientation()
          Flips the locked orientation.
 Orientation getLockedOrientation()
          Gets the locked orientation of the connector, if any.
 Orientation getOrientation()
          Determines the direction the connector is facing to.
 SocketFigure getSocketFigure()
          Returns the owning tag.
 boolean isOrientationLocked()
          Checks if the direction is locked.
 void setLockedOrientation(Orientation lockedOrientation)
          Sets the locked orientation of the connector, if any.
 void toggleOrientationLock()
          Toggles the orientation lock.
 void updateOrientation()
          Updates the orientation of attached connections.
 
Methods inherited from class CH.ifa.draw.standard.AbstractConnector
containsPoint, displayBox, draw, findEnd, findStart, owner, read, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagConnector

public TagConnector(AbstractTagFigure connectorFigure)
Default constructor.

Parameters:
connectorFigure - Figure that owns the connector
Method Detail

findPoint

protected java.awt.Point findPoint(CH.ifa.draw.framework.ConnectionFigure connection)
Overrides:
findPoint in class CH.ifa.draw.standard.AbstractConnector

getSocketFigure

public SocketFigure getSocketFigure()
Returns the owning tag.


getOrientation

public Orientation getOrientation()
Determines the direction the connector is facing to.

Returns:
Orientation.RIGHT/Orientation.BOTTOM/Orientation.LEFT/Orientation.TOP

isOrientationLocked

public boolean isOrientationLocked()
Checks if the direction is locked.


toggleOrientationLock

public void toggleOrientationLock()
Toggles the orientation lock.


flipOrientation

public void flipOrientation()
Flips the locked orientation.


getLockedOrientation

public Orientation getLockedOrientation()
Gets the locked orientation of the connector, if any.

Returns:
Orientation.UNDETERMINED/Orientation.RIGHT/Orientation.BOTTOM/Orientation.LEFT/Orientation.TOP

setLockedOrientation

public void setLockedOrientation(Orientation lockedOrientation)
Sets the locked orientation of the connector, if any.

Parameters:
lockedOrientation - Orientation.UNDETERMINED/Orientation.RIGHT/Orientation.BOTTOM/Orientation.LEFT/Orientation.TOP

updateOrientation

public void updateOrientation()
Updates the orientation of attached connections.



Copyright © 2011. All Rights Reserved.