|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jdesktop.swingx.decorator.ComponentAdapter org.jdesktop.swingx.JXList.ListAdapter
protected static class JXList.ListAdapter
A component adapter targeted at a JXList.
Field Summary |
---|
Fields inherited from class org.jdesktop.swingx.decorator.ComponentAdapter |
---|
column, DEFAULT_COLUMN_IDENTIFIER, row, target |
Constructor Summary | |
---|---|
JXList.ListAdapter(JXList component)
Constructs a ListAdapter for the specified target
JXList. |
Method Summary | |
---|---|
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. |
Object |
getFilteredValueAt(int row,
int column)
Returns the filtered value of the cell identified by the row in view coordinate and the column in model coordinates. |
JXList |
getList()
Typesafe accessor for the target component. |
int |
getRowCount()
Returns the number of rows in the target's data model. |
String |
getString()
Returns the String representation of the value of the cell identified by this adapter. |
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. |
Object |
getValue()
Returns the value of the cell identified by this adapter. |
Object |
getValueAt(int row,
int column)
Returns the value of the target component's cell identified by the specified row and column in model coordinates. |
boolean |
hasFocus()
Returns true if the cell identified by this adapter currently has focus. |
boolean |
isCellEditable(int row,
int column)
Determines whether this cell is editable. |
boolean |
isEditable()
Returns true if the cell identified by this adapter is editable,
false otherwise. |
boolean |
isSelected()
Returns true if the cell identified by this adapter is currently selected. |
void |
setValueAt(Object aValue,
int row,
int column)
Sets the value of the target component's cell identified by the specified row and column in model coordinates. |
Methods inherited from class org.jdesktop.swingx.decorator.ComponentAdapter |
---|
getColumnCount, getColumnIdentifierAt, getColumnIndex, getColumnName, getComponent, getDepth, getString, getValue, isExpanded, isHierarchical, isLeaf, isTestable, modelToView, refresh, viewToModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JXList.ListAdapter(JXList component)
ListAdapter
for the specified target
JXList.
component
- the target list.Method Detail |
---|
public JXList getList()
JXList
public boolean hasFocus()
hasFocus
in class ComponentAdapter
public int getRowCount()
getRowCount
in class ComponentAdapter
public Object getValue()
NOTE: this implementation assumes that view coordinates == model coordinates, that is simply calls getValueAt(this.row, this.column). It is up to subclasses to override appropriately is they support model/view coordinate transformation.
Overridden to return value at implicit view coordinates.
getValue
in class ComponentAdapter
ComponentAdapter.getValueAt(int, int)
,
ComponentAdapter.getFilteredValueAt(int, int)
,
ComponentAdapter.getValue(int)
public Object getValueAt(int row, int column)
getValueAt
in class ComponentAdapter
row
- in model coordinatescolumn
- in model coordinates
public Object getFilteredValueAt(int row, int column)
getFilteredValueAt
in class ComponentAdapter
row
- the row of the cell in view coordinatescolumn
- the column of the cell in model coordinates.
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?
getFilteredStringAt
in class ComponentAdapter
row
- the row of the cell in view coordinatescolumn
- the column of the cell in model coordinates.
public String getString()
NOTE: this implementation assumes that view coordinates == model coordinates, that is simply calls getValueAt(this.row, this.column). It is up to subclasses to override appropriately is they support model/view coordinate transformation.
This implementation messages the StringValue.TO_STRING with the getValue, subclasses should re-implement and use the api appropriate for the target component type.
getString
in class ComponentAdapter
ComponentAdapter.getValueAt(int, int)
,
ComponentAdapter.getFilteredValueAt(int, int)
,
ComponentAdapter.getValue(int)
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.
getStringAt
in class ComponentAdapter
row
- in model coordinatescolumn
- in model coordinates
public void setValueAt(Object aValue, int row, int column)
setValueAt
in class ComponentAdapter
aValue
- the value to setrow
- in model coordinatescolumn
- in model coordinatespublic boolean isCellEditable(int row, int column)
isCellEditable
in class ComponentAdapter
row
- the row to query in model coordinatescolumn
- the column to query in model coordinates
true
if the cell is editable, false
otherwisepublic boolean isEditable()
true
if the cell identified by this adapter is editable,
false
otherwise.
isEditable
in class ComponentAdapter
true
if the cell is editable, false
otherwisepublic boolean isSelected()
isSelected
in class ComponentAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |