|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.decorator.ComponentAdapter
org.jdesktop.swingx.JXTable.TableAdapter
org.jdesktop.swingx.JXTreeTable.TreeTableDataAdapter
protected static class JXTreeTable.TreeTableDataAdapter
Field Summary |
---|
Fields inherited from class org.jdesktop.swingx.decorator.ComponentAdapter |
---|
column, DEFAULT_COLUMN_IDENTIFIER, row, target |
Constructor Summary | |
---|---|
JXTreeTable.TreeTableDataAdapter(JXTreeTable component)
Constructs a TreeTableDataAdapter for the specified
target component. |
Method Summary | |
---|---|
int |
getDepth()
Returns the depth of this row in the hierarchy where the root is 0. |
String |
getFilteredStringAt(int row,
int column)
Returns the String representation of the filtered value of the cell identified by the row in view coordinate and the column in model coordinates. |
String |
getStringAt(int row,
int column)
Returns the String representation of the value of the cell identified by the row specified row and column in model coordinates. |
JXTreeTable |
getTreeTable()
|
boolean |
isExpanded()
Returns true if the cell identified by this adapter is currently expanded. |
boolean |
isHierarchical()
Returns true if the cell identified by this adapter displays the hierarchical node. |
boolean |
isLeaf()
Returns true if the cell identified by this adapter is a leaf node. |
Methods inherited from class org.jdesktop.swingx.JXTable.TableAdapter |
---|
getColumnByModelIndex, getColumnCount, getColumnIdentifierAt, getColumnIndex, getColumnName, getFilteredValueAt, getRowCount, getString, getTable, getValue, getValueAt, hasFocus, isCellEditable, isEditable, isSelected, isTestable, modelToView, setValueAt, viewToModel |
Methods inherited from class org.jdesktop.swingx.decorator.ComponentAdapter |
---|
getComponent, getString, getValue, refresh |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JXTreeTable.TreeTableDataAdapter(JXTreeTable component)
TreeTableDataAdapter
for the specified
target component.
component
- the target componentMethod Detail |
---|
public JXTreeTable getTreeTable()
public boolean isExpanded()
isExpanded
in class ComponentAdapter
public int getDepth()
getDepth
in class ComponentAdapter
public boolean isLeaf()
isLeaf
in class ComponentAdapter
public boolean isHierarchical()
ComponentAdapter
isHierarchical
in class ComponentAdapter
public String getFilteredStringAt(int row, int column)
Note: the asymetry of the coordinates is intentional - clients like Highlighters are interested in view values but might need to access non-visible columns for testing. While it is possible to access row coordinates different from the current (that is this.row) it is not safe to do so for row > this.row because the adapter doesn't allow to query the count of visible rows.
This implementation messages the StringValue.TO_STRING with the filteredValue, subclasses should re-implement and use the api appropriate for the target component type.
PENDING JW: what about null cell values? StringValue has a contract to return a empty string then, would that be okay here as well?
PENDING JW: this is implemented to duplicate this table's lookup code if the column is not visible. That's not good enough if subclasses implemented a different strategy! We do it anyway for now, mostly we will be lucky and improve the situation against using toString always.
Overridden to fix #821-swingx: string rep of hierarchical column incorrect. In this case we must delegate to the tree directly if hidden, the visible is handled by the TreeTable itself.
PENDING JW: revisit once we switch to really using a table renderer.
getFilteredStringAt
in class JXTable.TableAdapter
row
- the row of the cell in view coordinatescolumn
- the column of the cell in model coordinates.
public String getStringAt(int row, int column)
This implementation messages the StringValue.TO_STRING with the valueAt, subclasses should re-implement and use the api appropriate for the target component type.
PENDING JW: this is implemented to duplicate this table's lookup code if either the row or the column is not visible. That's not good enough if subclasses implemented a different strategy! We do it anyway for now, mostly we will be lucky and improve the situation against using toString always.
Overridden to fix #821-swingx: string rep of hierarchical column incorrect. In this case we must delegate to the tree directly if hidden, the visible is handled by the TreeTable itself.
PENDING JW: revisit once we switch to really using a table renderer.
getStringAt
in class JXTable.TableAdapter
row
- in model coordinatescolumn
- in model coordinates
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |