|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfovis.utils.ChangeManager
infovis.column.AbstractColumn
infovis.column.BasicColumn
infovis.column.BasicObjectColumn
infovis.column.ColumnColumn
infovis.table.DefaultTable
public class DefaultTable
Concrete Table.
Implements all the methods of Table managing a
Column of Columns
| Field Summary |
|---|
| Fields inherited from class infovis.column.AbstractColumn |
|---|
MODIFIED_ALL, MODIFIED_NONE |
| 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 | |
|---|---|
DefaultTable()
Creates a new DefaultTable object. |
|
| Method Summary | |
|---|---|
void |
addColumn(Column c)
Adds a column. |
void |
addTableModelListener(TableModelListener l)
|
void |
clear()
Removes all of the elements from this column. The Column will be empty after this call returns. WARNING: if there is an associated format that maintains a status, such as a CategoricalFormat, it
is not cleared so results may not be what you expected. The
CategoricalFormat can be cleared explicitely if
needed. |
void |
disableNotify()
Disables notification until enableNotify has been called. |
void |
enableNotify()
Re enable notifications, triggering eventListeners if modifications occur. |
void |
fireTableChanged(TableModelEvent e)
Forwards the given notification event to all TableModelListeners that registered
themselves as listeners for this table model. |
void |
fireTableDataChanged()
Notifies all listeners that all the table has changed. |
void |
fireTableDataChanged(int firstRow,
int lastRow,
int type)
Notifies all listeners that all cell values in the table's rows may have changed. |
void |
fireTableStructureChanged()
Notifies all listeners that the table's structure has changed. |
Column |
getColumn(String name)
Returns the column of a specified name. |
Column |
getColumnAt(int index)
Returns the column at a specified index. |
Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
Returns the number of columns of the table. |
String |
getColumnName(int columnIndex)
|
int |
getLastRow()
Returns the index of the last row in the table. |
Object |
getObjectFromRow(int row)
Returns an object from a row. |
int |
getRowCount()
Returns the number of rows in the table. |
int |
getRowFromObject(Object obj)
Returns a row from an object returned by getObjectFromRow. |
Table |
getTable()
Returns the real table for Proxies and this for a concrete table. |
Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
hasTableModelListener()
Returns true if the table has any registered TableModelListeners. |
int |
indexOf(Column column)
Returns the index of a specified column. |
int |
indexOf(String name)
Returns the index of a column of a specified name. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
static boolean |
isColumnInternal(Column col)
Test if the column is internal, i˙e˙ the first character of its name is a '#'. |
boolean |
isRowValid(int row)
Checks whether a specified row is valid. |
RowIterator |
iterator()
Returns a RowIterator over all the valid rows of this column. |
boolean |
removeColumn(Column c)
Removes a column from the table. |
void |
removeTableModelListener(TableModelListener l)
|
RowIterator |
reverseIterator()
Returns an iterator over the columns of this table in reverse order. |
void |
setColumnAt(int i,
Column c)
Replaces the column at a specified index. |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
TableModel method for editable tables. |
void |
stateChanged(ChangeEvent e)
Called when one of the column has changed to propagate the TableChanged notification. |
| Methods inherited from class infovis.column.ColumnColumn |
|---|
add, compare, compare, definedValue, fill, findColumn, get, getColumn, getColumn, getValueClass, set, setExtend |
| Methods inherited from class infovis.column.BasicObjectColumn |
|---|
add, capacity, compare, compareValues, ensureCapacity, fill, format, getObjectAt, getOrder, getValueAt, getValueReference, hasUndefinedValue, indexOf, isValueUndefined, parse, remove, remove, setExtend, setObjectAt, setOrder, setSize, setValueAt, setValueUndefined, size |
| Methods inherited from class infovis.column.BasicColumn |
|---|
addValue, addValueOrNull, firstValidRow, getClientProperty, getFormat, getMaxIndex, getMetadata, getMinIndex, getName, isEmpty, isInternal, lastValidRow, setFormat, setName, setValueOrNullAt, toString |
| Methods inherited from class infovis.column.AbstractColumn |
|---|
addChangeListener, computeValueMap, computeValueMap, equalObj, equals, getLastModifiedRow |
| Methods inherited from class infovis.utils.ChangeManager |
|---|
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, 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 |
|---|
public DefaultTable()
| Method Detail |
|---|
public int getColumnCount()
getColumnCount in interface TablegetColumnCount in interface TableModelpublic void clear()
CategoricalFormat, it
is not cleared so results may not be what you expected. The
CategoricalFormat can be cleared explicitely if
needed.
clear in interface Columnclear in interface Tableclear in class BasicObjectColumnpublic void addColumn(Column c)
addColumn in interface Tablec - the column.public Column getColumnAt(int index)
getColumnAt in interface Tableindex - the index.
public void setColumnAt(int i,
Column c)
setColumnAt in interface Tablei - the index.c - the column.public int indexOf(String name)
indexOf in interface Tablename - the name.
public int indexOf(Column column)
indexOf in interface Tablecolumn - the column
public void disableNotify()
This method is useful if a large number of modifications is going to happen on the column and notifying each time would be too time consuming. The notification will be deferred until enableNotify is called.
Calls to disableNotify can be nested
disableNotify in interface ColumndisableNotify in class ChangeManagerChangeManager.enableNotify()public void enableNotify()
enableNotify in interface ColumnenableNotify in class ChangeManagerChangeManager.disableNotify()public Column getColumn(String name)
getColumn in interface Tablename - the name.
public boolean removeColumn(Column c)
removeColumn in interface Tablec - the column.
true if the column has been removed.public RowIterator iterator()
iterator in interface Columniterator in class BasicColumnpublic RowIterator reverseIterator()
reverseIterator in interface Tablepublic Table getTable()
getTable in interface Tablepublic boolean isRowValid(int row)
isRowValid in interface Tablerow - the row.
true if it is.public String getColumnName(int columnIndex)
getColumnName in interface TableModelpublic int getRowCount()
getRowCount in interface TablegetRowCount in interface TableModelpublic int getLastRow()
getLastRow in interface Table
public Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface TableModel
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
TableModel method for editable tables.
setValueAt in interface TableModelaValue - value to assign to cellrowIndex - row of cellcolumnIndex - column of cellTableModel.setValueAt(Object, int, int)public Class getColumnClass(int columnIndex)
getColumnClass in interface TableModel
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelpublic static boolean isColumnInternal(Column col)
col - the column.
true
if the column is internal, i.e. the first character of its name is a '#'.public boolean hasTableModelListener()
TableModelListeners.
TableModelListeners.public Object getObjectFromRow(int row)
row - the row
public int getRowFromObject(Object obj)
obj - the object
public void addTableModelListener(TableModelListener l)
addTableModelListener in interface TableModelpublic void removeTableModelListener(TableModelListener l)
removeTableModelListener in interface TableModel
public void fireTableDataChanged(int firstRow,
int lastRow,
int type)
JTable should redraw the
table from scratch. The structure of the table (as in the order of the
columns) is assumed to be the same.
firstRow - the first row modified or NILlastRow - the last row modified or NILtype - the event typeTableModelEvent,
EventListenerList,
JTable.tableChanged(TableModelEvent)public void fireTableDataChanged()
public void fireTableStructureChanged()
JTable receives this event and its
autoCreateColumnsFromModel
flag is set it discards any table columns that it had and reallocates
default columns in the order they appear in the model. This is the
same as calling setModel(TableModel) on the
JTable.
TableModelEvent,
EventListenerListpublic void fireTableChanged(TableModelEvent e)
TableModelListeners that registered
themselves as listeners for this table model.
e - the event to be forwardedaddTableModelListener(javax.swing.event.TableModelListener),
TableModelEvent,
EventListenerListpublic void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListenere - the change event.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||