org.tigris.gef.demo
Class NodePrinter

java.lang.Object
  extended by org.tigris.gef.graph.presentation.NetPrimitive
      extended by org.tigris.gef.graph.presentation.NetNode
          extended by org.tigris.gef.demo.NodePrinter
All Implemented Interfaces:
java.io.Serializable, GraphNodeHooks

public class NodePrinter
extends NetNode
implements java.io.Serializable

An example subclass of NetNode for use in the Example application. This class represents a printer that can be plugged in and connected to a computer.

See Also:
EquipmentApplet, Serialized Form

Field Summary
protected  PortData _dataPort
           
protected  PortPower _powerPort
           
 
Fields inherited from class org.tigris.gef.graph.presentation.NetPrimitive
_changeSup, _highlight
 
Constructor Summary
NodePrinter()
           
 
Method Summary
 java.lang.String getId()
           
 void initialize(java.util.Hashtable args)
          Initialize a new NodePrinter.
 FigNode makePresentation(Layer lay)
          Construct and return a new FigNode to present this NetNode in the given Layer.
 
Methods inherited from class org.tigris.gef.graph.presentation.NetNode
addPort, canConnectTo, deleteFromModel, getAttributes, getPort, getPorts, postConnect, postDisconnect, postPlacement, presentationFor, setPorts
 
Methods inherited from class org.tigris.gef.graph.presentation.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
 
Methods inherited from interface org.tigris.gef.graph.GraphNodeHooks
addPropertyChangeListener, removePropertyChangeListener, setHighlight
 

Field Detail

_powerPort

protected PortPower _powerPort

_dataPort

protected PortData _dataPort
Constructor Detail

NodePrinter

public NodePrinter()
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in class NetPrimitive

initialize

public void initialize(java.util.Hashtable args)
Initialize a new NodePrinter.

Specified by:
initialize in interface GraphNodeHooks
Specified by:
initialize in class NetNode

makePresentation

public FigNode makePresentation(Layer lay)
Description copied from class: NetNode
Construct and return a new FigNode to present this NetNode in the given Layer. A default implementation is supplied as an example, but all subclasses should override this method. NetPorts of this NetNode should be associated with individual Figs that make up the FigNode.

Specified by:
makePresentation in class NetNode