Package hec.util
Class GeneralTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
rma.swing.table.AbstractRmaTableModel
rma.swing.table.RmaTableModel
hec.util.GeneralTableModel
- All Implemented Interfaces:
Serializable
,TableModel
,RmaTableModelInterface
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class rma.swing.table.RmaTableModel
RmaTableModel.IntContainer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected boolean
protected Vector
protected String[]
Fields inherited from class rma.swing.table.RmaTableModel
colParamId, rows, UNDEF_COLUMN_UNIT_SYSTEM
Fields inherited from class rma.swing.table.AbstractRmaTableModel
m_columnNames, m_displayUnitSystem, m_gmtOffset, m_unitSystem
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
Fields inherited from interface rma.swing.table.RmaTableModelInterface
UNDEF_COLUMN_PARAM_ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRow
(int row) getColumnClass
(int column) int
Returns the number of columns represented by this model.getColumnName
(int column) boolean
boolean
int
Returns the number of row in the table model.getRows()
getValueAt
(int row, int column) Returns the value at a given row/column location.boolean
isCellEditable
(int row, int column) void
moveRowDown
(int row) void
moveRowUp
(int row) void
removeRow
(int row) boolean
replace
(String findStr, String replaceStr, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean caseSensitive, boolean down, Dimension rowCol) boolean
replaceAll
(String findStr, String replaceStr, int firstColumn, int firstRow, boolean wholeWordOnly, boolean caseSensitive) boolean
search
(String findStr, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean caseSensitive, boolean down, Dimension rowCol) protected boolean
searchReplace
(String findStr, String replaceStr, boolean replace, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean caseSensitive, boolean down, Dimension rowCol) void
setColumnNames
(String[] columnNames) void
setDataChanged
(boolean dataChanged) void
setEditable
(boolean editable) void
void
setValueAt
(Object object, int row, int column) Methods inherited from class rma.swing.table.RmaTableModel
addColumn, addColumn, addRow, addRow, clearAll, clearNonEditableCells, deleteRow, getColumnParameter, getDataVector, getGmtOffset, getModel, getRow, insertRow, insertRows, load, newRowsAdded, removeColumn, resetRowEnabled, save, setCellEnabled, setColEnabled, setColumnClass, setColumnName, setColumnNames, setColumnParameters, setGmtOffset, setRowEnabled, setUnitSystem
Methods inherited from class rma.swing.table.AbstractRmaTableModel
getDisplayUnitSystem, getUnitSystem, setDisplayUnitsSystem
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface rma.swing.table.RmaTableModelInterface
getUnitSystem, setDisplayUnitsSystem
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, removeTableModelListener
-
Field Details
-
colNames
-
_rows
-
_dataChanged
protected boolean _dataChanged -
_editable
protected boolean _editable
-
-
Constructor Details
-
GeneralTableModel
-
GeneralTableModel
public GeneralTableModel()
-
-
Method Details
-
setEditable
public void setEditable(boolean editable) -
getEditable
public boolean getEditable() -
setColumnNames
- Specified by:
setColumnNames
in interfaceRmaTableModelInterface
- Overrides:
setColumnNames
in classRmaTableModel
-
getColumnCount
public int getColumnCount()Description copied from class:AbstractRmaTableModel
Returns the number of columns represented by this model. The number of columns is determined by the number of column labels assigned to this table model. If the array of column labels is null, 0 columns are held.- Specified by:
getColumnCount
in interfaceTableModel
- Overrides:
getColumnCount
in classRmaTableModel
-
getRowCount
public int getRowCount()Description copied from class:AbstractRmaTableModel
Returns the number of row in the table model. The default method always returns 0, so this method must be overridden to return a row count other than 0.- Specified by:
getRowCount
in interfaceTableModel
- Overrides:
getRowCount
in classRmaTableModel
- Returns:
- the row count.
-
setRows
-
getRows
-
getColumnClass
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classRmaTableModel
-
getValueAt
Description copied from class:AbstractRmaTableModel
Returns the value at a given row/column location. The default method returns null. Needs to be overrridden- Specified by:
getValueAt
in interfaceTableModel
- Overrides:
getValueAt
in classRmaTableModel
- Parameters:
row
- the row to look for the value in.column
- the column to look for the value in.
-
setValueAt
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classRmaTableModel
-
getColumnName
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classRmaTableModel
-
addRow
public void addRow(int row) -
removeRow
public void removeRow(int row) -
moveRowUp
public void moveRowUp(int row) -
moveRowDown
public void moveRowDown(int row) -
isCellEditable
public boolean isCellEditable(int row, int column) - Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classRmaTableModel
-
setDataChanged
public void setDataChanged(boolean dataChanged) -
getDataChanged
public boolean getDataChanged() -
search
-
replace
-
searchReplace
-
replaceAll
-