|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.decorator.ComponentAdapter
public abstract class ComponentAdapter
Abstract base class for all component data adapter classes.
A ComponentAdapter
allows a Filter
, Sorter
,
or Highlighter
to interact with a target
component through a
common API.
It has two aspects:
column
in column view coordinates
row
in row view coordinates
Field Summary | |
---|---|
int |
column
current column in view coordinates. |
int |
row
current row in view coordinates. |
protected JComponent |
target
|
Constructor Summary | |
---|---|
ComponentAdapter(JComponent component)
Constructs a ComponentAdapter, setting the specified component as the target component. |
Method Summary | |
---|---|
int |
getColumnCount()
Returns the number of columns in the target's data model. |
abstract String |
getColumnIdentifier(int columnIndex)
returns the logical name (== identifier) of the column at columnIndex in model coordinates. |
abstract String |
getColumnName(int columnIndex)
returns the column's label (= headerValue). |
JComponent |
getComponent()
|
abstract 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. |
int |
getRowCount()
Returns the number of rows in the target's data model. |
Object |
getValue()
Returns the value of the cell identified by this adapter by invoking getValueAt(int, int) , passing in the row and
column values of this adapter. |
abstract 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. |
abstract boolean |
hasFocus()
Returns true if the cell identified by this adapter currently has focus; Otherwise, it returns false. |
abstract boolean |
isCellEditable(int row,
int column)
|
boolean |
isExpanded()
Returns true if the cell identified by this adapter is currently expanded; Otherwise, it returns false. |
boolean |
isHierarchical()
Returns true if the cell identified by this adapter displays the hierarchical node; Otherwise, it returns false. |
boolean |
isLeaf()
Returns true if the cell identified by this adapter is a leaf node; Otherwise, it returns false. |
abstract boolean |
isSelected()
Returns true if the cell identified by this adapter is currently selected; Otherwise, it returns false. |
boolean |
isTestable(int column)
returns true if the column should be included in testing. |
int |
modelToView(int columnIndex)
For target components that support multiple columns in their model, along with column reordering in the view, this method transforms the specified columnIndex from model coordinates to view coordinates. |
void |
refresh()
|
abstract void |
setValueAt(Object aValue,
int row,
int column)
|
int |
viewToModel(int columnIndex)
For target components that support multiple columns in their model, along with column reordering in the view, this method transforms the specified columnIndex from view coordinates to model coordinates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int row
public int column
protected final JComponent target
Constructor Detail |
---|
public ComponentAdapter(JComponent component)
component
- target component for this adapterMethod Detail |
---|
public JComponent getComponent()
public abstract String getColumnName(int columnIndex)
columnIndex
- in model coordinates
public abstract String getColumnIdentifier(int columnIndex)
columnIndex
- in model coordinates
public int getColumnCount()
public int getRowCount()
public abstract Object getValueAt(int row, int column)
row
- in model coordinatescolumn
- in model coordinates
public abstract void setValueAt(Object aValue, int row, int column)
public abstract boolean isCellEditable(int row, int column)
public boolean isTestable(int column)
column
- in model coordinates
public Object getValue()
getValueAt(int, int)
, passing in the row
and
column
values of this adapter. For target components that don't
support multiple columns, the value of column
is always zero.
PENDING: needs clarification/cleanup - getValueAt(row, column) expects
model coordinates!.
public abstract Object getFilteredValueAt(int row, int column)
row
- column
-
public abstract boolean hasFocus()
public abstract boolean isSelected()
public boolean isExpanded()
public boolean isLeaf()
public boolean isHierarchical()
public int modelToView(int columnIndex)
columnIndex
- index of a column in model coordinates
public int viewToModel(int columnIndex)
columnIndex
- index of a column in view coordinates
public void refresh()
|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |