infovis.visualization.magicLens
Class ExcentricLabelVisualization

java.lang.Object
  extended by infovis.visualization.VisualizationProxy
      extended by infovis.visualization.magicLens.ExcentricLabelVisualization
All Implemented Interfaces:
Visualization, LabeledComponent, Orientable, SwingConstants

public class ExcentricLabelVisualization
extends VisualizationProxy

Visualization wrapping a DefaultExcentricLabel.

Version:
$Revision: 1.4 $
Author:
Jean-Daniel Fekete

Nested Class Summary
 
Nested classes/interfaces inherited from interface infovis.visualization.magicLens.LabeledComponent
LabeledComponent.LabeledItem
 
Field Summary
 
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
 
Constructor Summary
ExcentricLabelVisualization(Visualization visualization)
           
ExcentricLabelVisualization(Visualization visualization, ExcentricLabels el)
           
 
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.
 LabeledComponent.LabeledItem createLabelItem(int row)
          Returns the LabeledComponent.LabeledItem for a specified row.
 void dispose()
          Releases all the resources used by the visualization.
static ExcentricLabelVisualization find(Visualization vis)
           
 Visualization findVisualization(Class cls)
          Returns the visualization of a specified class from a stack of visualizations or null.
 void fireVisualColumnDescriptorChanged(String name)
          Fires property change notifications for the specified Visual Column Descriptor.
 JComponent getComponent()
          Returns the JComponent managing this LabeledCompent
 ExcentricLabels getExcentric()
          Returns the excentric.
 FilterColumn getFilter()
          Returns the FilterColumn managing the dynamic queries of the visualization.
 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.
 short getOrientation()
          Returns the orientation manages by this interface.
 JComponent getParent()
          Returns the owning VisualizationPanel.
 Permutation getPermutation()
          Returns the current permutation.
 int getRowAtIndex(int index)
          Returns the row at a specified permuted index.
 int getRowIndex(int row)
          Returns the index at a specified permuted row.
 BooleanColumn getSelection()
          Returns the current BooleanColumn managing the selection of this Visualization.
 Shape getShapeAt(int row)
          Returns the shape of stored for a specified row or null if none is store.
 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.
 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 isEnabled()
           
 boolean isFiltered(int row)
          Returns true if the row is filtered.
 RowIterator iterator()
          Returns a RowIterator over the visualized items in direct order, taking the permutation into account.
 void paint(Graphics2D graphics, Rectangle2D bounds)
          Method for painting the visualization.
 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.
 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)
          Method for printing the visualization.
 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 setEnabled(boolean enabled)
           
 void setInteractor(VisualizationInteractor inter)
          Sets the VisualizationInteractor associated with this Visualization or null if no interaction is desired.
 void setItemRenderer(ItemRenderer ir)
          Sets the root ItemRenderer responsible for rendering the items of this visualization.
 void setOrientation(short orientation)
          Sets the orientation of this interface.
 void setParent(JComponent parent)
          Sets the owning VisualizationPanel.
 void setPermutation(RowComparator comparator)
           
 void setShapeAt(int row, Shape s)
          Associate a shape with a specified row.
 boolean setVisualColumn(String name, Column column)
          Associate a column to a visual dimension.
 
Methods inherited from class infovis.visualization.VisualizationProxy
getBounds, getPreferredSize, getRowCount, getRulerTable, getTable, getVisualization, repaint, reverseIterator, setPermutation, setVisualization, validateShapes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcentricLabelVisualization

public ExcentricLabelVisualization(Visualization visualization,
                                   ExcentricLabels el)

ExcentricLabelVisualization

public ExcentricLabelVisualization(Visualization visualization)
Method Detail

setParent

public void setParent(JComponent parent)
Description copied from class: VisualizationProxy
Sets the owning VisualizationPanel.

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

getParent

public JComponent getParent()
Description copied from class: VisualizationProxy
Returns the owning VisualizationPanel.

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

paint

public void paint(Graphics2D graphics,
                  Rectangle2D bounds)
Description copied from class: VisualizationProxy
Method for painting the visualization.

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

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Description copied from class: VisualizationProxy
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
Overrides:
addPropertyChangeListener in class VisualizationProxy
Parameters:
l - The PropertyChangeListener to be added

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Description copied from class: VisualizationProxy
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
Overrides:
addPropertyChangeListener in class VisualizationProxy
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

createLabelItem

public LabeledComponent.LabeledItem createLabelItem(int row)
Description copied from class: VisualizationProxy
Returns the LabeledComponent.LabeledItem for a specified row.

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

dispose

public void dispose()
Description copied from class: VisualizationProxy
Releases all the resources used by the visualization.

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

findVisualization

public Visualization findVisualization(Class cls)
Description copied from class: VisualizationProxy
Returns the visualization of a specified class from a stack of visualizations or null.

Specified by:
findVisualization in interface Visualization
Overrides:
findVisualization in class VisualizationProxy
Parameters:
cls - the specified class
Returns:
the visualization of a specified class from a stack of visualizations or null.

fireVisualColumnDescriptorChanged

public void fireVisualColumnDescriptorChanged(String name)
Description copied from class: VisualizationProxy
Fires property change notifications for the specified Visual Column Descriptor. The property will be called "VC_DESCRIPTOR_"+name or Visualization.VC_DESCRIPTOR_PROPERTY_PREFIX+name

Specified by:
fireVisualColumnDescriptorChanged in interface Visualization
Overrides:
fireVisualColumnDescriptorChanged in class VisualizationProxy
Parameters:
name - the VisualColumnDescriptor name

getFilter

public FilterColumn getFilter()
Description copied from class: VisualizationProxy
Returns the FilterColumn managing the dynamic queries of the visualization. This is a facade method since the filter visual column can be obtained by VisualFilter.get(vis).getFilterColumn().

Specified by:
getFilter in interface Visualization
Overrides:
getFilter in class VisualizationProxy
Returns:
the FilterColumn of the visualization.

getItemRenderer

public ItemRenderer getItemRenderer()
Description copied from class: VisualizationProxy
Returns the root ItemRenderer responsible for rendering the items of this visualization.

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

getPermutation

public Permutation getPermutation()
Description copied from class: VisualizationProxy
Returns the current permutation.

Specified by:
getPermutation in interface Visualization
Overrides:
getPermutation in class VisualizationProxy
Returns:
the current permutation.

getRowAtIndex

public int getRowAtIndex(int index)
Description copied from class: VisualizationProxy
Returns the row at a specified permuted index.

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

getRowIndex

public int getRowIndex(int row)
Description copied from class: VisualizationProxy
Returns the index at a specified permuted row.

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

getSelection

public BooleanColumn getSelection()
Description copied from class: VisualizationProxy
Returns the current BooleanColumn managing the selection of this Visualization. This is a facade method since the selection visual column can be obtained by VisualSelection.get(vis).getSelectionColumn().

Specified by:
getSelection in interface Visualization
Overrides:
getSelection in class VisualizationProxy
Returns:
the current BooleanColumn managing the selection of this Visualization

getShapeAt

public Shape getShapeAt(int row)
Description copied from class: VisualizationProxy
Returns the shape of stored for a specified row or null if none is store.

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

getVisualColumn

public Column getVisualColumn(String name)
Description copied from class: VisualizationProxy
Returns the column associated with a specified visual dimension or null.

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

getVisualColumnDescriptor

public VisualColumnDescriptor getVisualColumnDescriptor(String name)
Description copied from class: VisualizationProxy
Returns the VisualColumnDescriptor associated with a specified visual dimension.

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

getVisualColumnIterator

public Iterator getVisualColumnIterator()
Description copied from class: VisualizationProxy
Returns an Iterator on the names of all the visual columns defined by this visualization.

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

getVisualization

public Visualization getVisualization(int index)
Description copied from class: VisualizationProxy
Returns a dependent Visualization used by this Visualization in its stack.

Specified by:
getVisualization in interface Visualization
Overrides:
getVisualization in class VisualizationProxy
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.

invalidate

public void invalidate()
Description copied from class: VisualizationProxy
Invalidates the contents of the Visualization.

Specified by:
invalidate in interface Visualization
Overrides:
invalidate in class VisualizationProxy

invalidate

public void invalidate(Column c)
Description copied from class: VisualizationProxy
Invalidates the contents of the Visualization if the column has requested so. Otherwise, just repaint.

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

isFiltered

public boolean isFiltered(int row)
Description copied from class: VisualizationProxy
Returns true if the row is filtered. This is a facade method since the filter visual column can be obtained by VisualFilter.get(vis).getFilterColumn().isFiltered(row).

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

iterator

public RowIterator iterator()
Description copied from class: VisualizationProxy
Returns a RowIterator over the visualized items in direct order, taking the permutation into account.

Specified by:
iterator in interface Visualization
Overrides:
iterator in class VisualizationProxy
Returns:
a RowIterator over the visualized items in direct order

pickAll

public IntArrayList pickAll(Rectangle2D hitBox,
                            Rectangle2D bounds,
                            IntArrayList pick)
Description copied from class: VisualizationProxy
Pick all the items under a rectangle.

Specified by:
pickAll in interface Visualization
Overrides:
pickAll in class VisualizationProxy
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.

pickTop

public int pickTop(double x,
                   double y,
                   Rectangle2D bounds)
Description copied from class: VisualizationProxy
Pick the top item.

Specified by:
pickTop in interface Visualization
Overrides:
pickTop in class VisualizationProxy
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)
Description copied from class: VisualizationProxy
Pick the top item.

Specified by:
pickTop in interface Visualization
Overrides:
pickTop in class VisualizationProxy
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.

print

public void print(Graphics2D graphics,
                  Rectangle2D bounds)
Description copied from class: VisualizationProxy
Method for printing the visualization.

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

removePropertyChangeListener

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

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

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Description copied from class: VisualizationProxy
Remove a PropertyChangeListener for a specific property.

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

setItemRenderer

public void setItemRenderer(ItemRenderer ir)
Description copied from class: VisualizationProxy
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
Overrides:
setItemRenderer in class VisualizationProxy
Parameters:
ir - the root ItemRenderer responsible for rendering the items of this visualization.

setPermutation

public void setPermutation(RowComparator comparator)

setShapeAt

public void setShapeAt(int row,
                       Shape s)
Description copied from class: VisualizationProxy
Associate a shape with a specified row.

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

setVisualColumn

public boolean setVisualColumn(String name,
                               Column column)
Description copied from class: VisualizationProxy
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
Overrides:
setVisualColumn in class VisualizationProxy
Parameters:
name - The name of the visual dimension
column - the column associated with the visual dimension or null.
Returns:
true is the visualization has been changed.

getComponent

public JComponent getComponent()
Description copied from class: VisualizationProxy
Returns the JComponent managing this LabeledCompent

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

pickAll

public Set pickAll(Rectangle2D hitBox,
                   Rectangle2D bounds,
                   Set pick)
Description copied from class: VisualizationProxy
Returns a list of LabeledItems under a specified Rectangle.

Specified by:
pickAll in interface LabeledComponent
Overrides:
pickAll in class VisualizationProxy
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.

getOrientation

public short getOrientation()
Description copied from class: VisualizationProxy
Returns the orientation manages by this interface.

Specified by:
getOrientation in interface Orientable
Overrides:
getOrientation in class VisualizationProxy
Returns:
the orientation manages by this interface

setOrientation

public void setOrientation(short orientation)
Description copied from class: VisualizationProxy
Sets the orientation of this interface.

Specified by:
setOrientation in interface Orientable
Overrides:
setOrientation in class VisualizationProxy
Parameters:
orientation - the orientation.

getExcentric

public ExcentricLabels getExcentric()
Returns the excentric.

Returns:
ExcentricLabels

find

public static ExcentricLabelVisualization find(Visualization vis)

setInteractor

public void setInteractor(VisualizationInteractor inter)
Description copied from class: VisualizationProxy
Sets the VisualizationInteractor associated with this Visualization or null if no interaction is desired.

Specified by:
setInteractor in interface Visualization
Overrides:
setInteractor in class VisualizationProxy
Parameters:
inter - the VisualizationInteractor to set.

getInteractor

public VisualizationInteractor getInteractor()
Description copied from class: VisualizationProxy
Returns the VisualizationInteractor associated with this Visualization or null if no interaction is managed.

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

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)


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