prefuse.util
Class UpdateListener

java.lang.Object
  extended by prefuse.util.UpdateListener
All Implemented Interfaces:
java.awt.event.ComponentListener, java.util.EventListener, ExpressionListener, TupleSetListener

public abstract class UpdateListener
extends java.lang.Object
implements ExpressionListener, TupleSetListener, java.awt.event.ComponentListener

Convenience listener class that implements ExpressionListener, TupleSetListener, and ComponentListener and routes all the callbacks into a generic update(Object) method. For the case of ComponentListener, only the resize event is funneled into the update method.

Author:
jeffrey heer

Constructor Summary
UpdateListener()
           
 
Method Summary
 void componentHidden(java.awt.event.ComponentEvent e)
          Does nothing.
 void componentMoved(java.awt.event.ComponentEvent e)
          Does nothing.
 void componentResized(java.awt.event.ComponentEvent e)
           
 void componentShown(java.awt.event.ComponentEvent e)
          Does nothing.
 void expressionChanged(Expression expr)
          Notification that an Expression instance has been modified in some way.
 void tupleSetChanged(TupleSet tset, Tuple[] added, Tuple[] removed)
          Notification that a TupleSet has changed.
abstract  void update(java.lang.Object source)
          Generic update routine triggerred by any of the other callbacks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateListener

public UpdateListener()
Method Detail

update

public abstract void update(java.lang.Object source)
Generic update routine triggerred by any of the other callbacks.

Parameters:
source - a source object, either the Expression, TupleSet, or Component that triggered this update event.

expressionChanged

public void expressionChanged(Expression expr)
Description copied from interface: ExpressionListener
Notification that an Expression instance has been modified in some way.

Specified by:
expressionChanged in interface ExpressionListener
Parameters:
expr - the modified expression
See Also:
ExpressionListener.expressionChanged(prefuse.data.expression.Expression)

tupleSetChanged

public void tupleSetChanged(TupleSet tset,
                            Tuple[] added,
                            Tuple[] removed)
Description copied from interface: TupleSetListener
Notification that a TupleSet has changed.

Specified by:
tupleSetChanged in interface TupleSetListener
Parameters:
tset - the TupleSet that has changed
added - an array (potentially zero-length) of added tuples
removed - an array (potentially zero-length) of removed tuples
See Also:
TupleSetListener.tupleSetChanged(prefuse.data.tuple.TupleSet, prefuse.data.Tuple[], prefuse.data.Tuple[])

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Specified by:
componentResized in interface java.awt.event.ComponentListener
See Also:
ComponentListener.componentResized(java.awt.event.ComponentEvent)

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Does nothing.

Specified by:
componentHidden in interface java.awt.event.ComponentListener
See Also:
ComponentListener.componentHidden(java.awt.event.ComponentEvent)

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Does nothing.

Specified by:
componentMoved in interface java.awt.event.ComponentListener
See Also:
ComponentListener.componentMoved(java.awt.event.ComponentEvent)

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Does nothing.

Specified by:
componentShown in interface java.awt.event.ComponentListener
See Also:
ComponentListener.componentShown(java.awt.event.ComponentEvent)


Copyright © 2007 Regents of the University of California