Package org.jlab.utils.groups
Class IndexedTable
java.lang.Object
javax.swing.table.AbstractTableModel
javax.swing.table.DefaultTableModel
org.jlab.utils.groups.IndexedTable
- All Implemented Interfaces:
Serializable,TableModel
- Direct Known Subclasses:
CalibrationConstants
- Author:
- gavalian
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classinternal class used for cell renderingstatic classclass -
Field Summary
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVectorFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionIndexedTable(int indexCount) IndexedTable(int indexCount, String format) IndexedTable(int indexCount, String[] format) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConstraint(int column, double min, double max) voidaddConstraint(int column, double min, double max, int condition, int condValue) voidaddEntry(int... index) voidaddEntryFromString(String[] values) intgetColumnName(int col) Interface classes for Table ModeldoublegetDoubleValue(String item, int... index) intgetIntValue(String item, int... index) getList()getNamedEntry(int... index) intgetValueAt(int row, int column) booleanhasEntry(int... index) booleanisCellEditable(int row, int column) booleanisValid(int row, int column) Checks the array of row constraints to see if it passes the cut.voidsetDoubleValue(Double value, String item, int... index) final voidsetIndexName(int index, String name) voidsetIntValue(Integer value, String item, int... index) voidsetPrecision(Integer precision) voidshow()toString()Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAtMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
IndexedTable
public IndexedTable(int indexCount) -
IndexedTable
-
IndexedTable
-
-
Method Details
-
setPrecision
-
hasEntry
public boolean hasEntry(int... index) -
setIndexName
-
addEntry
public void addEntry(int... index) -
addConstraint
public void addConstraint(int column, double min, double max) -
addConstraint
public void addConstraint(int column, double min, double max, int condition, int condValue) -
setIntValue
-
setDoubleValue
-
getIntValue
-
getDoubleValue
-
getNamedEntry
-
getList
-
addEntryFromString
-
show
public void show() -
toString
-
isValid
public boolean isValid(int row, int column) Checks the array of row constraints to see if it passes the cut. this method is used by CellRenderer.- Parameters:
row-column-- Returns:
-
getColumnName
Interface classes for Table Model- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classDefaultTableModel- Parameters:
col-- Returns:
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceTableModel- Overrides:
getColumnCountin classDefaultTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column) - Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classDefaultTableModel
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceTableModel- Overrides:
getRowCountin classDefaultTableModel
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel- Overrides:
getValueAtin classDefaultTableModel
-