infovis.visualization
Class DefaultVisualization

java.lang.Object
  extended by infovis.utils.ChangeManager
      extended by infovis.column.AbstractColumn
          extended by infovis.column.ColumnProxy
              extended by infovis.table.TableProxy
                  extended by infovis.visualization.DefaultVisualization
All Implemented Interfaces:
IntComparator, Column, Metadata, Constants, Table, RowComparator, Visualization, LabeledComponent, Orientable, Serializable, EventListener, ChangeListener, TableModelListener, SwingConstants, TableModel
Direct Known Subclasses:
ColumnVisualization, GraphVisualization, ScatterPlotVisualization, StrokingVisualization, TreeVisualization

public class DefaultVisualization
extends TableProxy
implements Visualization, ChangeListener

Base class for concrete visualizations.

This class implements a set of services useful for all the concrete visualizations.

A DefaultVisualization needs a Table. It implements a visualization technique and manages the rendering and interaction with the items.

It interfaces with four subsystems:

  1. The Layout subsystem,
  2. The Item Renderer subsystem,
  3. The Interaction subsystem,
  4. The Rulers subsystem.

By default, the Layout is specific to the concrete class. The getLayout() method returns the used Layout object or null if the visualization doesn't need one. For example, ScatterPlotVisualization has no Layout associated whereas TreemapVisualization uses one. Specifying the Layout is visualization specific.

Item Renderers are used to render each visualized items. They form a tree described in ItemRenderer. This tree can be specified in the constructor of a visualization or is created through an ItemRendererFactory.

Item Renderers passed to a visualization can be prototypes or instances (see ItemRenderer.isPrototype(). When a prototype is passed, it is instantiated by the visualization. Otherwise, it is used as it is.

The interaction subsystem is meant to associate a VisualizationInteractor to a visualization. These objects manage the standard event management of the visualizations. When no VisualInteractor is associated with the visualization, then it has no interaction (at least through this mechanism).

The Rulers subsystem provides a mechanism to associate tick marks, rulers and labels to visualizations. Each visualization has to maintain this association when it makes sense. Scatter plots use it to define the axes rulers. The method getRulerTable() returns a Table containing the items to visualize as rulers, as described in RulerTable.

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface infovis.visualization.magicLens.LabeledComponent
LabeledComponent.LabeledItem
 
Field Summary
 
Fields inherited from class infovis.column.AbstractColumn
MODIFIED_ALL, MODIFIED_NONE
 
Fields inherited from interface infovis.Visualization
PROPERTY_INTERACTOR, PROPERTY_ITEM_RENDERER, PROPERTY_LAYOUT, PROPERTY_ORIENTATION, PROPERTY_PARENT, PROPERTY_PERMUTATION, PROPERTY_RULERS, VC_DESCRIPTOR_PROPERTY_PREFIX, VISUAL_ALPHA, VISUAL_COLOR, VISUAL_FILTER, VISUAL_HOVER, VISUAL_LABEL, VISUAL_SELECTION, VISUAL_SHAPE, VISUAL_SIZE
 
Fields inherited from interface infovis.visualization.Orientable
DIRECTION, NAME, ORIENTATION_CENTER, ORIENTATION_EAST, ORIENTATION_INVALID, ORIENTATION_NORTH, ORIENTATION_SOUTH, ORIENTATION_WEST, SQRT2
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface infovis.Table
FILTER_COLUMN, INTERNAL_PREFIX, NIL, SELECTION_COLUMN
 
Fields inherited from interface infovis.metadata.Constants
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE
 
Constructor Summary
DefaultVisualization(Table table)
          Creates a new Visualization for a specified table.
DefaultVisualization(Table table, ItemRenderer ir)
          Creates a new DefaultVisualization for a specified Table using the specified ItemRenderer for rendering.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Add a PropertyChangeListener for a specific property.
 IntPair computeMinMax(Column c)
          Computes the indexes of the min and max values of a specified column taking into account the current permutation.
 IntPair computeMinMaxFiltered(Column c)
          Computes the indexes of the min and max values of a specified column taking into account the current permutation and filter.
 void computeShapes(Rectangle2D bounds)
          Computes the shapes associated with the rows, and store them with setShapeAt.
 LabeledComponent.LabeledItem createLabelItem(int row)
          Returns the LabeledComponent.LabeledItem for a specified row.
 void dispose()
          Releases all the resources used by the visualization.
 Rectangle2D.Float findRectAt(int row)
          Returns a rectangle for the specified row, allocating it if needed.
 Visualization findVisualization(Class cls)
          Returns the sub-visualization of the specified class or null.
 void firePropertyChange(String property, boolean oldV, boolean newV)
          Fires a property change given a property name, the old and new values of the property.
 void firePropertyChange(String property, int oldV, int newV)
          Fires a property change given a property name, the old and new values of the property.
 void firePropertyChange(String property, Object oldV, Object newV)
          Fires a property change given a property name, the old and new values of the property.
 void fireVisualColumnDescriptorChanged(String name)
          Triggers a notification from a changed ItemRenderer given its name.
 void freeRectAt(int row)
          Returns the rectangle at the specified row to the rectangle pool.
 Rectangle2D getBounds()
          Returns the last bounds allocated to this visualization.
 JComponent getComponent()
          Returns the JComponent managing this LabeledCompent
 FilterColumn getFilter()
          Returns the filter.
 Fisheye getFisheye()
          Returns the installed Fisheye or null.
 VisualizationInteractor getInteractor()
          Returns the VisualizationInteractor associated with this Visualization or null if no interaction is managed.
 ItemRenderer getItemRenderer()
          Returns the root ItemRenderer responsible for rendering the items of this visualization.
 ItemRenderer getItemRenderer(String name)
          Returns an ItemRenderer, given its name.
static ItemRenderer getItemRenderer(String name, ItemRenderer root)
          Returns an ItemRenderer given its name and its root ItemRenderer.
 Layout getLayout()
          Returns the layout object managed by this visualization or null if the visualization computes the layout by itself.
 short getOrientation()
          Returns the orientation.
 JComponent getParent()
          Returns the owning VisualizationPanel.
 Permutation getPermutation()
          Returns the permutation.
 Dimension getPreferredSize()
          Returns the preferred dimension of the Visualization or null if the Visualization can adapt to any dimension.
 Rectangle2D.Float getRectAt(int row)
          Returns the rectangle at a specified row.
 int getRowAtIndex(int index)
          Returns the row at a specified permuted index.
 int getRowCount()
          Returns the number of rows in the table.
 int getRowIndex(int row)
          Returns the index at a specified permuted row.
 Table getRulerTable()
          Returns a table of Rulers.
 BooleanColumn getSelection()
          Returns the current ListSelectionModel of this pickable.
 Shape getShapeAt(int row)
          Returns the shape of stored for a specified row or null if none is store.
 Rectangle2D getShapeBoundsAt(int row)
          Returns the bounds around the visual representation of a specified row.
 ShapeColumn getShapes()
          Returns the ObjectColumn containing the shapes.
 Table getTable()
          Returns the Table.
 Column getVisualColumn(String name)
          Returns the column associated with a specified visual dimension or null.
 VisualColumnDescriptor getVisualColumnDescriptor(String name)
          Returns the VisualColumnDescriptor associated with a specified visual dimension.
 Iterator getVisualColumnIterator()
          Returns an Iterator on the names of all the visual columns defined by this visualization.
 Visualization getVisualization(int index)
          Returns a dependent Visualization used by this Visualization in its stack.
 Rectangle2D getVisualizationBounds(int index, Rectangle2D.Float bounds)
          Returns the bounds of a specified visualization, given the bounds of the current visualization.
 void invalidate()
          Invalidates the contents of the Visualization.
 void invalidate(Column c)
          Invalidates the contents of the Visualization if the column has requested so.
 boolean isFiltered(int row)
          Returns true if the row is filtered.
 boolean isInvalidateColumn(Column c)
          Returns true if modifying this column triggers a recomputation of the visualization.
 boolean isInvalidated()
          Returns true if the visualization is already invalited.
 RowIterator iterator()
          Returns a RowIterator taking the permutation into account.
 void paint(Graphics2D graphics, Rectangle2D bounds)
          Method for painting the visualization.
 void paintItem(Graphics2D graphics, int row)
          Draw the shape of a specified row onto the specified graphics.
 void paintItems(Graphics2D graphics, Rectangle2D bounds)
          Method for filtering and painting the items.
 void paintVisualizations(Graphics2D graphics, Rectangle2D bounds)
          Paints the sub-visualizations.
 IntArrayList pickAll(Rectangle2D hitBox, Rectangle2D bounds, IntArrayList pick)
          Pick all the items under a rectangle.
 Set pickAll(Rectangle2D hitBox, Rectangle2D bounds, Set pick)
          Returns a list of LabeledItems under a specified Rectangle.
 boolean pickItem(Rectangle2D hitBox, Rectangle2D bounds, Shape s, int row)
          Returns true of an item is picked by the specified bounds.
 int pickTop(double x, double y, Rectangle2D bounds)
          Pick the top item.
 int pickTop(Rectangle2D hitBox, Rectangle2D bounds)
          Pick the top item.
 void print(Graphics2D graphics, Rectangle2D bounds)
          Prints the visualization on the specified graphics.
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Remove a PropertyChangeListener for a specific property.
 void repaint()
          Trigger a repaint on the visualization pane.
 void repaint(int row)
          Triggers a repaint for the specified row.
 RowIterator reverseIterator()
          Returns an iterator over the columns of this table in reverse order.
 void setFisheye(Fisheye fisheye)
          Sets the fisheyes.
 void setInteractor(VisualizationInteractor interactor)
          Sets the VisualizationInteractor associated with this Visualization or null if no interaction is desired.
 void setItemRenderer(ItemRenderer root)
          Sets the root ItemRenderer responsible for rendering the items of this visualization.
 void setOrientation(short orientation)
          Sets the orientation.
 void setParent(JComponent parent)
          Sets the owning VisualizationPanel.
 void setPermutation(Permutation perm)
          Sets the permutation.
 void setShapeAt(int row, Shape s)
          Associate a shape with a specified row.
 boolean setVisualColumn(String name, Column newC)
          Associate a column to a visual dimension.
 void stateChanged(ChangeEvent e)
          
 void tableChanged(TableModelEvent e)
          
 void validateShapes(Rectangle2D bounds)
          Checks whether the shapes should be recomputed and call updateShapes then.
 
Methods inherited from class infovis.table.TableProxy
addColumn, addTableModelListener, clear, getColumn, getColumnAt, getColumnClass, getColumnCount, getColumnName, getLastRow, getValueAt, indexOf, indexOf, isCellEditable, isRowValid, removeColumn, removeTableModelListener, setColumnAt, setValueAt
 
Methods inherited from class infovis.column.ColumnProxy
addValue, addValueOrNull, capacity, compare, ensureCapacity, getClientProperty, getFormat, getMaxIndex, getMetadata, getMinIndex, getName, getValueAt, getValueClass, hasUndefinedValue, isEmpty, isInternal, isValueUndefined, setFormat, setName, setSize, setValueAt, setValueOrNullAt, setValueUndefined, size
 
Methods inherited from class infovis.column.AbstractColumn
addChangeListener, compareValues, computeValueMap, computeValueMap, equalObj, equals, getLastModifiedRow, toString
 
Methods inherited from class infovis.utils.ChangeManager
disableNotify, enableNotify, getModCount, removeChangeListener
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface infovis.Column
addChangeListener, addValue, addValueOrNull, capacity, disableNotify, enableNotify, ensureCapacity, getFormat, getMaxIndex, getMinIndex, getName, getValueAt, getValueClass, hasUndefinedValue, isEmpty, isInternal, isValueUndefined, removeChangeListener, setFormat, setName, setSize, setValueAt, setValueOrNullAt, setValueUndefined, size
 
Methods inherited from interface infovis.Metadata
getClientProperty, getMetadata
 
Methods inherited from interface cern.colt.function.IntComparator
compare, equals
 

Constructor Detail

DefaultVisualization

public DefaultVisualization(Table table)
Creates a new Visualization for a specified table.

Parameters:
table - The table.

DefaultVisualization

public DefaultVisualization(Table table,
                            ItemRenderer ir)
Creates a new DefaultVisualization for a specified Table using the specified ItemRenderer for rendering.

Parameters:
table - the Table
ir - the ItemRenderer or null
Method Detail

getVisualization

public Visualization getVisualization(int index)
Returns a dependent Visualization used by this Visualization in its stack.

Specified by:
getVisualization in interface Visualization
Parameters:
index - the index of the dependent visualization
Returns:
a dependent Visualization used by this Visualization in its stack or NIL if none exist at this index.

getVisualizationBounds

public Rectangle2D getVisualizationBounds(int index,
                                          Rectangle2D.Float bounds)
Returns the bounds of a specified visualization, given the bounds of the current visualization.

Parameters:
index - the visualization index
bounds - the bounds of the current visualization.
Returns:
the bounds of a specified visualization

findVisualization

public Visualization findVisualization(Class cls)
Returns the sub-visualization of the specified class or null.

Specified by:
findVisualization in interface Visualization
Parameters:
cls - the visualization class to find
Returns:
the sub-visualization of the specified class or null

fireVisualColumnDescriptorChanged

public void fireVisualColumnDescriptorChanged(String name)
Triggers a notification from a changed ItemRenderer given its name.

Specified by:
fireVisualColumnDescriptorChanged in interface Visualization
Parameters:
name - the name of the ItemRenderer

getVisualColumnDescriptor

public VisualColumnDescriptor getVisualColumnDescriptor(String name)
Returns the VisualColumnDescriptor associated with a specified visual dimension.

Specified by:
getVisualColumnDescriptor in interface Visualization
Parameters:
name - the name of the visual dimension
Returns:
the VisualColumnDescriptor associated with a specified visual dimension.

getVisualColumnIterator

public Iterator getVisualColumnIterator()
Returns an Iterator on the names of all the visual columns defined by this visualization.

Specified by:
getVisualColumnIterator in interface Visualization
Returns:
an Iterator on the names of all the visual columns defined by this visualization.

isInvalidateColumn

public boolean isInvalidateColumn(Column c)
Returns true if modifying this column triggers a recomputation of the visualization.

Parameters:
c - the Column.
Returns:
true if modifying this column triggers a recomputation of the visualization.

setVisualColumn

public boolean setVisualColumn(String name,
                               Column newC)
Associate a column to a visual dimension. For example, the color can be set according to a column containing a date. For that, you would call the method as: vis.setVisualColumn("color", dateColumn)

Specified by:
setVisualColumn in interface Visualization
Parameters:
name - The name of the visual dimension
newC - the column associated with the visual dimension or null.
Returns:
true is the visualization has been changed.

getVisualColumn

public Column getVisualColumn(String name)
Returns the column associated with a specified visual dimension or null.

Specified by:
getVisualColumn in interface Visualization
Parameters:
name - the name of the visual dimension
Returns:
the column associated with a specified visual dimension or null.

setItemRenderer

public void setItemRenderer(ItemRenderer root)
Sets the root ItemRenderer responsible for rendering the items of this visualization.

If the specified ItemRenderer is not instanciated, it will be instantiated by this method.

Specified by:
setItemRenderer in interface Visualization
Parameters:
root - the root ItemRenderer responsible for rendering the items of this visualization.

getItemRenderer

public ItemRenderer getItemRenderer()
Returns the root ItemRenderer responsible for rendering the items of this visualization.

Specified by:
getItemRenderer in interface Visualization
Returns:
the root ItemRenderer responsible for rendering the items managed by this visualization.

getItemRenderer

public ItemRenderer getItemRenderer(String name)
Returns an ItemRenderer, given its name.

Parameters:
name - the name
Returns:
an ItemRenderer, given its name.

getItemRenderer

public static ItemRenderer getItemRenderer(String name,
                                           ItemRenderer root)
Returns an ItemRenderer given its name and its root ItemRenderer.

Parameters:
name - the name
root - the root
Returns:
an ItemRenderer

dispose

public void dispose()
Releases all the resources used by the visualization.

Specified by:
dispose in interface Visualization
Overrides:
dispose in class ColumnProxy

getTable

public Table getTable()
Returns the Table.

Specified by:
getTable in interface Table
Specified by:
getTable in interface Visualization
Overrides:
getTable in class TableProxy
Returns:
the Table.

getBounds

public Rectangle2D getBounds()
Returns the last bounds allocated to this visualization.

Specified by:
getBounds in interface Visualization
Returns:
the last bounds allocated to this visualization.

getParent

public JComponent getParent()
Returns the owning VisualizationPanel.

Specified by:
getParent in interface Visualization
Returns:
the owning VisualizationPanel.

setParent

public void setParent(JComponent parent)
Sets the owning VisualizationPanel.

Specified by:
setParent in interface Visualization
Parameters:
parent - owning VisualizationPanel.

invalidate

public void invalidate(Column c)
Invalidates the contents of the Visualization if the column has requested so. Otherwise, just repaint.

Specified by:
invalidate in interface Visualization
Parameters:
c - the Column triggering the invalidate/repaint.

getShapeBoundsAt

public Rectangle2D getShapeBoundsAt(int row)
Returns the bounds around the visual representation of a specified row.

Parameters:
row - the row
Returns:
the visual bounds

invalidate

public void invalidate()
Invalidates the contents of the Visualization.

Specified by:
invalidate in interface Visualization

isInvalidated

public boolean isInvalidated()
Returns true if the visualization is already invalited.

Returns:
true if the visualization is already invalited.

repaint

public void repaint()
Trigger a repaint on the visualization pane.

Specified by:
repaint in interface Visualization

repaint

public void repaint(int row)
Triggers a repaint for the specified row.

Parameters:
row - the row

getSelection

public BooleanColumn getSelection()
Returns the current ListSelectionModel of this pickable.

Specified by:
getSelection in interface Visualization
Returns:
the current ListSelectionModel of this pickable.

getFilter

public FilterColumn getFilter()
Returns the filter.

Specified by:
getFilter in interface Visualization
Returns:
FilterColumn

isFiltered

public boolean isFiltered(int row)
Returns true if the row is filtered.

Specified by:
isFiltered in interface Visualization
Parameters:
row - the row.
Returns:
true if the row is filtered.

getOrientation

public short getOrientation()
Returns the orientation.

Specified by:
getOrientation in interface Orientable
Returns:
short

setOrientation

public void setOrientation(short orientation)
Sets the orientation.

Specified by:
setOrientation in interface Orientable
Parameters:
orientation - The orientation to set

paintItem

public void paintItem(Graphics2D graphics,
                      int row)
Draw the shape of a specified row onto the specified graphics.

Parameters:
graphics - the graphics.
row - the row.

computeShapes

public final void computeShapes(Rectangle2D bounds)
Computes the shapes associated with the rows, and store them with setShapeAt.

This method should not be overriden lightly. It install and desintalls several pieces carfuly. Implementing the Layout interface is the standard way of defining a new visualization algorithm.

Parameters:
bounds - the bounding box of the visualization.

getLayout

public Layout getLayout()
Returns the layout object managed by this visualization or null if the visualization computes the layout by itself.

Returns:
the layout object managed by this visualization or null.

paint

public void paint(Graphics2D graphics,
                  Rectangle2D bounds)
Method for painting the visualization.

Specified by:
paint in interface Visualization
Parameters:
graphics - the graphics.
bounds - the bounding box of the visualization.

paintVisualizations

public void paintVisualizations(Graphics2D graphics,
                                Rectangle2D bounds)
Paints the sub-visualizations.

Parameters:
graphics - the graphics.
bounds - the bounding box of the visualization.

print

public void print(Graphics2D graphics,
                  Rectangle2D bounds)
Prints the visualization on the specified graphics.

Specified by:
print in interface Visualization
Parameters:
graphics - the graphics.
bounds - the bounding box of the visualization.

paintItems

public void paintItems(Graphics2D graphics,
                       Rectangle2D bounds)
Method for filtering and painting the items.

Parameters:
graphics - the graphics.
bounds - the bounding box of the visualization.

validateShapes

public void validateShapes(Rectangle2D bounds)
Checks whether the shapes should be recomputed and call updateShapes then.

Specified by:
validateShapes in interface Visualization
Parameters:
bounds - the Visualization bounds.

getShapes

public ShapeColumn getShapes()
Returns the ObjectColumn containing the shapes.

Returns:
the ObjectColumn containing the shapes.

getShapeAt

public Shape getShapeAt(int row)
Returns the shape of stored for a specified row or null if none is store.

Specified by:
getShapeAt in interface Visualization
Parameters:
row - the row.
Returns:
the shape of stored for a specified row or null if none is store.

getRectAt

public Rectangle2D.Float getRectAt(int row)
Returns the rectangle at a specified row.

Parameters:
row - the row
Returns:
the rectangle or null.

findRectAt

public Rectangle2D.Float findRectAt(int row)
Returns a rectangle for the specified row, allocating it if needed.

Parameters:
row - the row
Returns:
a rectangle for the specified row, allocating it if needed.

freeRectAt

public void freeRectAt(int row)
Returns the rectangle at the specified row to the rectangle pool.

Parameters:
row - the row of the rectangle.

setShapeAt

public void setShapeAt(int row,
                       Shape s)
Associate a shape with a specified row.

Specified by:
setShapeAt in interface Visualization
Parameters:
row - the row.
s - the shape.

pickTop

public int pickTop(double x,
                   double y,
                   Rectangle2D bounds)
Pick the top item.

Specified by:
pickTop in interface Visualization
Parameters:
x - the X coordinate.
y - the Y coordinate.
bounds - the bounding box of the visualization.
Returns:
int the index of the item on top.

pickTop

public int pickTop(Rectangle2D hitBox,
                   Rectangle2D bounds)
Pick the top item.

Specified by:
pickTop in interface Visualization
Parameters:
hitBox - the bounds where the top item is searched.
bounds - the total bounds where the visualization is displayed.
Returns:
int the index of the item on top.

pickAll

public IntArrayList pickAll(Rectangle2D hitBox,
                            Rectangle2D bounds,
                            IntArrayList pick)
Pick all the items under a rectangle.

Specified by:
pickAll in interface Visualization
Parameters:
hitBox - the bounds where the top item is searched.
bounds - the total bounds where the visualization is displayed.
pick - an IntArrayList that will contain each row of items intersecting the hitBox.
Returns:
int the index of the item on top.

pickItem

public boolean pickItem(Rectangle2D hitBox,
                        Rectangle2D bounds,
                        Shape s,
                        int row)
Returns true of an item is picked by the specified bounds.

Parameters:
hitBox - the bounds of the pick
bounds - the bounds of the visualization
s - the item shape
row - the item row
Returns:
true of an item is picked by the specified bounds.

getPermutation

public Permutation getPermutation()
Returns the permutation.

Specified by:
getPermutation in interface Visualization
Returns:
Permutation

setPermutation

public void setPermutation(Permutation perm)
Sets the permutation.

Specified by:
setPermutation in interface Visualization
Parameters:
perm - The permutation to set

getRowCount

public int getRowCount()
Returns the number of rows in the table.

Specified by:
getRowCount in interface Table
Specified by:
getRowCount in interface Visualization
Specified by:
getRowCount in interface TableModel
Overrides:
getRowCount in class TableProxy
Returns:
the number of rows in the table.

getRowAtIndex

public int getRowAtIndex(int index)
Returns the row at a specified permuted index.

Specified by:
getRowAtIndex in interface Visualization
Parameters:
index - the index.
Returns:
the row at a specified permuted index.

getRowIndex

public int getRowIndex(int row)
Returns the index at a specified permuted row.

Specified by:
getRowIndex in interface Visualization
Parameters:
row - the row.
Returns:
the index at a specified permuted row.

iterator

public RowIterator iterator()
Returns a RowIterator taking the permutation into account.

Specified by:
iterator in interface Column
Specified by:
iterator in interface Visualization
Overrides:
iterator in class ColumnProxy
Returns:
a RowIterator taking the permutation into account.

reverseIterator

public RowIterator reverseIterator()
Returns an iterator over the columns of this table in reverse order.

Specified by:
reverseIterator in interface Table
Specified by:
reverseIterator in interface Visualization
Overrides:
reverseIterator in class TableProxy
Returns:
an iterator over the columns of this table in reverse order.

computeMinMax

public IntPair computeMinMax(Column c)
Computes the indexes of the min and max values of a specified column taking into account the current permutation.

Parameters:
c - the column
Returns:
a IntPair containing the indexes of hthe min and max values of the column taking into account the current permutation.

computeMinMaxFiltered

public IntPair computeMinMaxFiltered(Column c)
Computes the indexes of the min and max values of a specified column taking into account the current permutation and filter.

Parameters:
c - the column
Returns:
a IntPair containing the indexes of hthe min and max values of the column taking into account the current permutation and filter.

stateChanged

public void stateChanged(ChangeEvent e)

Specified by:
stateChanged in interface ChangeListener
Overrides:
stateChanged in class ColumnProxy

tableChanged

public void tableChanged(TableModelEvent e)

Specified by:
tableChanged in interface TableModelListener
Overrides:
tableChanged in class TableProxy

getFisheye

public Fisheye getFisheye()
Returns the installed Fisheye or null.

Returns:
the installed Fisheye or null.

setFisheye

public void setFisheye(Fisheye fisheye)
Sets the fisheyes.

Parameters:
fisheye - The fisheyes to set

createLabelItem

public LabeledComponent.LabeledItem createLabelItem(int row)
Returns the LabeledComponent.LabeledItem for a specified row.

Specified by:
createLabelItem in interface Visualization
Parameters:
row - the row
Returns:
the LabeledComponent.LabeledItem for a specified row.

pickAll

public Set pickAll(Rectangle2D hitBox,
                   Rectangle2D bounds,
                   Set pick)
Returns a list of LabeledItems under a specified Rectangle.

Specified by:
pickAll in interface LabeledComponent
Parameters:
hitBox - the rectangle that the items should intersect
bounds - the bounds of the visualization
pick - an Set to use or null if a new one has be be allocated.
Returns:
the Set of LabeledItems under the specified Rectangle.

getComponent

public JComponent getComponent()
Returns the JComponent managing this LabeledCompent

Specified by:
getComponent in interface LabeledComponent
Returns:
the JComponent managing this LabeledCompent.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties. See the fields in PNode and subclasses that start with PROPERTY_ to find out which properties exist.

Specified by:
addPropertyChangeListener in interface Visualization
Parameters:
l - The PropertyChangeListener to be added

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. See the fields in PNode and subclasses that start with PROPERTY_ to find out which properties are supported.

Specified by:
addPropertyChangeListener in interface Visualization
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Specified by:
removePropertyChangeListener in interface Visualization
Parameters:
l - The PropertyChangeListener to be removed

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.

Specified by:
removePropertyChangeListener in interface Visualization
Parameters:
propertyName - The name of the property that was listened on.
listener - The PropertyChangeListener to be removed

firePropertyChange

public void firePropertyChange(String property,
                               Object oldV,
                               Object newV)
Fires a property change given a property name, the old and new values of the property.

Parameters:
property - the property name
oldV - the old value
newV - the new value

firePropertyChange

public void firePropertyChange(String property,
                               int oldV,
                               int newV)
Fires a property change given a property name, the old and new values of the property.

Parameters:
property - the property name
oldV - the old value
newV - the new value

firePropertyChange

public void firePropertyChange(String property,
                               boolean oldV,
                               boolean newV)
Fires a property change given a property name, the old and new values of the property.

Parameters:
property - the property name
oldV - the old value
newV - the new value

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred dimension of the Visualization or null if the Visualization can adapt to any dimension.

Specified by:
getPreferredSize in interface Visualization
Returns:
the preferred dimension of the Visualization or null if the Visualization can adapt to any dimension.

getInteractor

public VisualizationInteractor getInteractor()
Returns the VisualizationInteractor associated with this Visualization or null if no interaction is managed.

Specified by:
getInteractor in interface Visualization
Returns:
the VisualizationInteractor associated with this Visualization or null if no interaction is managed.

setInteractor

public void setInteractor(VisualizationInteractor interactor)
Sets the VisualizationInteractor associated with this Visualization or null if no interaction is desired.

Specified by:
setInteractor in interface Visualization
Parameters:
interactor - the VisualizationInteractor to set.

getRulerTable

public Table getRulerTable()
Returns a table of Rulers.

Specified by:
getRulerTable in interface Visualization
Returns:
a table of Rulers or null if the visualization doesn't support rulers.


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