|
||||||||||
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
protected static class JXTable.TableAdapter
Field Summary |
---|
Fields inherited from class org.jdesktop.swingx.decorator.ComponentAdapter |
---|
column, row, target |
Constructor Summary | |
---|---|
JXTable.TableAdapter(JXTable component)
Constructs a TableDataAdapter for the specified target
component. |
Method Summary | |
---|---|
protected TableColumn |
getColumnByModelIndex(int modelColumn)
|
int |
getColumnCount()
Returns the number of columns in the target's data model. |
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. |
int |
getRowCount()
Returns the number of rows in the target's data model. |
JXTable |
getTable()
Typesafe accessor for the target component. |
Object |
getValue()
Returns the value of the cell identified by this adapter by invoking ComponentAdapter.getValueAt(int, int) , passing in the ComponentAdapter.row and
ComponentAdapter.column values of 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; Otherwise, it returns false. |
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; 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 |
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 org.jdesktop.swingx.decorator.ComponentAdapter |
---|
getComponent, getDepth, isExpanded, isHierarchical, isLeaf, refresh |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JXTable.TableAdapter(JXTable component)
TableDataAdapter
for the specified target
component.
component
- the target componentMethod Detail |
---|
public JXTable getTable()
JTable
public String getColumnName(int columnIndex)
ComponentAdapter
getColumnName
in class ComponentAdapter
columnIndex
- in model coordinates
protected TableColumn getColumnByModelIndex(int modelColumn)
public String getColumnIdentifier(int columnIndex)
ComponentAdapter
getColumnIdentifier
in class ComponentAdapter
columnIndex
- in model coordinates
public int getColumnCount()
ComponentAdapter
getColumnCount
in class ComponentAdapter
public int getRowCount()
ComponentAdapter
getRowCount
in class ComponentAdapter
public Object getValueAt(int row, int column)
getValueAt
in class ComponentAdapter
row
- in model coordinatescolumn
- in model coordinates
public void setValueAt(Object aValue, int row, int column)
setValueAt
in class ComponentAdapter
public boolean isCellEditable(int row, int column)
ComponentAdapter
This method is for use with Filter
s.
isCellEditable
in class ComponentAdapter
row
- the row to querycolumn
- the column to query
true
if the cell is editable, false
otherwisepublic boolean isTestable(int column)
ComponentAdapter
isTestable
in class ComponentAdapter
column
- in model coordinates
public Object getFilteredValueAt(int row, int column)
getFilteredValueAt
in class ComponentAdapter
public Object getValue()
ComponentAdapter.getValueAt(int, int)
, passing in the ComponentAdapter.row
and
ComponentAdapter.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!.
getValue
in class ComponentAdapter
public 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 boolean hasFocus()
hasFocus
in class ComponentAdapter
public int modelToView(int columnIndex)
modelToView
in class ComponentAdapter
columnIndex
- index of a column in model coordinates
public int viewToModel(int columnIndex)
viewToModel
in class ComponentAdapter
columnIndex
- index of a column in view coordinates
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |