|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--uci.gef.NetPrimitive
|
+--uci.gef.NetPort
This class models a port in our underlying connected graph model. A port is place on a node where an edge can connect. For example, the power socket in a wall, ot the power cord socket on the back of a computer. This class is used by the DefaultGraphModel. You can also define your own GraphModel that uses your own application-specific objects as ports. Needs-more-work: this should probably move to package uci.graph.
| Field Summary | |
protected Vector |
_edges
The NetEdges that are connected to this port. |
protected Object |
_parent
The NetNode that this port is a part of. |
static String |
DEFAULT_EDGE_CLASS
|
| Fields inherited from class uci.gef.NetPrimitive |
_changeSup,
_highlight |
| Constructor Summary | |
NetPort(Object parent)
Construct a new NetPort with the given parent node and no arcs. |
|
| Method Summary | |
void |
addEdge(NetEdge edge)
Add an edge to the list of edge connected to this port. |
boolean |
canConnectTo(GraphModel gm,
Object anotherPort)
Reply true if this port can legally be connected to the given port. |
protected Class |
defaultEdgeClass(NetPort otherPort)
reply the java Class to be used to make new arcs. |
void |
dispose()
Remove this port from the underlying connected graph model and dispose all arcs connected to it. |
Vector |
getEdges()
Reply a vector of NetEdges that are connected here. |
Object |
getParent()
|
NetEdge |
getParentEdge()
|
NetNode |
getParentNode()
Reply the NetNode that owns this port. |
NetEdge |
makeEdgeFor(NetPort otherPort)
reply a new NetEdge from this port to the given NetPort. |
void |
postConnect(GraphModel gm,
Object otherPort)
Application specific hook that is called after a successful connection. |
void |
postDisconnect(GraphModel gm,
Object otherPort)
Application specific hook that is called after a disconnection. |
void |
removeEdge(NetEdge edge)
Remove an edge from the list of edge connected to this port. |
| 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 |
| Field Detail |
public static String DEFAULT_EDGE_CLASS
protected Vector _edges
protected Object _parent
| Constructor Detail |
public NetPort(Object parent)
| Method Detail |
public NetNode getParentNode()
public NetEdge getParentEdge()
public Object getParent()
public Vector getEdges()
public void addEdge(NetEdge edge)
public void removeEdge(NetEdge edge)
public void dispose()
public void postConnect(GraphModel gm,
Object otherPort)
public void postDisconnect(GraphModel gm,
Object otherPort)
protected Class defaultEdgeClass(NetPort otherPort)
public NetEdge makeEdgeFor(NetPort otherPort)
public boolean canConnectTo(GraphModel gm,
Object anotherPort)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||