public abstract class ExtraColumn
extends java.lang.Object
ExtraColumnProvider
so it can expect a particular class of rowData to be provided
to the getValueAt(int, SupportsExtraData)
method.Modifier | Constructor and Description |
---|---|
protected |
ExtraColumn(GuiContentType guiContentType,
int extraColumnIndex,
ExtraColumnProvider extraColumnProvider)
Create an ExtraColumn.
|
Modifier and Type | Method and Description |
---|---|
int |
compareRows(int rowIndex1,
SupportsExtraData rowData1,
int rowIndex2,
SupportsExtraData rowData2)
Compare this column of the two rows.
|
java.lang.Class<?> |
getColumnClass()
Returns the most specific superclass for all the cell values
in the column.
|
abstract java.lang.String |
getColumnName()
Returns the localized name of this column.
|
ExtraContentElement[] |
getContentForPopupWindow(SupportsExtraData rowData)
Get the text (if any) to be displayed on a popup for the data record being displayed in the popup.
|
int |
getExtraColumnIndex()
Get the provider-relative index of this extra column.
|
ExtraColumnProvider |
getExtraColumnProvider()
Get the ExtraColumnProvider that defines this column.
|
GuiContentType |
getGuiContentType()
Get the GUI content type this column is associated with.
|
abstract java.lang.Object |
getValueAt(int rowIndex,
SupportsExtraData rowData)
Returns the value for the cell at this column and
rowIndex . |
boolean |
isCellEditable(int rowIndex,
SupportsExtraData rowData)
Returns true if the cell at
rowIndex and
this column
is editable. |
void |
setExtraColumnIndex(int columnIndex)
Modify the column index for the ExtraColumn.
|
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
SupportsExtraData rowData)
Sets the value in the cell at this column and
rowIndex to aValue . |
boolean |
usesUnitEnum(java.lang.Class<java.lang.Enum<? extends UnitEnum>> clazz)
Report if this column uses the specified enum class to scale its values.
|
protected ExtraColumn(GuiContentType guiContentType, int extraColumnIndex, ExtraColumnProvider extraColumnProvider)
guiContentType
- the GuiContentType this ExtraColumn is associated withextraColumnIndex
- zero-based relative column index from the providerextraColumnProvider
- ExtraColumnProvider providing this columnpublic GuiContentType getGuiContentType()
public int getExtraColumnIndex()
public void setExtraColumnIndex(int columnIndex)
columnIndex
- zero-based ordinal of this column from its ExtraColumnProvider
public ExtraColumnProvider getExtraColumnProvider()
public java.lang.Class<?> getColumnClass()
public abstract java.lang.String getColumnName()
public abstract java.lang.Object getValueAt(int rowIndex, SupportsExtraData rowData)
rowIndex
.rowIndex
- the row whose value is to be queriedrowData
- Object from the original table containing data represented by the entire row; the
Object type is specific to the GuiContentType of the tablepublic boolean isCellEditable(int rowIndex, SupportsExtraData rowData)
rowIndex
and
this column
is editable. Otherwise, setValueAt
on the cell will not
change the value of that cell. Expected to be overridden by editable subclasses.rowIndex
- the row whose value to be queriedrowData
- Object from the original table containing data represented by the entire row; the
Object type is specific to the GuiContentType of the tablesetValueAt(java.lang.Object, int, org.ka2ddo.yaac.pluginapi.SupportsExtraData)
public void setValueAt(java.lang.Object aValue, int rowIndex, SupportsExtraData rowData)
rowIndex
to aValue
. Expected to be overridden by editable subclasses.aValue
- the new valuerowIndex
- the row whose value is to be changedrowData
- Object from the original table containing data represented by the entire row; the
Object type is specific to the GuiContentType of the tablegetValueAt(int, org.ka2ddo.yaac.pluginapi.SupportsExtraData)
,
isCellEditable(int, org.ka2ddo.yaac.pluginapi.SupportsExtraData)
public int compareRows(int rowIndex1, SupportsExtraData rowData1, int rowIndex2, SupportsExtraData rowData2)
FastComparableTableModel
.rowIndex1
- zero-based model row index of first row to comparerowData1
- Object from the original table containing data represented by the entire first row; the
Object type is specific to the GuiContentType of the tablerowIndex2
- zero-based model row index of second row to comparerowData2
- Object from the original table containing data represented by the entire second row; the
Object type is specific to the GuiContentType of the tablepublic boolean usesUnitEnum(java.lang.Class<java.lang.Enum<? extends UnitEnum>> clazz)
clazz
- Class of a UnitEnumpublic ExtraContentElement[] getContentForPopupWindow(SupportsExtraData rowData)
rowData
- Object to provide the data to render (same as would be passed to getValueAt(int, SupportsExtraData)