infovis.column
Class ColumnLink

java.lang.Object
  extended by infovis.column.ColumnLink
All Implemented Interfaces:
Serializable, EventListener, ChangeListener
Direct Known Subclasses:
ColumnSorter

public abstract class ColumnLink
extends Object
implements ChangeListener, Serializable

Link together two columns, applying an abstract method each time the first is modified to recompute the second.

Version:
$Revision: 1.10 $
Author:
Jean-Daniel Fekete
See Also:
Serialized Form

Constructor Summary
ColumnLink(Column from, Column to)
          Creates a new ColumnLink object.
 
Method Summary
 void dispose()
          Removes the link.
 Column getFromColumn()
          Returns the FROM column.
 Column getToColumn()
          Returns the TO column.
 void stateChanged(ChangeEvent e)
           
abstract  void update()
          This method is called each time the from Column is modified.
 void updateColumn()
          Make sure the destination column is synchronized with the dependant columns.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnLink

public ColumnLink(Column from,
                  Column to)
Creates a new ColumnLink object.

Parameters:
from - the column to track.
to - the column to update.
Method Detail

update

public abstract void update()
This method is called each time the from Column is modified. It should recompute the other column.


dispose

public void dispose()
Removes the link.


stateChanged

public void stateChanged(ChangeEvent e)
Specified by:
stateChanged in interface ChangeListener
See Also:
ChangeListener.stateChanged(ChangeEvent)

updateColumn

public void updateColumn()
Make sure the destination column is synchronized with the dependant columns.


getFromColumn

public Column getFromColumn()
Returns the FROM column.

Returns:
the FROM column

getToColumn

public Column getToColumn()
Returns the TO column.

Returns:
the TO column


Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.