infovis.graph.visualization
Class MatrixVisualization

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
                      extended by infovis.graph.visualization.GraphVisualization
                          extended by infovis.graph.visualization.MatrixVisualization
All Implemented Interfaces:
IntComparator, Column, Graph, GraphChangedListener, Metadata, Constants, Table, RowComparator, Visualization, Layout, LabeledComponent, Orientable, PropertyChangeListener, Serializable, EventListener, ChangeListener, TableModelListener, SwingConstants, TableModel

public class MatrixVisualization
extends GraphVisualization
implements Layout, PropertyChangeListener

Graph Visualization using Adjacency Matrix representation.

Version:
$Revision: 1.70 $
Author:
Jean-Daniel Fekete
See Also:
Serialized Form
InfoVis factory arguments:
VisualizationFactory "Graph Matrix" infovis.Graph

Nested Class Summary
 
Nested classes/interfaces inherited from interface infovis.visualization.magicLens.LabeledComponent
LabeledComponent.LabeledItem
 
Field Summary
static String COLUMNFILTER_COLUMN
          Name of the column containing the columnFilter
static String COLUMNSELECTION_COLUMN
          Name of the column containing the columnSelection
static String ROWFILTER_COLUMN
          Name of the column containing the rowFilter
static String ROWSELECTION_COLUMN
          Name of the column containing the rowSelection
 
Fields inherited from class infovis.column.AbstractColumn
MODIFIED_ALL, MODIFIED_NONE
 
Fields inherited from interface infovis.Graph
GRAPH_TYPE, GRAPH_TYPE_DIRECTED, GRAPH_TYPE_UNDIRECTED, NIL
 
Fields inherited from interface infovis.metadata.Constants
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE
 
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
 
Constructor Summary
MatrixVisualization(Graph graph)
          Constructor for MatrixVisualization.
MatrixVisualization(Table table)
           
 
Method Summary
 RowIterator columnIterator()
          Returns an iterator over the permuted columns.
 void computeShapes(Rectangle2D bounds, Visualization me)
          Computes the layout.
 FilterColumn getColumnFilter()
          Returns the columnFilter.
 Permutation getColumnPermutation()
          Returns the column permutation.
 int getColumnPosition(int col)
          Returns the position of the specified column or -1 if it is hidden.
 int getColumnPositionCount()
          Returns the count of visible column positions.
 BooleanColumn getColumnSelection()
          Returns the columnSelection.
 MatrixAxisVisualization getColumnVisualization()
           
 Layout getLayout()
          Returns the layout object managed by this visualization or null if the visualization computes the layout by itself.
 String getName()
          Returns the column name.
 Dimension getPreferredSize(Visualization me)
          Computes and return the preferred size for this layout and this visualization.
 FilterColumn getRowFilter()
          Returns the rowFilter.
 Permutation getRowPermutation()
          Returns the row permutation.
 int getRowPosition(int row)
           
 int getRowPositionCount()
           
 BooleanColumn getRowSelection()
          Returns the rowSelection.
 MatrixAxisVisualization getRowVisualization()
           
 Column getVertexLabelColumn()
          Returns the vertexLabelColumn.
 void invalidate(Visualization vis)
          Invalidate the cached state of the layout.
 boolean isColumnFiltered(int column)
          Returns true if the specified column is filtered.
 boolean isSquared()
          Returns the squared.
 void propertyChange(PropertyChangeEvent evt)
           
 RowIterator rowIterator()
          Returns an iterator over the permuted rows.
 boolean setColumnFilter(FilterColumn columnFilter)
          Sets the columnFilter.
 void setColumnPermutation(Permutation perm)
          Sets the column permutation.
 boolean setColumnSelection(BooleanColumn columnSelection)
          Sets the columnSelection.
 boolean setRowFilter(FilterColumn rowFilter)
          Sets the rowFilter.
 void setRowPermutation(Permutation perm)
           
 boolean setRowSelection(BooleanColumn rowSelection)
          Sets the rowSelection.
 void setSquared(boolean squared)
          Sets the squared.
 boolean setVertexLabelColumn(Column vertexLabelColumn)
          Sets the vertexLabelColumn.
 RowIterator vertexIterator()
          Returns an iterator over the vertices of the graph.
 
Methods inherited from class infovis.graph.visualization.GraphVisualization
addEdge, addGraphChangedListener, addVertex, edgeIterator, edgeIterator, findEdge, getDegree, getEdge, getEdgesCount, getEdgeTable, getFirstVertex, getGraph, getInDegree, getInEdgeAt, getOtherVertex, getOutDegree, getOutEdgeAt, getSecondVertex, getVertexTable, getVerticesCount, graphChanged, inEdgeIterator, isDirected, outEdgeIterator, removeEdge, removeGraphChangedListener, removeVertex, setDirected
 
Methods inherited from class infovis.visualization.DefaultVisualization
addPropertyChangeListener, addPropertyChangeListener, computeMinMax, computeMinMaxFiltered, computeShapes, createLabelItem, dispose, findRectAt, findVisualization, firePropertyChange, firePropertyChange, firePropertyChange, fireVisualColumnDescriptorChanged, freeRectAt, getBounds, getComponent, getFilter, getFisheye, getInteractor, getItemRenderer, getItemRenderer, getItemRenderer, getOrientation, getParent, getPermutation, getPreferredSize, getRectAt, getRowAtIndex, getRowCount, getRowIndex, getRulerTable, getSelection, getShapeAt, getShapeBoundsAt, getShapes, getTable, getVisualColumn, getVisualColumnDescriptor, getVisualColumnIterator, getVisualization, getVisualizationBounds, invalidate, invalidate, isFiltered, isInvalidateColumn, isInvalidated, iterator, paint, paintItem, paintItems, paintVisualizations, pickAll, pickAll, pickItem, pickTop, pickTop, print, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, reverseIterator, setFisheye, setInteractor, setItemRenderer, setOrientation, setParent, setPermutation, setShapeAt, setVisualColumn, stateChanged, tableChanged, validateShapes
 
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, 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.Graph
clear, setName
 
Methods inherited from interface infovis.Metadata
getClientProperty, getMetadata
 
Methods inherited from interface infovis.Column
addChangeListener, addValue, addValueOrNull, capacity, disableNotify, enableNotify, ensureCapacity, getFormat, getMaxIndex, getMinIndex, getValueAt, getValueClass, hasUndefinedValue, isEmpty, isInternal, isValueUndefined, removeChangeListener, setFormat, setName, setSize, setValueAt, setValueOrNullAt, setValueUndefined, size
 
Methods inherited from interface cern.colt.function.IntComparator
compare, equals
 

Field Detail

ROWSELECTION_COLUMN

public static final String ROWSELECTION_COLUMN
Name of the column containing the rowSelection

See Also:
Constant Field Values

COLUMNSELECTION_COLUMN

public static final String COLUMNSELECTION_COLUMN
Name of the column containing the columnSelection

See Also:
Constant Field Values

ROWFILTER_COLUMN

public static final String ROWFILTER_COLUMN
Name of the column containing the rowFilter

See Also:
Constant Field Values

COLUMNFILTER_COLUMN

public static final String COLUMNFILTER_COLUMN
Name of the column containing the columnFilter

See Also:
Constant Field Values
Constructor Detail

MatrixVisualization

public MatrixVisualization(Graph graph)
Constructor for MatrixVisualization.

Parameters:
graph - the graph.

MatrixVisualization

public MatrixVisualization(Table table)
Method Detail

getLayout

public Layout getLayout()
Description copied from class: DefaultVisualization
Returns the layout object managed by this visualization or null if the visualization computes the layout by itself.

Overrides:
getLayout in class DefaultVisualization
Returns:
the layout object managed by this visualization or null.

getName

public String getName()
Description copied from class: ColumnProxy
Returns the column name.

Specified by:
getName in interface Column
Specified by:
getName in interface Graph
Specified by:
getName in interface Layout
Overrides:
getName in class ColumnProxy
Returns:
the column name.

invalidate

public void invalidate(Visualization vis)
Invalidate the cached state of the layout.

Call this method from the visualization when it gets invalidated.

Specified by:
invalidate in interface Layout
Parameters:
vis - the visualization.

getPreferredSize

public Dimension getPreferredSize(Visualization me)
Description copied from interface: Layout
Computes and return the preferred size for this layout and this visualization.

Specified by:
getPreferredSize in interface Layout
Parameters:
me - the visualization
Returns:
the preferred size for this layout and this visualization.

computeShapes

public void computeShapes(Rectangle2D bounds,
                          Visualization me)
Description copied from interface: Layout
Computes the layout.

Specified by:
computeShapes in interface Layout
Parameters:
bounds - the allocated bounds of the visualization.
me - the visualization.
See Also:
DefaultVisualization.computeShapes(Rectangle2D)

getRowVisualization

public MatrixAxisVisualization getRowVisualization()

getColumnVisualization

public MatrixAxisVisualization getColumnVisualization()

getVertexLabelColumn

public Column getVertexLabelColumn()
Returns the vertexLabelColumn.

Returns:
Column

setVertexLabelColumn

public boolean setVertexLabelColumn(Column vertexLabelColumn)
Sets the vertexLabelColumn.

Parameters:
vertexLabelColumn - The vertexLabelColumn to set.
Returns:
true if the column has been set.

getRowSelection

public BooleanColumn getRowSelection()
Returns the rowSelection.

Returns:
BooleanColumn

setRowSelection

public boolean setRowSelection(BooleanColumn rowSelection)
Sets the rowSelection.

Parameters:
rowSelection - The rowSelection to set
Returns:
true if the column has been set.

getRowFilter

public FilterColumn getRowFilter()
Returns the rowFilter.

Returns:
FilterColumn

setRowFilter

public boolean setRowFilter(FilterColumn rowFilter)
Sets the rowFilter.

Parameters:
rowFilter - The rowFilter to set
Returns:
true if the column has been set.

vertexIterator

public RowIterator vertexIterator()
Description copied from interface: Graph
Returns an iterator over the vertices of the graph.

Specified by:
vertexIterator in interface Graph
Overrides:
vertexIterator in class GraphVisualization
Returns:
an iterator over the vertices of the graph

getRowPermutation

public Permutation getRowPermutation()
Returns the row permutation.

Returns:
the row permutation.

setRowPermutation

public void setRowPermutation(Permutation perm)

rowIterator

public RowIterator rowIterator()
Returns an iterator over the permuted rows.

Returns:
an iterator over the permuted rows.

getRowPosition

public int getRowPosition(int row)

getRowPositionCount

public int getRowPositionCount()

getColumnSelection

public BooleanColumn getColumnSelection()
Returns the columnSelection.

Returns:
BooleanColumn

setColumnSelection

public boolean setColumnSelection(BooleanColumn columnSelection)
Sets the columnSelection.

Parameters:
columnSelection - The columnSelection to set
Returns:
true if the column has been set.

getColumnFilter

public FilterColumn getColumnFilter()
Returns the columnFilter.

Returns:
FilterColumn

setColumnFilter

public boolean setColumnFilter(FilterColumn columnFilter)
Sets the columnFilter.

Parameters:
columnFilter - The columnFilter to set
Returns:
true if the column has been set.

isColumnFiltered

public boolean isColumnFiltered(int column)
Returns true if the specified column is filtered.

Parameters:
column - the column.
Returns:
true if the column is filtered.

getColumnPermutation

public Permutation getColumnPermutation()
Returns the column permutation.

Returns:
the column permutation.

setColumnPermutation

public void setColumnPermutation(Permutation perm)
Sets the column permutation.

Parameters:
perm - the permutation to set

columnIterator

public RowIterator columnIterator()
Returns an iterator over the permuted columns.

Returns:
an iterator over the permuted columns.

getColumnPosition

public int getColumnPosition(int col)
Returns the position of the specified column or -1 if it is hidden.

Parameters:
col - the column.
Returns:
the position of the specified column or -1 if it is hidden.

getColumnPositionCount

public int getColumnPositionCount()
Returns the count of visible column positions.

Returns:
the count of visible column positions.

isSquared

public boolean isSquared()
Returns the squared.

Returns:
boolean

setSquared

public void setSquared(boolean squared)
Sets the squared.

Parameters:
squared - The squared to set

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener


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