Make your own free website on Tripod.com
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Graph.GraphEventsAdaptor

java.lang.Object
   |
   +----Graph.GraphEventsAdaptor

public class GraphEventsAdaptor
extends Object
Graph Events Adaptor, is used for gathering events from all of the (visible) objects, and passing them to the current Collector. I say current, because, while editing graph, you will probably switch several Collectors (for example: Collector that deals with selecting/deselecting nodes, Collector for node or edge drawing, etc.) It basically just receieves events through dispatchEvents, and dispatches those events to the Collector class in use. Q: Why use an Adaptor, and not Multicaster? 1. Switching between collectors is simpler (just one assigment) compared to remove...Listener for every visible object, and then again add...Listener 2. Each object has full control over events that are passed to the collector. Q: Why not use a cascade of Multicasters (two level Multicasting)? While this is an interesting idea, Adaptor still allows finer control over each event before it is passed

See Also:
GraphEventsCollector

Constructor Index

 o GraphEventsAdaptor(GraphEventsCollector)

Method Index

 o displayErrorStatus(String)
This is definetely a kludge, since Adaptors are not meant for this kind of communication (throwing Exceptions would be much nicer :)
 o getEventsCollector()
 o setEventsCollector(GraphEventsCollector)

Constructors

 o GraphEventsAdaptor
 public GraphEventsAdaptor(GraphEventsCollector gec)

Methods

 o displayErrorStatus
 public void displayErrorStatus(String s)
This is definetely a kludge, since Adaptors are not meant for this kind of communication (throwing Exceptions would be much nicer :)

 o getEventsCollector
 public GraphEventsCollector getEventsCollector()
 o setEventsCollector
 public void setEventsCollector(GraphEventsCollector eventsCollector)

All Packages  Class Hierarchy  This Package  Previous  Next  Index