All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Graph.Node

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----Graph.Node

public abstract class Node
extends Panel
implements KeyListener, MouseListener, MouseMotionListener, Cloneable
This class was generated by a SmartGuide. This is a base class for Nodes, it extends Panel, simply because you can put almost anything in/on the Panel, so there are no restrictions in the possible type of the data you can display on it. On the other hand it is a fully flegged component, so that node drawer or selection mechanisms, can manipulate it, as any other component. To conclude, extend Node to suit your purposes (display your data) but do not forget that the rest of the program communicates with your node through those events that Panel sends/recieves, so you have to leave some of the space of the Panel uncovered, for user to click on it.(simpler form: make the surface of the Node bigger than is the union of all of surfaces of components that you display in the node.)

See Also:
GraphEventsAdaptor

Variable Index

 o timestamp

Constructor Index

 o Node(Integer, GraphEventsAdaptor)

Method Index

 o clone()
 o getId()
 o keyPressed(KeyEvent)
keyPressed method comment.
 o keyReleased(KeyEvent)
keyReleased method comment.
 o keyTyped(KeyEvent)
keyTyped method comment.
 o mouseClicked(MouseEvent)
mouseClicked method comment.
 o mouseDragged(MouseEvent)
mouseDragged method comment.
 o mouseEntered(MouseEvent)
mouseEntered method comment.
 o mouseExited(MouseEvent)
mouseExited method comment.
 o mouseMoved(MouseEvent)
mouseMoved method comment.
 o mousePressed(MouseEvent)
mousePressed method comment.
 o mouseReleased(MouseEvent)
mouseReleased method comment.
 o paint(Graphics)
 o resize(double)
 o setBounds(int, int, int, int)
Timestamps are updated when Bounds/Location/Size are changed.
 o setEventAdaptor(GraphEventsAdaptor)
 o setId(Integer)

Variables

 o timestamp
 public transient long timestamp

Constructors

 o Node
 public Node(Integer Id,
             GraphEventsAdaptor gea)

Methods

 o clone
 public Object clone()
Overrides:
clone in class Object
 o getId
 public Integer getId()
 o keyPressed
 public void keyPressed(KeyEvent e)
keyPressed method comment.

 o keyReleased
 public void keyReleased(KeyEvent e)
keyReleased method comment.

 o keyTyped
 public void keyTyped(KeyEvent e)
keyTyped method comment.

 o mouseClicked
 public void mouseClicked(MouseEvent e)
mouseClicked method comment.

 o mouseDragged
 public void mouseDragged(MouseEvent e)
mouseDragged method comment.

 o mouseEntered
 public void mouseEntered(MouseEvent e)
mouseEntered method comment.

 o mouseExited
 public void mouseExited(MouseEvent e)
mouseExited method comment.

 o mouseMoved
 public void mouseMoved(MouseEvent e)
mouseMoved method comment.

 o mousePressed
 public void mousePressed(MouseEvent e)
mousePressed method comment.

 o mouseReleased
 public void mouseReleased(MouseEvent e)
mouseReleased method comment.

 o paint
 public abstract void paint(Graphics g)
Overrides:
paint in class Container
 o resize
 public abstract void resize(double percent)
 o setBounds
 public void setBounds(int x,
                       int y,
                       int width,
                       int height)
Timestamps are updated when Bounds/Location/Size are changed.

Overrides:
setBounds in class Component
 o setEventAdaptor
 public void setEventAdaptor(GraphEventsAdaptor gea)
 o setId
 public void setId(Integer Id)

All Packages  Class Hierarchy  This Package  Previous  Next  Index