Package docking.widgets.table
Class GTableCellRenderingData
java.lang.Object
docking.widgets.table.GTableCellRenderingData
A state object to provide a table cell renderer with data beyond the standard Java
TableCellRenderer interface.
Additional data about the context of a rendering operation -- like the columns' Settings or the row-object -- are easily passed to the renderer without refactor of each client.
-
Constructor Summary
ConstructorsConstructorDescriptionGTableCellRenderingData(JTable jTable, int column, Settings columnSettings) Create a data object for a specific column in a table -
Method Summary
Modifier and TypeMethodDescriptioncopyWithNewValue(Object newValue) Create a new data object from this data, changing only the cells' value object.intintintintgetTable()getValue()booleanhasFocus()booleanvoidsetCellData(Object value, int column, boolean isSelected, boolean hasFocus) Set data specific to a cell, as used during the rendering phasevoidsetRowData(int row, Object rowObject) Set data specific to a row, as used during the rendering phasetoString()
-
Constructor Details
-
GTableCellRenderingData
Create a data object for a specific column in a table- Parameters:
jTable- Reference to the associated JTablecolumn- View index of this columncolumnSettings- Settings state provided and used by this column
-
-
Method Details
-
copyWithNewValue
Create a new data object from this data, changing only the cells' value object.This method is a convenience for use by renderers that wish to change the value passed to them.
- Parameters:
newValue- New cell value object- Returns:
- A new data object with the same state as this object
-
setRowData
Set data specific to a row, as used during the rendering phase- Parameters:
row- View row indexrowObject- Object for which this table row is generated
-
setCellData
Set data specific to a cell, as used during the rendering phase- Parameters:
value- The models' value at row-columncolumn- the view column indexisSelected- True if the cell is to be rendered with the selection highlighted; otherwise falsehasFocus- This cell has the users' focus
-
getTable
-
getColumnViewIndex
public int getColumnViewIndex() -
getColumnModelIndex
public int getColumnModelIndex() -
getColumnSettings
-
getRowViewIndex
public int getRowViewIndex() -
getRowModelIndex
public int getRowModelIndex() -
getValue
-
getRowObject
-
isSelected
public boolean isSelected() -
hasFocus
public boolean hasFocus() -
toString
-