|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--javax.swing.table.DefaultTableModel | +--dyntable.AttributiveCellTableModel | +--dyntable.ProxyTableModel | +--dyntable.RowHeaderModel
$Id: RowHeaderModel.java,v 1.0 2005/09/25 jDynTable@gmx.de $
This RowHeaderModel is used to manage and manipulate the
row header of the EntityTable. For more information about the
row header see the RowHeaderColumnModel.
This RowHeaderModel provides methods to manage the virtual column and obtain
information about table columns and cells. It can enable or disable the virtual
column and set or query if row numbers or entity indices are displayed in the virtual
column. It can also access information from the EntityList and
EntityTableColumnModel, such as obtaining the value of a table cell, or
obtaining more information about a column in the table.
The virtual column is an extra column that appears before any normal
columns. It can be used to select rows, if row selection is enabled, and
to display usefull information about the row, such as the row number
or the row index.
Constructor Summary | |
---|---|
RowHeaderModel(int numOfInitialRows,
int numOfColumns)
Constructs a new RowHeaderModel. |
|
RowHeaderModel(dyntable.ProxyTableModel m)
Constructs a new RowHeaderModel using the given ProxyTableModel, which holds the EntityList and EntityTableColumnModel, which define the rows and the columns of the table respectively. |
Method Summary | |
---|---|
java.lang.Class |
getColumnClass(int p1)
Returns the column class of the column at the given index. |
int |
getColumnCount()
Returns the total number of columns in the table. |
EntityTableColumnModel |
getColumnModel()
Returns the column model which, represents the columns in the table and their properties. |
java.lang.String |
getColumnName(int p1)
Returns the name of the column at the specified index. |
EntityList |
getEntityList()
Returns the EntityList representing the data in the table. |
dyntable.ProxyTableModel |
getMainTableModel()
Returns the ProxyTableModel, which is the the model used for accessing table data. |
int |
getRowCount()
Returns the number of rows in the table. |
java.lang.Object |
getValueAt(int p1,
int p2)
Returns the value of the cell at the specified row and column. |
java.lang.Object |
getVirtualEntity()
Returns the entity which, represents the virtual row. |
boolean |
isCellEditable(int p1,
int p2)
Returns true if the column at the given index is editable, false otherwise. |
boolean |
isCellEditingEnabled()
Returns true if cell editing is enabled, false otherwise. |
boolean |
isEntityIndexDisplayed()
Returns true if the entity index is displayed, false otherwise. |
boolean |
isReadOnly()
Returns true if the table is read-only, false otherwise. |
boolean |
isRowNumberDisplayed()
Returns true if the row numbers are displayed in the virtual column, false otherwise. |
boolean |
isVirtualColumnEnabled()
Returns true if the virtual column is enabled, false otherwise. |
boolean |
isVirtualRowEnabled()
Returns true if the virtual row is displayed in the table, false otherwise. |
void |
listChanged(EntityListEvent e)
The list changed event handler. |
void |
refresh()
Updates the view to reflect any changes to the table structure or data. |
void |
revalidate()
Sets all the model properties and listeners again. |
void |
setCellEditingEnabled(boolean b)
Enables or disables cell editing. |
void |
setColumnModel(EntityTableColumnModel c)
Sets the column model which, represents the columns in the table and their properties. |
void |
setEntityIndexDisplayed(boolean d)
Enables or disables entity index display in the virtual column. |
void |
setEntityList(EntityList e)
Sets the EntityList which, represents the data in the table. |
void |
setMainTableModel(dyntable.ProxyTableModel m)
Sets the table model, which is the model used for accessing table data. |
void |
setReadOnly(boolean r)
Enables or disables editing of the table. |
void |
setRowNumberDisplayed(boolean d)
Enables or disables row number display in the virtual column. |
void |
setValueAt(java.lang.Object p1,
int p2,
int p3)
Sets the value of the cell at the given row and column. |
void |
setVirtualColumnEnabled(boolean v)
Enables or disables the virtual column. |
void |
setVirtualEntity(java.lang.Object v)
Sets the virtual entity to display to the user. |
void |
setVirtualRowEnabled(boolean v)
Enables or disables the virtual row. |
Methods inherited from class dyntable.AttributiveCellTableModel |
---|
addColumn, addRow, getCellAttribute, insertRow, setCellAttribute, setColumnIdentifiers, setDataVector |
Methods inherited from class javax.swing.table.DefaultTableModel |
---|
addColumn, addColumn, addRow, getDataVector, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setDataVector, setNumRows, setRowCount |
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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getRowCount, removeTableModelListener |
Constructor Detail |
public RowHeaderModel(int numOfInitialRows, int numOfColumns)
public RowHeaderModel(dyntable.ProxyTableModel m)
m
- the ProxyTableModelMethod Detail |
public dyntable.ProxyTableModel getMainTableModel()
public void setMainTableModel(dyntable.ProxyTableModel m)
m
- the new ProxyTableModelpublic boolean isVirtualColumnEnabled()
public void setVirtualColumnEnabled(boolean v)
v
- enabled if true, disabled otherwisepublic boolean isRowNumberDisplayed()
public void setRowNumberDisplayed(boolean d)
d
- enabled if true, disabled otherwisepublic boolean isEntityIndexDisplayed()
public void setEntityIndexDisplayed(boolean d)
d
- enabled if true, disabled otherwisepublic boolean isCellEditable(int p1, int p2)
dyntable.ProxyTableModel
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class dyntable.ProxyTableModel
p1
- - the row whose value is to be queriedp2
- index of the column
public java.lang.Object getValueAt(int p1, int p2)
dyntable.ProxyTableModel
getValueAt
in interface javax.swing.table.TableModel
getValueAt
in class dyntable.ProxyTableModel
p1
- the row indexp2
- the column index
public void setValueAt(java.lang.Object p1, int p2, int p3)
dyntable.ProxyTableModel
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class dyntable.ProxyTableModel
p1
- the Object representing the new valuep2
- the row entity indexp3
- the column indexpublic int getColumnCount()
dyntable.ProxyTableModel
getColumnCount
in interface javax.swing.table.TableModel
getColumnCount
in class dyntable.ProxyTableModel
public java.lang.Class getColumnClass(int p1)
dyntable.ProxyTableModel
EntityTableColumn
for more information.
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class dyntable.ProxyTableModel
p1
- the column index
public java.lang.String getColumnName(int p1)
dyntable.ProxyTableModel
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class dyntable.ProxyTableModel
p1
- the column index
public EntityList getEntityList()
public void setEntityList(EntityList e)
e
- the new EntityList which holds the new entitiespublic EntityTableColumnModel getColumnModel()
public void setColumnModel(EntityTableColumnModel c)
c
- the new EntityTableColumnModel which holds the new columnspublic boolean isVirtualRowEnabled()
public void setVirtualRowEnabled(boolean v)
v
- enabled if true, disabled otherwisepublic boolean isCellEditingEnabled()
public void setCellEditingEnabled(boolean b)
b
- enabled if true, disabled otherwisepublic java.lang.Object getVirtualEntity()
public void setVirtualEntity(java.lang.Object v)
v
- the new virtual entitypublic int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
getRowCount
in class javax.swing.table.DefaultTableModel
public void refresh()
public boolean isReadOnly()
public void setReadOnly(boolean r)
r
- read-only if true, editable otherwisepublic void listChanged(EntityListEvent e)
listChanged
in interface EntityListListener
e
- the generated EntityListEventpublic void revalidate()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |