http://www.jpicedt.org

jpicedt.graphic.model
Class NodeConnectionManager

java.lang.Object
  extended by jpicedt.graphic.model.NodeConnectionManager
Direct Known Subclasses:
PicText.TextNodeConnectionManager

public class NodeConnectionManager
extends Object

An Element's delegate that can manage node connections with this Element. There one such manager for each Element that is node-able.

Since:
jpicedt 1.5
Author:
Reynal

Field Summary
protected  Element element
           
protected  ArrayList<PicNodeConnection> nodeConnections
          a list of node-connection this element is attached to
protected  String nodeName
          name of node for pstricks export
 
Constructor Summary
NodeConnectionManager(Element e)
           
 
Method Summary
 void addConnection(PicNodeConnection edge)
           
protected  void fireChangedUpdate(DrawingEvent.EventType eventType)
          Overriden in order to support forwarding to node connections.
 String getNodeName()
          gets node name.
 boolean isNode()
          Are we a Node ?
 Iterator<PicNodeConnection> iterator()
          Returns an iterator over all the node connections
 PicPoint nodeConnectionOrigin(double dx, double dy)
           
 PicPoint nodeReferencePoint()
           
 double nodeReferencePointX()
           
 double nodeReferencePointY()
           
 void removeAllConnections()
           
 void removeConnection(PicNodeConnection edge)
           
 void setNodeName(String name)
          sets node name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected Element element

nodeName

protected String nodeName
name of node for pstricks export


nodeConnections

protected ArrayList<PicNodeConnection> nodeConnections
a list of node-connection this element is attached to

Constructor Detail

NodeConnectionManager

public NodeConnectionManager(Element e)
Method Detail

iterator

public Iterator<PicNodeConnection> iterator()
Returns an iterator over all the node connections


isNode

public boolean isNode()
Are we a Node ?(ie do we have connections ?)


setNodeName

public void setNodeName(String name)
sets node name. If argument name is null, create a new name.


getNodeName

public String getNodeName()
gets node name. If nodeName is null, create a new name.


addConnection

public void addConnection(PicNodeConnection edge)

removeConnection

public void removeConnection(PicNodeConnection edge)

removeAllConnections

public void removeAllConnections()

nodeReferencePoint

public PicPoint nodeReferencePoint()

nodeReferencePointX

public double nodeReferencePointX()

nodeReferencePointY

public double nodeReferencePointY()

nodeConnectionOrigin

public PicPoint nodeConnectionOrigin(double dx,
                                     double dy)

fireChangedUpdate

protected void fireChangedUpdate(DrawingEvent.EventType eventType)
Overriden in order to support forwarding to node connections.

Since:
jpicedt 1.4pre5

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org