|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.graph.presentation.NetPrimitive
org.tigris.gef.graph.presentation.NetNode
This class models a node in our underlying connected graph model. Nodes have ports that are their connection points to other nodes. This class is used by DefaultGraphModel, if you implement your own GraphModel, you can use your own application-specific objects as nodes.
NetEdge
,
NetPort
,
Serialized FormField Summary | |
protected java.util.Vector |
_ports
An array of the ports on this node |
Fields inherited from class org.tigris.gef.graph.presentation.NetPrimitive |
_changeSup, _highlight |
Constructor Summary | |
NetNode()
Construct a new NetNode with no default attributes and no ports. |
|
NetNode(NetNode deft,
java.util.Vector ports)
Construct a new node from the given default node and number of ports. |
Method Summary | |
void |
addPort(NetPort p)
|
boolean |
canConnectTo(GraphModel gm,
java.lang.Object otherNode,
java.lang.Object otherPort,
java.lang.Object myPort)
Allow for application specific rules about which nodes can be connected to which other nodes. |
void |
dispose()
Remove this node from the underling connected graph model. |
java.lang.Object |
getAttributes()
Returns the attribute table of the node. |
NetPort |
getPort(int i)
reply my NetPort with the given index. |
java.util.Vector |
getPorts()
reply my NetPorts. |
abstract void |
initialize(java.util.Hashtable args)
Usually when nodes are created it is deon through newInstance and there is no chance to supply a default node or to connect this node to some other application level object. |
abstract org.tigris.gef.presentation.FigNode |
makePresentation(Layer lay)
Construct and return a new FigNode to present this NetNode in the given Layer. |
void |
postConnect(GraphModel gm,
java.lang.Object anotherNode,
java.lang.Object myPort,
java.lang.Object otherPort)
Do some application specific action just after this node is connected to another node. |
void |
postDisconnect(GraphModel gm,
java.lang.Object anotherNode,
java.lang.Object myPort,
java.lang.Object otherPort)
Do some application specific action just after this node is disconnected from another node. |
void |
postPlacement(Editor ed)
Do some application specific actions after the node is placed in a drawing area. |
org.tigris.gef.presentation.FigNode |
presentationFor(Layer lay)
Reply the FigNode that is appropriate for visualizing this node in the given Layer. |
void |
setPorts(java.util.Vector ports)
|
Methods inherited from class org.tigris.gef.graph.presentation.NetPrimitive |
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getHighlight, getId, removePropertyChangeListener, setHighlight |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.tigris.gef.graph.GraphNodeHooks |
addPropertyChangeListener, removePropertyChangeListener, setHighlight |
Field Detail |
protected java.util.Vector _ports
Constructor Detail |
public NetNode(NetNode deft, java.util.Vector ports)
public NetNode()
Method Detail |
public abstract void initialize(java.util.Hashtable args)
Needs-More-Work: what is the class protocol design here?
initialize
in interface GraphNodeHooks
public java.lang.Object getAttributes()
public NetPort getPort(int i)
public java.util.Vector getPorts()
public void setPorts(java.util.Vector ports)
public void addPort(NetPort p)
public void dispose()
dispose
in interface GraphNodeHooks
public org.tigris.gef.presentation.FigNode presentationFor(Layer lay)
public abstract org.tigris.gef.presentation.FigNode makePresentation(Layer lay)
public void postConnect(GraphModel gm, java.lang.Object anotherNode, java.lang.Object myPort, java.lang.Object otherPort)
postConnect
in interface GraphNodeHooks
public void postDisconnect(GraphModel gm, java.lang.Object anotherNode, java.lang.Object myPort, java.lang.Object otherPort)
postDisconnect
in interface GraphNodeHooks
public boolean canConnectTo(GraphModel gm, java.lang.Object otherNode, java.lang.Object otherPort, java.lang.Object myPort)
canConnectTo
in interface GraphNodeHooks
public void postPlacement(Editor ed)
postPlacement
in interface GraphNodeHooks
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |