|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprefuse.data.tuple.AbstractTupleSet<T>
prefuse.data.Table<C>
prefuse.data.CascadedTable<T,C>
prefuse.visual.VisualTable<T,C>
public abstract class VisualTable<T extends Tuple<?>,C extends VisualItem<?>>
A visual abstraction of a Table data structure. Serves as a backing table for VisualItem tuples.
VisualTable derives from CascadedTable, so can inherit another table's values. Commonly, a
VisualTable is used to take a raw data table and "strap" visual properties on top of it.
VisualTables should not be created directly, they are created automatically by adding data to a
Visualization, for example by using the Visualization.addTable(String, Table)
method.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class prefuse.data.Table |
---|
Table.ColumnEntry |
Field Summary |
---|
Fields inherited from class prefuse.data.CascadedTable |
---|
m_colFilter, m_listener, m_parent, m_pnames, m_rowFilter |
Fields inherited from class prefuse.data.Table |
---|
m_columns, m_entries, m_lastCol, m_listeners, m_modCount, m_names, m_rows, m_schema, m_tuples |
Fields inherited from interface prefuse.data.tuple.TupleSet |
---|
EMPTY_ARRAY |
Constructor Summary | |
---|---|
VisualTable(Table<T> parent,
Visualization vis,
java.lang.String group)
Create a new VisualTable. |
|
VisualTable(Table<T> parent,
Visualization vis,
java.lang.String group,
Predicate rowFilter)
Create a new VisualTable. |
|
VisualTable(Table<T> parent,
Visualization vis,
java.lang.String group,
Predicate rowFilter,
Schema schema)
Create a new VisualTable. |
|
VisualTable(Visualization vis,
java.lang.String group)
Create a new VisualTable without a parent table. |
|
VisualTable(Visualization vis,
java.lang.String group,
Schema schema)
Create a new VisualTable without a parent table. |
Method Summary | ||
---|---|---|
C |
addItem()
Add a new row to the table and return the VisualItem for that row. |
|
static
|
createVisualTable(Table<T> parent,
Visualization vis,
java.lang.String group)
|
|
static
|
createVisualTable(Table<T> parent,
Visualization vis,
java.lang.String group,
Predicate rowFilter)
|
|
static
|
createVisualTable(Table<T> parent,
Visualization vis,
java.lang.String group,
Predicate rowFilter,
Schema schema)
|
|
static VisualTable<TableVisualItem<?>,TableVisualItem<?>> |
createVisualTable(Visualization vis,
java.lang.String group)
|
|
static VisualTable<TableVisualItem<?>,TableVisualItem<?>> |
createVisualTable(Visualization vis,
java.lang.String group,
Schema schema)
|
|
protected void |
fireTableEvent(int row0,
int row1,
int col,
int type)
Relay table events. |
|
java.awt.geom.Rectangle2D |
getBounds(int row)
Returns the bounds for the VisualItem at the given row index. |
|
double |
getDOI(int row)
Get the degree-of-interest (DOI) value. |
|
int |
getEndFillColor(int row)
Get the ending fill color of the row. |
|
java.awt.Font |
getEndFont(int row)
Get the ending font for the row. |
|
double |
getEndSize(int row)
Get the ending size value of the row. |
|
int |
getEndStrokeColor(int row)
Get the ending stroke color of the row. |
|
int |
getEndTextColor(int row)
Get the ending text color of the row. |
|
double |
getEndX(int row)
Get the ending x-coordinate of the given row. |
|
double |
getEndY(int row)
Get the ending y-coordinate of the given row. |
|
int |
getFillColor(int row)
Get the current fill color of the row. |
|
java.awt.Font |
getFont(int row)
Get the current font for the row. |
|
java.lang.String |
getGroup()
Get the visualization data group name for this table |
|
C |
getItem(int row)
Get the VisualItem for the given table row. |
|
ShapeBuilder |
getShapeBuilder(int row)
Get the current shape builder of the row. |
|
double |
getSize(int row)
Get the current size value of the row. |
|
int |
getStartFillColor(int row)
Get the starting fill color of the row. |
|
java.awt.Font |
getStartFont(int row)
Get the starting font for the row. |
|
double |
getStartSize(int row)
Get the starting size value of the row. |
|
int |
getStartStrokeColor(int row)
Get the starting stroke color of the row. |
|
int |
getStartTextColor(int row)
Get the starting text color of the row. |
|
double |
getStartX(int row)
Get the starting x-coordinate of the given row. |
|
double |
getStartY(int row)
Get the starting y-coordinate of the given row. |
|
java.awt.BasicStroke |
getStroke(int row)
Get the current stroke used to draw lines and shape outlines for the item at the given row. |
|
int |
getStrokeColor(int row)
Get the current stroke color of the row. |
|
int |
getTextColor(int row)
Get the current text color of the row. |
|
Visualization |
getVisualization()
Get the Visualization associated with this VisualTupleSet. |
|
double |
getX(int row)
Get the current x-coordinate of the given row. |
|
double |
getY(int row)
Get the current y-coordinate of the given row. |
|
protected void |
init(Visualization vis,
java.lang.String group,
Schema schema)
Initialize this VisualTable |
|
boolean |
isEndVisible(int row)
Indictes if the end visible flag is set to true. |
|
boolean |
isExpanded(int row)
Indicates the given row is expanded. |
|
boolean |
isFixed(int row)
Indicates if the given row is fixed, and so will not have its position changed by any layout or distortion actions. |
|
boolean |
isHighlighted(int row)
Indicates if the given row is highlighted. |
|
boolean |
isHover(int row)
Indicates if the given row currently has the mouse pointer over it. |
|
boolean |
isInteractive(int row)
Indicates if this item is interactive, meaning it can potentially respond to mouse and keyboard input events. |
|
boolean |
isStartVisible(int row)
Indicates if the start visible flag is set to true. |
|
boolean |
isValidated(int row)
Indicates if the given row is currently validated. |
|
boolean |
isVisible(int row)
Indicates if the given row is currently set to be visible. |
|
void |
setBounds(int row,
double x,
double y,
double w,
double h)
Set the bounding box for an item. |
|
void |
setDOI(int row,
double doi)
Set the degree-of-interest (DOI) value. |
|
void |
setEndFillColor(int row,
int color)
Set the ending fill color of the row. |
|
void |
setEndFont(int row,
java.awt.Font font)
Set the ending font for the row. |
|
void |
setEndSize(int row,
double size)
Set the ending size value of the row. |
|
void |
setEndStrokeColor(int row,
int color)
Set the ending stroke color of the row. |
|
void |
setEndTextColor(int row,
int color)
Set the ending text color of the row. |
|
void |
setEndVisible(int row,
boolean value)
Set the end visible flag. |
|
void |
setEndX(int row,
double x)
Set the ending x-coordinate of the given row. |
|
void |
setEndY(int row,
double y)
Set the ending y-coordinate of the given row. |
|
void |
setExpanded(int row,
boolean value)
Set the expanded flag. |
|
void |
setFillColor(int row,
int color)
Set the current fill color of the row. |
|
void |
setFixed(int row,
boolean value)
Sets if the given row is fixed in its position. |
|
void |
setFont(int row,
java.awt.Font font)
Set the current font for the the row. |
|
void |
setGroup(java.lang.String group)
Set the visualization data group name for this table |
|
void |
setHighlighted(int row,
boolean value)
Set the highlighted status of the given row. |
|
void |
setHover(int row,
boolean value)
Set the hover flag. |
|
void |
setInteractive(int row,
boolean value)
Set the interactive status of the given row. |
|
void |
setShapeBuilder(int row,
ShapeBuilder shapeBuilder)
Set the current shape value of the row. |
|
void |
setSize(int row,
double size)
Set the current size value of the row. |
|
void |
setStartFillColor(int row,
int color)
Set the starting fill color of the row. |
|
void |
setStartFont(int row,
java.awt.Font font)
Set the starting font for the row. |
|
void |
setStartSize(int row,
double size)
Set the starting size value of the row. |
|
void |
setStartStrokeColor(int row,
int color)
Set the starting stroke color of the row. |
|
void |
setStartTextColor(int row,
int color)
Set the starting text color of the row. |
|
void |
setStartVisible(int row,
boolean value)
Set the start visible flag. |
|
void |
setStartX(int row,
double x)
Set the starting x-coordinate of the given row. |
|
void |
setStartY(int row,
double y)
Set the starting y-coordinate of the given row. |
|
void |
setStroke(int row,
java.awt.BasicStroke stroke)
Set the current stroke used to draw lines and shape outlines. |
|
void |
setStrokeColor(int row,
int color)
Set the current stroke color of the row. |
|
void |
setTextColor(int row,
int color)
Set the current text color of the row. |
|
void |
setValidated(int row,
boolean value)
Set the given row's validated flag. |
|
void |
setVisible(int row,
boolean value)
Set the given row's visibility. |
|
void |
setVisualization(Visualization vis)
Set the visualization associated with this VisualTable |
|
void |
setX(int row,
double x)
Set the current x-coordinate of the given row. |
|
void |
setY(int row,
double y)
Set the current y-coordinate of the given row. |
Methods inherited from class prefuse.data.tuple.AbstractTupleSet |
---|
addColumns, addPropertyChangeListener, addPropertyChangeListener, addTupleSetListener, fireTupleEvent, fireTupleEvent, fireTupleEvent, getClientProperty, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTupleSetListener, tuples, tuples |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface prefuse.data.tuple.TupleSet |
---|
addColumn, addColumn, addColumn, addColumn, addColumns, addPropertyChangeListener, addPropertyChangeListener, addTuple, addTupleSetListener, clear, containsTuple, getClientProperty, getTupleCount, isAddColumnSupported, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTuple, removeTupleSetListener, setTuple, tuples, tuples, tuples |
Constructor Detail |
---|
public VisualTable(Table<T> parent, Visualization vis, java.lang.String group)
parent
- the parent table whose values this table should inheritvis
- the Visualization associated with this tablegroup
- the data group of this tablepublic VisualTable(Table<T> parent, Visualization vis, java.lang.String group, Predicate rowFilter)
parent
- the parent table whose values this table should inheritvis
- the Visualization associated with this tablegroup
- the data group of this tablerowFilter
- a predicate determining which rows of the parent table should be inherited by this
table and which should be filtered outpublic VisualTable(Table<T> parent, Visualization vis, java.lang.String group, Predicate rowFilter, Schema schema)
parent
- the parent table whose values this table should inheritvis
- the Visualization associated with this tablegroup
- the data group of this tablerowFilter
- a predicate determining which rows of the parent table should be inherited by this
table and which should be filtered outschema
- the data schema to use for the table's local columnspublic VisualTable(Visualization vis, java.lang.String group)
vis
- the Visualization associated with this tablegroup
- the data group of this tablepublic VisualTable(Visualization vis, java.lang.String group, Schema schema)
vis
- the Visualization associated with this tablegroup
- the data group of this tableschema
- the data schema to use for the table's local columnsMethod Detail |
---|
public static <T extends Tuple<?>> VisualTable<T,TableVisualItem<?>> createVisualTable(Table<T> parent, Visualization vis, java.lang.String group)
public static <T extends Tuple<?>> VisualTable<T,TableVisualItem<?>> createVisualTable(Table<T> parent, Visualization vis, java.lang.String group, Predicate rowFilter)
public static <T extends Tuple<?>> VisualTable<T,TableVisualItem<?>> createVisualTable(Table<T> parent, Visualization vis, java.lang.String group, Predicate rowFilter, Schema schema)
public static VisualTable<TableVisualItem<?>,TableVisualItem<?>> createVisualTable(Visualization vis, java.lang.String group)
public static VisualTable<TableVisualItem<?>,TableVisualItem<?>> createVisualTable(Visualization vis, java.lang.String group, Schema schema)
protected void init(Visualization vis, java.lang.String group, Schema schema)
vis
- the Visualization associated with this tablegroup
- the data group of this tableschema
- the data schema to use for the table's local columnsprotected void fireTableEvent(int row0, int row1, int col, int type)
fireTableEvent
in class Table<C extends VisualItem<?>>
row0
- the starting row of the modified rangerow1
- the ending row (inclusive) of the modified rangecol
- the number of the column modified, or
EventConstants.ALL_COLUMNS
for operations
effecting all columns.type
- the table modification type, one of
EventConstants.INSERT
,
EventConstants.DELETE
, or
EventConstants.UPDATE
.public Visualization getVisualization()
VisualTupleSet
getVisualization
in interface VisualTupleSet<C extends VisualItem<?>>
VisualTupleSet.getVisualization()
public void setVisualization(Visualization vis)
vis
- the visualization to setpublic java.lang.String getGroup()
getGroup
in interface VisualTupleSet<C extends VisualItem<?>>
public void setGroup(java.lang.String group)
group
- the data group name for this tablepublic C getItem(int row)
row
- a table row index
public C addItem()
public boolean isValidated(int row)
row
- the table row
public void setValidated(int row, boolean value)
row
- the table row to setvalue
- the value of the validated flag to set.public boolean isVisible(int row)
row
- the table row
public void setVisible(int row, boolean value)
row
- the table row to setvalue
- true to make the item visible, false otherwise.public boolean isStartVisible(int row)
row
- the table row
public void setStartVisible(int row, boolean value)
row
- the table row to setvalue
- true to set the start visible flag, false otherwisepublic boolean isEndVisible(int row)
row
- the table row
public void setEndVisible(int row, boolean value)
row
- the table row to setvalue
- true to set the end visible flag, false otherwisepublic boolean isInteractive(int row)
row
- the table row
public void setInteractive(int row, boolean value)
row
- the table row to setvalue
- true for interactive, false for non-interactivepublic boolean isExpanded(int row)
row
- the table row
public void setExpanded(int row, boolean value)
row
- the table row to setvalue
- true to set as expanded, false as collapsed.public boolean isFixed(int row)
row
- the table row
public void setFixed(int row, boolean value)
row
- the table row to setvalue
- true to fix the item, false otherwisepublic boolean isHighlighted(int row)
row
- the table row
public void setHighlighted(int row, boolean value)
ColorAction
might assign colors based on the flag).
row
- the table row to setvalue
- true to highlight the item, false for no highlighting.public boolean isHover(int row)
row
- the table row
public void setHover(int row, boolean value)
row
- the table row to setvalue
- true to set the hover flag, false otherwisepublic double getX(int row)
row
- the table row
public void setX(int row, double x)
row
- the table row to setx
- the new current x-coordinatepublic double getY(int row)
row
- the table row
public void setY(int row, double y)
row
- the table row to sety
- the new current y-coordinatepublic double getStartX(int row)
row
- the table row
public void setStartX(int row, double x)
row
- the table row to setx
- the new starting x-coordinatepublic double getStartY(int row)
row
- the table row
public void setStartY(int row, double y)
row
- the table row to sety
- the new starting y-coordinatepublic double getEndX(int row)
row
- the table row
public void setEndX(int row, double x)
row
- the table row to setx
- the new ending x-coordinatepublic double getEndY(int row)
row
- the table row
public void setEndY(int row, double y)
row
- the table row to sety
- the new ending y-coordinatepublic java.awt.geom.Rectangle2D getBounds(int row)
row
- the table row
public void setBounds(int row, double x, double y, double w, double h)
row
- the table row to setx
- the minimum x-coordinatey
- the minimum y-coordinatew
- the width of this itemh
- the height of this itemVisualItem.BOUNDS
public int getStrokeColor(int row)
row
- the table row
ColorLib
public void setStrokeColor(int row, int color)
row
- the table row to setcolor
- the current stroke color, represented as an integerColorLib
public int getStartStrokeColor(int row)
row
- the table row
ColorLib
public void setStartStrokeColor(int row, int color)
row
- the table row to setcolor
- the starting stroke color, represented as an integerColorLib
public int getEndStrokeColor(int row)
row
- the table row
ColorLib
public void setEndStrokeColor(int row, int color)
row
- the table row to setcolor
- the ending stroke color, represented as an integerColorLib
public int getFillColor(int row)
row
- the table row
ColorLib
public void setFillColor(int row, int color)
row
- the table row to setcolor
- the current fill color, represented as an integerColorLib
public int getStartFillColor(int row)
row
- the table row
ColorLib
public void setStartFillColor(int row, int color)
row
- the table row to setcolor
- the starting fill color, represented as an integerColorLib
public int getEndFillColor(int row)
row
- the table row
ColorLib
public void setEndFillColor(int row, int color)
row
- the table row to setcolor
- the ending fill color, represented as an integerColorLib
public int getTextColor(int row)
row
- the table row
ColorLib
public void setTextColor(int row, int color)
row
- the table row to setcolor
- the current text color, represented as an integerColorLib
public int getStartTextColor(int row)
row
- the table row
ColorLib
public void setStartTextColor(int row, int color)
row
- the table row to setcolor
- the starting text color, represented as an integerColorLib
public int getEndTextColor(int row)
row
- the table row
ColorLib
public void setEndTextColor(int row, int color)
row
- the table row to setcolor
- the ending text color, represented as an integerColorLib
public double getSize(int row)
row
- the table row
public void setSize(int row, double size)
row
- the table row to setsize
- the current size valuepublic double getStartSize(int row)
row
- the table row
public void setStartSize(int row, double size)
row
- the table row to setsize
- the starting size valuepublic double getEndSize(int row)
row
- the table row
public void setEndSize(int row, double size)
row
- the table row to setsize
- the ending size valuepublic ShapeBuilder getShapeBuilder(int row)
ShapeRenderer
.
row
- the table row
public void setShapeBuilder(int row, ShapeBuilder shapeBuilder)
ShapeRenderer
.
row
- the table row to setshapeBuilder
- the ShapeBuilder to usepublic java.awt.BasicStroke getStroke(int row)
public void setStroke(int row, java.awt.BasicStroke stroke)
stroke
- the stroke to use to draw lines and shape outlinespublic java.awt.Font getFont(int row)
row
- the table row
public void setFont(int row, java.awt.Font font)
row
- the table row to setfont
- the current font valuepublic java.awt.Font getStartFont(int row)
row
- the table row
public void setStartFont(int row, java.awt.Font font)
row
- the table row to setfont
- the starting font valuepublic java.awt.Font getEndFont(int row)
row
- the table row
public void setEndFont(int row, java.awt.Font font)
row
- the table row to setfont
- the ending font valuepublic double getDOI(int row)
row
- the table row
public void setDOI(int row, double doi)
row
- the table row to setdoi
- the DOI value of this item
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |