|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--com.ibm.as400.ui.framework.java.PanelTableModel | +--com.ibm.as400.ui.framework.java.PanelTreeTableModel
An implementation of TableModel
that uses a two-dimensional
array of objects to store the cell values. The row count will be the
length of the largest array that is supplied on a call to setColumn
.
TableModel
, Serialized FormFields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
PanelTreeTableModel(java.util.Vector tableColumns)
Constructs a PanelTreeTableModel . |
Method Summary | |
void |
addRow(java.util.Vector rowData)
Adds a row to the end of the model. |
void |
addRow(java.util.Vector rowData,
javax.swing.tree.DefaultMutableTreeNode parent)
Adds a row to the end of the model. |
java.util.Vector[] |
getRows()
Returns a Vector array. |
java.lang.Object |
getValueAt(int row,
int column)
Returns an attribute value for the cell at row
and column . |
void |
insertNodeRow(java.util.Vector rowData,
javax.swing.tree.DefaultMutableTreeNode nodeParent,
int nodeIndex)
Inserts a node into the renderer tree and then calls insertRow to add the corresponding row to the table model. |
void |
insertRow(int rowIndex,
java.util.Vector rowData)
Inserts a row at rowIndex the model. |
boolean |
isCellEditable(int row,
int column)
Returns true if the cell at row and column
is editable. |
void |
removeRow(int rowToRemove)
Removes the row at rowToRemove from the model. |
void |
removeRows(int[] rowsToRemove)
Removes the rows identified in rowsToRemove from the model. |
void |
setCellEditable(boolean editable,
int row,
int column)
Indicates whether the cell at row and column
is editable. |
void |
setColumn(int column,
java.lang.Object[] items)
Sets the list of values for the column at column . |
void |
setColumn(int column,
java.lang.Object[] items,
com.ibm.as400.ui.framework.java.ComponentAttributeAssociation caa)
Sets the list of values for the column at column . |
void |
setComponentAttributeAssociation(com.ibm.as400.ui.framework.java.ComponentAttributeAssociation caa)
Sets the ComponentAttributeAssociation associated with this model. |
void |
setRendererTree(javax.swing.JTree tree)
Sets the JTree used to render the tree column cells. |
void |
setRows(java.util.Vector[] rowData)
Reassigns all values in the table. |
void |
setTable(PanelTreeTable table)
Sets the PanelTreeTable associated with this model. |
void |
setValueAt(java.lang.Object value,
int row,
int column)
Sets an attribute value for the record in the cell at row and column . |
void |
treeCollapsed(javax.swing.event.TreeExpansionEvent event)
|
void |
treeExpanded(javax.swing.event.TreeExpansionEvent event)
|
void |
treeNodesChanged()
|
void |
treeNodesChanged(javax.swing.event.TreeModelEvent e)
|
void |
treeNodesInserted(javax.swing.event.TreeModelEvent e)
|
void |
treeNodesRemoved(javax.swing.event.TreeModelEvent e)
|
void |
treeStructureChanged(javax.swing.event.TreeModelEvent e)
|
void |
treeWillCollapse(javax.swing.event.TreeExpansionEvent event)
|
void |
treeWillExpand(javax.swing.event.TreeExpansionEvent event)
|
Methods inherited from class com.ibm.as400.ui.framework.java.PanelTableModel |
getColumn,
getColumn,
getColumnClass,
getColumnCount,
getColumnIdentifier,
getColumnName,
getRowCount,
toString |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener,
findColumn,
fireTableCellUpdated,
fireTableChanged,
fireTableDataChanged,
fireTableRowsDeleted,
fireTableRowsInserted,
fireTableRowsUpdated,
fireTableStructureChanged,
removeTableModelListener |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public PanelTreeTableModel(java.util.Vector tableColumns)
PanelTreeTableModel
.tableColumns
- a list of ColumnDescriptors
for the table columnsMethod Detail |
public void setRendererTree(javax.swing.JTree tree)
JTree
used to render the tree column cells.tree
- the tree to be used as the rendererpublic void setTable(PanelTreeTable table)
PanelTreeTable
associated with this model.table
- the PanelTreeTable associated with this modelpublic void setComponentAttributeAssociation(com.ibm.as400.ui.framework.java.ComponentAttributeAssociation caa)
ComponentAttributeAssociation
associated with this model.caa
- the ComponentAttributeAssociation associated with this modelpublic void setColumn(int column, java.lang.Object[] items, com.ibm.as400.ui.framework.java.ComponentAttributeAssociation caa)
column
.column
- the column whose values are to be setthe
- list of values at the specified columnPanelTableModel.getColumn(int)
public void setColumn(int column, java.lang.Object[] items)
column
.column
- the column whose values are to be setthe
- list of values at the specified columnPanelTableModel.getColumn(int)
public java.lang.Object getValueAt(int row, int column)
row
and column
.row
- the row whose value is to be looked upcolumn
- the column whose value is to be looked upsetValueAt(java.lang.Object, int, int)
public boolean isCellEditable(int row, int column)
row
and column
is editable. Otherwise, setValueAt() on the cell will not change
the value of that cell.row
- the row whose editable status is to be looked upcolumn
- the column whose editable status is to be looked upsetCellEditable(boolean, int, int)
public void setCellEditable(boolean editable, int row, int column)
row
and column
is editable. Otherwise, setValueAt() on the cell will not change
the value of that cell.editable
- true if the cell should be editable, false otherwiserow
- the row whose value is to be looked upcolumn
- the column whose value is to be looked upisCellEditable(int, int)
public void setValueAt(java.lang.Object value, int row, int column)
row
and column
. value
is
the new value.value
- the new valuerow
- the row whose value is to be changedcolumn
- the column whose value is to be changedgetValueAt(int, int)
public void addRow(java.util.Vector rowData)
rowData
is specified. Notification
of the row being added will be generated.rowData
- data of the row being added (may be null)removeRow(int)
public void addRow(java.util.Vector rowData, javax.swing.tree.DefaultMutableTreeNode parent)
rowData
is specified. Notification
of the row being added will be generated.rowData
- data of the row being added (may be null)removeRow(int)
public void insertNodeRow(java.util.Vector rowData, javax.swing.tree.DefaultMutableTreeNode nodeParent, int nodeIndex)
nodeRow
- - the row of data to be added. The first element in this vector must be a DefaultMutableTreeNodenodeParent
- - the parent node of the node being addednodeIndex
- - the index of this node in the parent's child arrayinsertRow(int, java.util.Vector)
,
removeRow(int)
public void insertRow(int rowIndex, java.util.Vector rowData)
rowData
is specified. Notification
of the row being added will be generated.rowIndex
- - the row index of the row to be insertedrowData
- - optional data of the row being addedremoveRow(int)
public void setRows(java.util.Vector[] rowData)
rowData
is specified. Notification
of the rows being added will be generated.rowData
- array of data for the rows being added (may be null)getRows()
public java.util.Vector[] getRows()
setRows(java.util.Vector[])
public void removeRow(int rowToRemove)
rowToRemove
from the model. Notification
of the row being removed will be sent to all listeners.rowToRemove
- the row index of the row to be removedpublic void removeRows(int[] rowsToRemove)
rowsToRemove
from the model. Notification
of the rows being removed will be sent to all listeners.rowsToRemove
- a list of row indices for the rows to be removedpublic void treeExpanded(javax.swing.event.TreeExpansionEvent event)
public void treeCollapsed(javax.swing.event.TreeExpansionEvent event)
public void treeWillExpand(javax.swing.event.TreeExpansionEvent event)
public void treeWillCollapse(javax.swing.event.TreeExpansionEvent event)
public void treeNodesChanged(javax.swing.event.TreeModelEvent e)
public void treeNodesInserted(javax.swing.event.TreeModelEvent e)
public void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
public void treeStructureChanged(javax.swing.event.TreeModelEvent e)
public void treeNodesChanged()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |