org.tigris.gef.graph
Interface GraphNodeHooks

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
NetNode, NodeCPU, NodePrinter, NodeWall, SampleNode, SampleNode2, SampleNode4

public interface GraphNodeHooks
extends java.io.Serializable

A set of methods that nodes in a GraphModel may implement. If the objects you use to represent nodes implement this interface, they will get the appropriate calls. NetNode implements these.

See Also:
NetNode

Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
           
 boolean canConnectTo(GraphModel gm, java.lang.Object otherNode, java.lang.Object otherPort, java.lang.Object myPort)
          Allow foir application specific rules about which nodes can be connected to which other nodes.
 void deleteFromModel()
           
 void initialize(java.util.Hashtable props)
           
 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.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void setHighlight(boolean b)
           
 

Method Detail

postConnect

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. the arguments contain some info about what ports were connected.


postDisconnect

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. the arguments contain some info about what ports were connected.


canConnectTo

boolean canConnectTo(GraphModel gm,
                     java.lang.Object otherNode,
                     java.lang.Object otherPort,
                     java.lang.Object myPort)
Allow foir application specific rules about which nodes can be connected to which other nodes. This is called from the NetPort, so the port has first say as to whether it can be connected to some other port. NetPort.canConnectTo() just calls NetNode.canConnectTo(). By default anything can be connected to anything.


postPlacement

void postPlacement(Editor ed)
Do some application specific actions after the node is placed in a drawing area.


addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener l)

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener l)

initialize

void initialize(java.util.Hashtable props)

setHighlight

void setHighlight(boolean b)

deleteFromModel

void deleteFromModel()