uci.gef.demo
Class PortData

java.lang.Object
  |
  +--uci.gef.NetPrimitive
        |
        +--uci.gef.NetPort
              |
              +--uci.gef.demo.PortData

public class PortData
extends NetPort
implements Serializable

An example subclass of NetPort for the EquipmentApplet demo. As part of the example I constrain the ports to only connect to PortDatas.

See Also:
EquipmentApplet, Serialized Form

Fields inherited from class uci.gef.NetPort
_edges, _parent, DEFAULT_EDGE_CLASS
 
Fields inherited from class uci.gef.NetPrimitive
_changeSup, _highlight
 
Constructor Summary
PortData(NetNode parent)
          Construct a new NetPort with the given parent node and no arcs.
 
Method Summary
 boolean canConnectTo(GraphModel gm, NetPort otherPort)
          Add the constraint that PortData's can only be connected to other ports of the same type.
protected  Class defaultEdgeClass(NetPort otherPort)
          If the user starts draggin on this port, he will create a new EdgeData.
 
Methods inherited from class uci.gef.NetPort
addEdge, canConnectTo, dispose, getEdges, getParent, getParentEdge, getParentNode, makeEdgeFor, postConnect, postDisconnect, removeEdge
 
Methods inherited from class uci.gef.NetPrimitive
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getHighlight, removePropertyChangeListener, setHighlight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortData

public PortData(NetNode parent)
Construct a new NetPort with the given parent node and no arcs.
Method Detail

canConnectTo

public boolean canConnectTo(GraphModel gm,
                            NetPort otherPort)
Add the constraint that PortData's can only be connected to other ports of the same type.

defaultEdgeClass

protected Class defaultEdgeClass(NetPort otherPort)
If the user starts draggin on this port, he will create a new EdgeData.
Overrides:
defaultEdgeClass in class NetPort