uci.gef.demo
Class SamplePort2

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

public class SamplePort2
extends SamplePort
implements Serializable

An example subclass of NetPort for the Example application.

See Also:
BasicApplication, 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
SamplePort2(NetNode parent)
          Construct a new SamplePort2 as a port of the given NetNode.
 
Method Summary
 boolean canConnectTo(GraphModel gm, Object anotherPort)
          Add the constraint that SamplePort2's can only be connected to other ports of the same type.
protected  Class defaultEdgeClass(NetPort otherPort)
           
 
Methods inherited from class uci.gef.NetPort
addEdge, 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

SamplePort2

public SamplePort2(NetNode parent)
Construct a new SamplePort2 as a port of the given NetNode. This example includes the constraint that SamplePort2's can only be part of SampleNode's.
Method Detail

defaultEdgeClass

protected Class defaultEdgeClass(NetPort otherPort)
Overrides:
defaultEdgeClass in class SamplePort

canConnectTo

public boolean canConnectTo(GraphModel gm,
                            Object anotherPort)
Add the constraint that SamplePort2's can only be connected to other ports of the same type.
Overrides:
canConnectTo in class SamplePort