protected static class JXList.ListAdapter extends ComponentAdapter
Modifier and Type | Field and Description |
---|---|
private JXList |
list |
column, DEFAULT_COLUMN_IDENTIFIER, row, target
Constructor and Description |
---|
ListAdapter(JXList component)
Constructs a
ListAdapter for the specified target
JXList. |
Modifier and Type | Method and Description |
---|---|
int |
convertRowIndexToModel(int rowViewIndex)
Converts a row index in view coordinates to an index in model coordinates.
|
int |
convertRowIndexToView(int rowModelIndex)
Converts a row index in model coordinates to an index in view coordinates.
|
Rectangle |
getCellBounds()
Returns the bounds of the cell identified by this adapter.
|
JXList |
getList()
Typesafe accessor for the target component.
|
int |
getRowCount()
Returns the number of rows in the target's data model.
|
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 |
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.
|
convertColumnIndexToModel, convertColumnIndexToView, getColumnClass, getColumnClass, getColumnCount, getColumnIdentifierAt, getColumnIndex, getColumnName, getComponent, getDepth, getFilteredStringAt, getFilteredValueAt, getString, getString, getValue, getValue, isExpanded, isHierarchical, isLeaf, isTestable
public ListAdapter(JXList component)
ListAdapter
for the specified target
JXList.component
- the target list.public JXList getList()
JXList
public boolean hasFocus()
hasFocus
in class ComponentAdapter
public int getRowCount()
getRowCount
in class ComponentAdapter
public Object getValueAt(int row, int column)
getValueAt
in class ComponentAdapter
row
- in model coordinatescolumn
- in model coordinatespublic 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.
This is implemented to query the table's StringValueRegistry for an appropriate StringValue and use that for getting the string representation.
getStringAt
in class ComponentAdapter
row
- in model coordinatescolumn
- in model coordinatespublic Rectangle getCellBounds()
getCellBounds
in class ComponentAdapter
public boolean isCellEditable(int row, int column)
isCellEditable
in class ComponentAdapter
row
- the row to query in model coordinatescolumn
- the column to query in model coordinatestrue
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
public int convertRowIndexToView(int rowModelIndex)
convertRowIndexToView
in class ComponentAdapter
rowModelIndex
- index of a row in model coordinatespublic int convertRowIndexToModel(int rowViewIndex)
convertRowIndexToModel
in class ComponentAdapter
rowViewIndex
- index of a row in view coordinatesWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses