|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HierarchicalTableModel
HierarchicalTableModel
is an interface used by HierarchicalTable
to show any components in
a table in a hierarchical fashion. Each row can be associated with a component. The component can be used to display
detailed or break-down information of that row.
Old method ==> New method
boolean hasChildComponent(int row) ==> boolean hasChild(int row)
boolean isHierarchical(int row) remains
Component getChildComponent(int row) ==> Object getChildValueAt(int row)
Since HierarchicalTableModel is a model related class, it should only deal with data. The component is now created by
a factory class on HierarchicalTable called HierarchicalTableComponentFactory
. HierarchicalTableComponentFactory
will create a component from the value that returned from getChildValueAt(int
row). You can set the factory using HierarchicalTable.setComponentFactory(HierarchicalTableComponentFactory)
method.
Sometimes your model is dynamically changing. You may return true or false for hasChild, isHierarchical, isExpandable
and different values for getChildValueAt. If any of them change, you need to call fireTableRowsUpdated event to let
the view about the row change.
Method Summary | |
---|---|
Object |
getChildValueAt(int row)
Gets the child object value associated with the row at row index. |
boolean |
hasChild(int row)
Checks if the row has child. |
boolean |
isExpandable(int row)
Returns true if the row is expandable. |
boolean |
isHierarchical(int row)
Returns true if the child component will be shown in a new row. |
Method Detail |
---|
boolean hasChild(int row)
row
- the row index
boolean isHierarchical(int row)
row
-
Object getChildValueAt(int row)
row
-
boolean isExpandable(int row)
row
-
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |