JIDE 3.5.15

com.jidesoft.grid
Class IndexReferenceRow

java.lang.Object
  extended by com.jidesoft.grid.AbstractNode
      extended by com.jidesoft.grid.AbstractRow
          extended by com.jidesoft.grid.IndexReferenceRow
All Implemented Interfaces:
Cacheable, GroupRow, Node, ReferenceRow, Row

public class IndexReferenceRow
extends AbstractRow
implements ReferenceRow, Cacheable

An implementation of ReferenceRow which refers to a row using the row index.


Field Summary
 
Fields inherited from class com.jidesoft.grid.AbstractNode
_parent, PROPERTY_PARENT
 
Fields inherited from interface com.jidesoft.grid.Node
PROPERTY_ADJUSTING
 
Fields inherited from interface com.jidesoft.grid.Cacheable
INVALID_VALUE
 
Constructor Summary
IndexReferenceRow(DefaultGroupTableModel groupTableModel, TableModel tableModel, int rowIndex)
           
IndexReferenceRow(TableModel tableModel, int rowIndex)
           
 
Method Summary
 boolean equals(Object o)
           
 int getActualColumnIndex(int columnIndex)
           
 Object getCachedValue()
          Gets the cached value.
 Class getCellClassAt(int columnIndex)
          Gets the type for the cell at columnIndex.
 ConverterContext getConverterContextAt(int columnIndex)
          Gets the converter context for the cell at columnIndex.
 EditorContext getEditorContextAt(int columnIndex)
          Gets the editor context for the cell at columnIndex.
 int getRowIndex()
           
 TableModel getTableModel()
           
 TreeTableModel getTreeTableModel()
           
 Object getValueAt(int columnIndex)
          Gets the value for cell at columnIndex
 int hashCode()
           
 void invalidateCache()
          Invalidates the cache.
 void invalidateCache(Object key)
          Invalidates the cached value which matches the key.
 boolean isCacheValid()
          Checks if the cache is valid.
 boolean isCellEditable(int columnIndex)
          Returns true if the cell at columnIndex is editable.
 void setCachedValue(Object value)
          Sets the cached value.
 void setRowIndex(int rowIndex)
           
 void setValueAt(Object value, int columnIndex)
          Sets the value in the cell at columnIndex.
 
Methods inherited from class com.jidesoft.grid.AbstractRow
cellUpdated, rowUpdated
 
Methods inherited from class com.jidesoft.grid.AbstractNode
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getLevel, getNextSibling, getParent, getPreviousSibling, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.grid.Row
cellUpdated, rowUpdated
 
Methods inherited from interface com.jidesoft.grid.Node
getLevel, getNextSibling, getParent, getPreviousSibling, setParent
 

Constructor Detail

IndexReferenceRow

public IndexReferenceRow(TableModel tableModel,
                         int rowIndex)

IndexReferenceRow

public IndexReferenceRow(DefaultGroupTableModel groupTableModel,
                         TableModel tableModel,
                         int rowIndex)
Method Detail

getActualColumnIndex

public int getActualColumnIndex(int columnIndex)

getValueAt

public Object getValueAt(int columnIndex)
Description copied from interface: Row
Gets the value for cell at columnIndex

Specified by:
getValueAt in interface Row
Parameters:
columnIndex - the column whose value to be queried
Returns:
the value at the specified cell.

getRowIndex

public int getRowIndex()

setRowIndex

public void setRowIndex(int rowIndex)

getTreeTableModel

public TreeTableModel getTreeTableModel()
Specified by:
getTreeTableModel in interface GroupRow

getTableModel

public TableModel getTableModel()

getConverterContextAt

public ConverterContext getConverterContextAt(int columnIndex)
Description copied from interface: Row
Gets the converter context for the cell at columnIndex.

Specified by:
getConverterContextAt in interface Row
Overrides:
getConverterContextAt in class AbstractRow
Parameters:
columnIndex - the column index
Returns:
the converter context for the specified cell.

getEditorContextAt

public EditorContext getEditorContextAt(int columnIndex)
Description copied from interface: Row
Gets the editor context for the cell at columnIndex.

Specified by:
getEditorContextAt in interface Row
Overrides:
getEditorContextAt in class AbstractRow
Parameters:
columnIndex - the column index
Returns:
the editor context for the specified cell.

getCellClassAt

public Class getCellClassAt(int columnIndex)
Description copied from interface: Row
Gets the type for the cell at columnIndex.

Specified by:
getCellClassAt in interface Row
Overrides:
getCellClassAt in class AbstractRow
Parameters:
columnIndex - the column index
Returns:
the type for the specified cell.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getCachedValue

public Object getCachedValue()
Description copied from interface: Cacheable
Gets the cached value.

Specified by:
getCachedValue in interface Cacheable
Returns:
the cached value.

setCachedValue

public void setCachedValue(Object value)
Description copied from interface: Cacheable
Sets the cached value.

Specified by:
setCachedValue in interface Cacheable
Parameters:
value - the new cached value.

isCacheValid

public boolean isCacheValid()
Description copied from interface: Cacheable
Checks if the cache is valid. Cacheable.invalidateCache() will make this method return false.

Specified by:
isCacheValid in interface Cacheable
Returns:
true if valid.

invalidateCache

public void invalidateCache()
Description copied from interface: Cacheable
Invalidates the cache. It just set the cached value to Cacheable.INVALID_VALUE.

Specified by:
invalidateCache in interface Cacheable

invalidateCache

public void invalidateCache(Object key)
Description copied from interface: Cacheable
Invalidates the cached value which matches the key. It just set the cached value to Cacheable.INVALID_VALUE if current cached value matches the key.

Specified by:
invalidateCache in interface Cacheable
Parameters:
key - the key

isCellEditable

public boolean isCellEditable(int columnIndex)
Description copied from interface: Row
Returns true if the cell at columnIndex is editable. Otherwise, setValueAt on the cell will not change the value of that cell.

Specified by:
isCellEditable in interface Row
Overrides:
isCellEditable in class AbstractRow
Parameters:
columnIndex - the column whose value to be queried
Returns:
true if the cell is editable
See Also:
Row.setValueAt(java.lang.Object, int)

setValueAt

public void setValueAt(Object value,
                       int columnIndex)
Description copied from interface: Row
Sets the value in the cell at columnIndex.

Specified by:
setValueAt in interface Row
Overrides:
setValueAt in class AbstractRow
Parameters:
value - the new value
columnIndex - the column whose value is to be changed
See Also:
Row.getValueAt(int), Row.isCellEditable(int)

JIDE 3.5.15