org.netbeans.swing.outline 1.20

org.netbeans.swing.etable
Class ETable.RowMapping

java.lang.Object
  extended by org.netbeans.swing.etable.ETable.RowMapping
Enclosing class:
ETable

public static final class ETable.RowMapping
extends Object

Item to the collection when doing the sorting of table rows.


Constructor Summary
ETable.RowMapping(int index, TableModel model)
          Create a new table row mapping.
ETable.RowMapping(int index, TableModel model, ETable table)
          Create a new table row mapping.
 
Method Summary
 Object getModelObject(int column)
          Get the model object at the row index of this mapping and the given column.
 int getModelRowIndex()
          Get the model row index.
 Object getTransformedValue(int column)
          Get the transformed value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ETable.RowMapping

public ETable.RowMapping(int index,
                         TableModel model)
Create a new table row mapping.

Parameters:
index - The row index
model - The table model

ETable.RowMapping

public ETable.RowMapping(int index,
                         TableModel model,
                         ETable table)
Create a new table row mapping.

Parameters:
index - The row index
model - The table model
table - The table. This argument needs to be set when getTransformedValue(int) is to be used.
Since:
1.19
Method Detail

getModelRowIndex

public int getModelRowIndex()
Get the model row index.

Returns:
The model row index

getModelObject

public Object getModelObject(int column)
Get the model object at the row index of this mapping and the given column.

Parameters:
column - The column
Returns:
The model object
See Also:
#getTransformedValue(int)}

getTransformedValue

public Object getTransformedValue(int column)
Get the transformed value. This method assures that we retrieve every value only once per any number of calls. The table needs to be set in order to be able to transform the value, see #RowMapping(int, javax.swing.table.TableModel, org.netbeans.swing.etable.ETable).

Parameters:
column - The column
Returns:
The transformed value. It returns the cached value of table.transformValue(getModelObject(column)).
Throws:
IllegalStateException - when table is not set
Since:
1.19

org.netbeans.swing.outline 1.20

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.