swingx
Version 2005-08-19

org.jdesktop.swingx
Class JXList.ListAdapter

java.lang.Object
  extended by org.jdesktop.swingx.decorator.ComponentAdapter
      extended by org.jdesktop.swingx.JXList.ListAdapter
Enclosing class:
JXList

protected static class JXList.ListAdapter
extends ComponentAdapter


Field Summary
 
Fields inherited from class org.jdesktop.swingx.decorator.ComponentAdapter
column, row, target
 
Constructor Summary
JXList.ListAdapter(JXList component)
          Constructs a ListDataAdapter for the specified target component.
 
Method Summary
 String getColumnIdentifier(int columnIndex)
          returns the logical name (== identifier) of the column at columnIndex in model coordinates.
 String getColumnName(int columnIndex)
          returns the column's label (= headerValue).
 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.
 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; Otherwise, it returns false.
 boolean isCellEditable(int row, int column)
           
 boolean isSelected()
          Returns true if the cell identified by this adapter is currently selected; Otherwise, it returns false.
 void setValueAt(Object aValue, int row, int column)
           
 
Methods inherited from class org.jdesktop.swingx.decorator.ComponentAdapter
getColumnCount, getComponent, 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

JXList.ListAdapter

public JXList.ListAdapter(JXList component)
Constructs a ListDataAdapter for the specified target component.

Parameters:
component - the target component
Method Detail

getList

public JXList getList()
Typesafe accessor for the target component.

Returns:
the target component as a JXList

hasFocus

public boolean hasFocus()
Returns true if the cell identified by this adapter currently has focus; Otherwise, it returns false.

Specified by:
hasFocus in class ComponentAdapter
Returns:
true if the cell identified by this adapter currently has focus; Otherwise, return false

getRowCount

public int getRowCount()
Description copied from class: ComponentAdapter
Returns the number of rows in the target's data model.

Overrides:
getRowCount in class ComponentAdapter
Returns:
the number of rows in the target's data model.

getValueAt

public 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.

Specified by:
getValueAt in class ComponentAdapter
Parameters:
row - in model coordinates
column - in model coordinates
Returns:
the value of the target component's cell identified by the specified row and column

getFilteredValueAt

public Object getFilteredValueAt(int row,
                                 int column)
Description copied from class: ComponentAdapter
returns the filtered value of the cell identified by the row in view coordinate and the column in model coordinates. 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.

Specified by:
getFilteredValueAt in class ComponentAdapter
Returns:
the filtered value of the cell identified by the row in view coordinate and the column in model coordiantes

setValueAt

public void setValueAt(Object aValue,
                       int row,
                       int column)
Specified by:
setValueAt in class ComponentAdapter

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in class ComponentAdapter

isSelected

public boolean isSelected()
Returns true if the cell identified by this adapter is currently selected; Otherwise, it returns false.

Specified by:
isSelected in class ComponentAdapter
Returns:
true if the cell identified by this adapter is currently selected; Otherwise, return false

getColumnName

public String getColumnName(int columnIndex)
Description copied from class: ComponentAdapter
returns the column's label (= headerValue). Used f.i. in SearchPanel to fill the field with the column name. Note: it's up to the implementation to decide for which columns it returns a name - most will do so for the subset with isTestable = true.

Specified by:
getColumnName in class ComponentAdapter
Parameters:
columnIndex - in model coordinates
Returns:
column name or null if not found/not testable.

getColumnIdentifier

public String getColumnIdentifier(int columnIndex)
Description copied from class: ComponentAdapter
returns the logical name (== identifier) of the column at columnIndex in model coordinates. Used f.i. JNTable to store and apply column properties by identifier. Note: it's up to the implementation to decide for which columns it returns a name - most will do so for the subset with isTestable = true.

Specified by:
getColumnIdentifier in class ComponentAdapter
Parameters:
columnIndex - in model coordinates
Returns:
the String value of the column identifier at columnIndex or null if no identifier set

swingx
Version 2005-08-19