All Packages Class Hierarchy This Package Previous Next Index
Class Graph.GraphEventsCollector
java.lang.Object
|
+----java.awt.Component
|
+----Graph.GraphEventsCollector
- public abstract class GraphEventsCollector
- extends Component
- implements KeyListener, MouseListener, MouseMotionListener
This class serves as a basis for development of
Collectors - that do all of the actual editing, manipulating
stretching, folding etc. of the graphs.
Collectors, recieve (user generated) events from all objects on the Graph
Panel (and the Graph Panel, itself). These events, and their
sequences have different meaning, in different contexts (node
or edge drawing, for example). This is where the
semantics is resolved, and actions over the graph are performed
accordingly (placing the node if mouse click occured on the graph panel
in the Node Draw Collector).
To succesfully design a new Collector class, you have to design
your own schemes of events, and how you want them to be processed.
Familiarity with Hashtable is essential, since edges and nodes are
stored in hashtables in the GraphDisplay.
As for composing several Collectors, at this time there is a rudimentary
support for this kind of collector construction. You can create Host and Extension
Collectors - Extension Collectors are hosted by the Hosts. For example how this
works, take a look at the Selection (host) and Movement (extension) Collectors. Movement
is activated on the top of Selection, so that selected nodes and edges can be
moved around. While Movement Collector accepts events, and moves nodes, Selection
displays marks on the selected Edges, and can be used for copy-pasting/deleting
parts of the Graph.
- See Also:
- GraphDisplay, SelectionCollector, MovementCollector
-
GraphEventsCollector()
-
-
close()
-
-
getGraphDisplay()
-
-
keyPressed(KeyEvent)
- keyPressed method comment.
-
keyReleased(KeyEvent)
- keyReleased method comment.
-
keyTyped(KeyEvent)
- keyTyped method comment.
-
mouseClicked(MouseEvent)
- mouseClicked method comment.
-
mouseDragged(MouseEvent)
- mouseDragged method comment.
-
mouseEntered(MouseEvent)
- mouseEntered method comment.
-
mouseExited(MouseEvent)
- mouseExited method comment.
-
mouseMoved(MouseEvent)
- mouseMoved method comment.
-
mousePressed(MouseEvent)
- mousePressed method comment.
-
mouseReleased(MouseEvent)
- mouseReleased method comment.
-
paint(Graphics)
-
-
setGraphDisplay(GraphDisplay)
-
-
update(Graphics)
-
GraphEventsCollector
public GraphEventsCollector()
close
public abstract void close()
getGraphDisplay
public GraphDisplay getGraphDisplay()
keyPressed
public void keyPressed(KeyEvent e)
- keyPressed method comment.
keyReleased
public void keyReleased(KeyEvent e)
- keyReleased method comment.
keyTyped
public void keyTyped(KeyEvent e)
- keyTyped method comment.
mouseClicked
public void mouseClicked(MouseEvent e)
- mouseClicked method comment.
mouseDragged
public void mouseDragged(MouseEvent e)
- mouseDragged method comment.
mouseEntered
public void mouseEntered(MouseEvent e)
- mouseEntered method comment.
mouseExited
public void mouseExited(MouseEvent e)
- mouseExited method comment.
mouseMoved
public void mouseMoved(MouseEvent e)
- mouseMoved method comment.
mousePressed
public void mousePressed(MouseEvent e)
- mousePressed method comment.
mouseReleased
public void mouseReleased(MouseEvent e)
- mouseReleased method comment.
paint
public void paint(Graphics g)
- Overrides:
- paint in class Component
setGraphDisplay
public void setGraphDisplay(GraphDisplay graphDisplay)
update
public void update(Graphics g)
- Overrides:
- update in class Component
All Packages Class Hierarchy This Package Previous Next Index