public class AggregateTable extends VisualTable
| Modifier and Type | Class and Description |
|---|---|
protected class |
AggregateTable.AggregatedIterator
Iterator instance that iterates over the items contained in an aggregate.
|
Table.ColumnEntry| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
AGGREGATE |
protected static Schema |
AGGREGATED_SCHEMA |
protected Table |
m_aggregated
Table storing the 1->Many aggregation mappings
|
protected static java.lang.String |
MEMBER |
protected static java.lang.String |
MEMBER_HASH |
m_colFilter, m_listener, m_parent, m_pnames, m_rowFilterm_columns, m_entries, m_lastCol, m_listeners, m_modCount, m_names, m_rows, m_schema, m_tuplesEMPTY_ARRAY| Constructor and Description |
|---|
AggregateTable(Visualization vis,
java.lang.String group)
Create a new AggregateTable.
|
AggregateTable(Visualization vis,
java.lang.String group,
Schema schema)
Create a new AggregateTable.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToAggregate(int row,
VisualItem member)
Add an item to the aggregation at the given row.
|
boolean |
aggregateContains(int row,
VisualItem member)
Indicates if an item is a member of the aggregate at the given row
|
java.util.Iterator |
aggregatedTuples(int row)
Get all VisualItems within the aggregate at the given table row.
|
protected void |
clearAggregateMappings(int row,
boolean update)
Clears all aggregates mappings for the aggregate at the given row,
optionally issuing a table update.
|
protected void |
fireTableEvent(int row0,
int row1,
int col,
int type)
Clear all aggregate mappings for a row when it is deleted.
|
protected int |
getAggregatedRow(int row,
VisualItem member)
Get the row index to the aggregate mapping table for the given
aggregate and contained VisualItem.
|
java.util.Iterator |
getAggregates(Tuple t)
Get an iterator over all AggregateItems that contain the given Tuple.
|
int |
getAggregateSize(int row)
Get the size of the aggregate represented at the given table row.
|
protected int |
getHashCode(Tuple t)
Get a hashcode that uniquely identifies a particular tuple
|
void |
removeAllFromAggregate(int row)
Remove all items contained in the aggregate at the given row
|
void |
removeFromAggregate(int row,
VisualItem member)
Remove an item from the aggregation at the given row
|
protected boolean |
validRowCheck(int row,
boolean throwException)
Check a row for validity, optionally throwing an exception when an
invalid row is found.
|
addItem, getBounds, getDOI, getEndFillColor, getEndFont, getEndSize, getEndStrokeColor, getEndTextColor, getEndX, getEndY, getFillColor, getFont, getGroup, getItem, getShape, getSize, getStartFillColor, getStartFont, getStartSize, getStartStrokeColor, getStartTextColor, getStartX, getStartY, getStroke, getStrokeColor, getTextColor, getVisualization, getX, getY, init, isEndVisible, isExpanded, isFixed, isHighlighted, isHover, isInteractive, isStartVisible, isValidated, isVisible, setBounds, setDOI, setEndFillColor, setEndFont, setEndSize, setEndStrokeColor, setEndTextColor, setEndVisible, setEndX, setEndY, setExpanded, setFillColor, setFixed, setFont, setGroup, setHighlighted, setHover, setInteractive, setShape, setSize, setStartFillColor, setStartFont, setStartSize, setStartStrokeColor, setStartTextColor, setStartVisible, setStartX, setStartY, setStroke, setStrokeColor, setTextColor, setValidated, setVisible, setVisualization, setX, setYaddCascadedRow, addRow, addRows, filterColumns, filterRows, getChildRow, getColumn, getColumnCount, getColumnName, getColumnNames, getColumnNumber, getColumnProjection, getLocalColumnCount, getParentRow, getParentTable, getRowFilter, hasColumn, invalidateSchema, removeCascadedRow, removeRow, setColumnProjection, setRowFilteraddColumn, addColumn, addColumn, addColumn, addColumn, addConstantColumn, addTableListener, addTuple, canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSet, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, clear, columnChanged, columnChanged, columnChanged, columnChanged, columnChanged, columnChanged, columnChanged, containsTuple, get, get, getBoolean, getBoolean, getColumn, getColumnNumber, getColumnRow, getColumns, getColumnType, getColumnType, getDate, getDate, getDefault, getDouble, getDouble, getFloat, getFloat, getIndex, getIndex, getInt, getInt, getLong, getLong, getMaximumRow, getMetadata, getMinimumRow, getModificationCount, getRowCount, getSchema, getString, getString, getTableRow, getTuple, getTupleCount, handleColumnChanged, index, isAddColumnSupported, isCellEditable, isValidRow, iterator, iterator, rangeSortedBy, rangeSortedBy, rangeSortedBy, rangeSortedBy, rangeSortedBy, remove, removeAllTableListeners, removeColumn, removeColumn, removeColumn, removeIndex, removeTableListener, removeTuple, renumberColumns, revertToDefault, rows, rows, rows, rowsSortedBy, select, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString, setTuple, setTupleManager, toString, tuples, tuples, tuplesReversed, updateRowCountaddColumns, addPropertyChangeListener, addPropertyChangeListener, addTupleSetListener, fireTupleEvent, fireTupleEvent, fireTupleEvent, getClientProperty, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTupleSetListener, tuples, tuplesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddColumn, addColumn, addColumn, addColumn, addColumns, addPropertyChangeListener, addPropertyChangeListener, addTuple, addTupleSetListener, clear, containsTuple, getClientProperty, getTupleCount, isAddColumnSupported, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTuple, removeTupleSetListener, setTuple, tuples, tuples, tuplesprotected Table m_aggregated
protected static final java.lang.String AGGREGATE
protected static final java.lang.String MEMBER_HASH
protected static final java.lang.String MEMBER
protected static final Schema AGGREGATED_SCHEMA
public AggregateTable(Visualization vis, java.lang.String group)
vis - the Visualization associated with the tablegroup - the data group the table contents belongs topublic AggregateTable(Visualization vis, java.lang.String group, Schema schema)
vis - the Visualization associated with the tablegroup - the data group the table contents belongs toschema - the Schema to use for this tablepublic int getAggregateSize(int row)
public void addToAggregate(int row,
VisualItem member)
row - the row index of the aggregatemember - the item to add to the aggregationpublic void removeFromAggregate(int row,
VisualItem member)
row - the row index of the aggregatemember - the item to remove from the aggregationpublic void removeAllFromAggregate(int row)
row - the row index of the aggregateprotected void clearAggregateMappings(int row,
boolean update)
row - the table row of the aggregateupdate - indicates whether or not to fire a table updatepublic boolean aggregateContains(int row,
VisualItem member)
row - the table row of the aggregatemember - the item to check from containmentprotected int getAggregatedRow(int row,
VisualItem member)
row - the table row of the aggregatemember - the VisualItem to look uppublic java.util.Iterator aggregatedTuples(int row)
row - the table row of the aggregatepublic java.util.Iterator getAggregates(Tuple t)
t - the input tupleprotected int getHashCode(Tuple t)
t - the tuple to compute the hash forprotected boolean validRowCheck(int row,
boolean throwException)
row - the row to checkthrowException - indicates if an exception should be thrown when an
invalid row is encounteredprotected void fireTableEvent(int row0,
int row1,
int col,
int type)
fireTableEvent in class VisualTablerow0 - 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.