| java.lang.Object com.xoetrope.swing.table.XTableModelAdapter
XTableModelAdapter | public class XTableModelAdapter implements TableModel(Code) | | A TableModel which uses an XModel as the storage for an XBaseTable
Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
the GNU Public License (GPL), please see license.txt for more details. If
you make commercial use of this software you must purchase a commercial
license from Xoetrope.
$Revision: 1.9 $
|
disabledColumns | protected boolean disabledColumns(Code) | | |
editable | protected boolean editable(Code) | | |
modelListener | protected XModelListener modelListener(Code) | | |
modelrootModel | protected XModel modelrootModel(Code) | | |
XTableModelAdapter | public XTableModelAdapter(XModel newModel)(Code) | | |
XTableModelAdapter | public XTableModelAdapter(XModel newModel, XModelListener listener)(Code) | | |
addTableModelListener | public void addTableModelListener(TableModelListener l)(Code) | | Adds a listener to the list that is notified each time a change
to the data model occurs.
Parameters: l - the TableModelListener |
getColumnClass | public Class getColumnClass(int columnIndex)(Code) | | Returns the most specific superclass for all the cell values
in the column. This is used by the JTable to set up a
default renderer and editor for the column.
Parameters: columnIndex - the index of the column the common ancestor class of the object values in the model. |
getColumnCount | public int getColumnCount()(Code) | | Returns the number of columns in the model. A
JTable uses this method to determine how many columns it
should create and display by default.
the number of columns in the model See Also: XTableModelAdapter.getRowCount |
getColumnName | public String getColumnName(int columnIndex)(Code) | | Returns the name of the column at columnIndex . This is used
to initialize the table's column header name. Note: this name does
not need to be unique; two columns in a table can have the same name.
Parameters: columnIndex - the index of the column the name of the column |
getComponent | public Component getComponent()(Code) | | Get the editor component
the component instance |
getModel | public XModel getModel()(Code) | | |
getModelAt | public Object getModelAt(int rowIndex, int columnIndex)(Code) | | Get the model value
Parameters: rowIndex - the row index Parameters: columnIndex - the column index |
getModelAt | public Object getModelAt(int rowIndex)(Code) | | Get the model for the specified row
Parameters: rowIndex - the row index the model value |
getRowCount | public int getRowCount()(Code) | | Returns the number of rows in the model. A
JTable uses this method to determine how many rows it
should display. This method should be quick, as it
is called frequently during rendering.
the number of rows in the model See Also: XTableModelAdapter.getColumnCount |
getValueAt | public Object getValueAt(int rowIndex, int columnIndex)(Code) | | Returns the value for the cell at columnIndex and
rowIndex .
Parameters: rowIndex - the row whose value is to be queried Parameters: columnIndex - the column whose value is to be queried the value Object at the specified cell |
init | public void init(XModelListener listener)(Code) | | |
isCellEditable | public boolean isCellEditable(int rowIndex, int columnIndex)(Code) | | Returns true if the cell at rowIndex and
columnIndex
is editable. Otherwise, setValueAt on the cell will not
change the value of that cell. The cell is editable if its 'edit' attribute
is 'true'
Parameters: rowIndex - the row whose value to be queried Parameters: columnIndex - the column whose value to be queried true if the cell is editable See Also: XTableModelAdapter.setValueAt |
removeTableModelListener | public void removeTableModelListener(TableModelListener l)(Code) | | Removes a listener from the list that is notified each time a
change to the data model occurs.
Parameters: l - the TableModelListener |
setCellEditable | public void setCellEditable(boolean state)(Code) | | Set the editable state of the cell
Parameters: state - the new editable state |
setColumnEnabled | public void setColumnEnabled(int col, boolean enabled)(Code) | | Set the enabled state of the column
Parameters: col - the column index Parameters: enabled - the new enabled state |
setComponent | public void setComponent(Component comp)(Code) | | Set the editor component
Parameters: the - component instance |
setModelListener | public void setModelListener(XModelListener listener)(Code) | | |
setValueAt | public void setValueAt(Object aValue, int rowIndex, int columnIndex)(Code) | | Sets the value in the cell at columnIndex and
rowIndex to aValue .
Parameters: aValue - the new value Parameters: rowIndex - the row whose value is to be changed Parameters: columnIndex - the column whose value is to be changed See Also: XTableModelAdapter.getValueAt See Also: XTableModelAdapter.isCellEditable |
|
|