uci.gef.demo
Class SampleNode

java.lang.Object
  |
  +--uci.gef.NetPrimitive
        |
        +--uci.gef.NetNode
              |
              +--uci.gef.demo.SampleNode
Direct Known Subclasses:
SampleNode2

public class SampleNode
extends NetNode
implements Serializable

An example subclass of NetNode for use in the Example application.

See Also:
Example, Serialized Form

Field Summary
protected  int _number
           
 SamplePort east
           
 SamplePort north
           
 SamplePort south
           
 SamplePort west
           
 
Fields inherited from class uci.gef.NetNode
_ports
 
Fields inherited from class uci.gef.NetPrimitive
_changeSup, _highlight
 
Constructor Summary
SampleNode()
           
 
Method Summary
 int getId()
           
 int getNumber()
           
 void initialize(Hashtable args)
          Initialize a new SampleNode from the given default node and application specific model.
 void keyPressed(KeyEvent e)
          Sample event handler: prints a message to the console.
 void keyReleased(KeyEvent e)
          Sample event handler: prints a message to the console.
 void keyTyped(KeyEvent e)
          Sample event handler: prints a message to the console.
 FigNode makePresentation(Layer lay)
           
 void mouseClicked(MouseEvent e)
          Sample event handler: prints a message to the console.
 void mouseDragged(MouseEvent e)
          Sample event handler: prints a message to the console.
 void mouseEntered(MouseEvent e)
          Sample event handler: prints a message to the console.
 void mouseExited(MouseEvent e)
          Sample event handler: prints a message to the console.
 void mouseMoved(MouseEvent e)
          Sample event handler: prints a message to the console.
 void mousePressed(MouseEvent e)
          Sample event handler: prints a message to the console.
 void mouseReleased(MouseEvent e)
          Sample event handler: prints a message to the console.
 
Methods inherited from class uci.gef.NetNode
addPort, canConnectTo, dispose, getAttributes, getPort, getPorts, postConnect, postDisconnect, postPlacement, presentationFor, setPorts
 
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

north

public SamplePort north

east

public SamplePort east

west

public SamplePort west

south

public SamplePort south

_number

protected int _number
Constructor Detail

SampleNode

public SampleNode()
Method Detail

initialize

public void initialize(Hashtable args)
Initialize a new SampleNode from the given default node and application specific model.

Needs-More-Work: for now we construct the FigNode programatically, but eventually we will store it in a class variable and just refer to it, or copy it(?). That way the user can edit the FigNode(s) stored in the class variable and have those changes shown for all existing nodes, or for all future nodes. Maybe I should think about doing virtual copies?

Overrides:
initialize in class NetNode

getNumber

public int getNumber()

getId

public int getId()

makePresentation

public FigNode makePresentation(Layer lay)
Overrides:
makePresentation in class NetNode

mouseEntered

public void mouseEntered(MouseEvent e)
Sample event handler: prints a message to the console.

mouseExited

public void mouseExited(MouseEvent e)
Sample event handler: prints a message to the console.

mouseReleased

public void mouseReleased(MouseEvent e)
Sample event handler: prints a message to the console.

mousePressed

public void mousePressed(MouseEvent e)
Sample event handler: prints a message to the console.

mouseClicked

public void mouseClicked(MouseEvent e)
Sample event handler: prints a message to the console.

mouseDragged

public void mouseDragged(MouseEvent e)
Sample event handler: prints a message to the console.

mouseMoved

public void mouseMoved(MouseEvent e)
Sample event handler: prints a message to the console.

keyTyped

public void keyTyped(KeyEvent e)
Sample event handler: prints a message to the console.

keyReleased

public void keyReleased(KeyEvent e)
Sample event handler: prints a message to the console.

keyPressed

public void keyPressed(KeyEvent e)
Sample event handler: prints a message to the console.