protected abstract class AbstractCRUDTable.Column<C>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
header |
protected java.lang.Class<C> |
type |
Constructor and Description |
---|
Column(java.lang.Class<C> type,
java.lang.String headerKey) |
Column(java.lang.Class<C> type,
java.lang.String header,
boolean doKeyLookup) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHeader() |
java.lang.Class<C> |
getType() |
abstract C |
getValue(T item)
The main function of the Column class: to retrieve the proper value from the object
|
int |
getWidth() |
boolean |
isEditable()
Override this if you want your column to be editable
|
boolean |
isLoadOptions()
If this column should be editable by a dropdown, override this to return true and also override
loadOptions() |
boolean |
isVisible()
If you change this, you'll need to call updateColumns()
|
java.util.List<C> |
loadOptions()
If you've overridden
isLoadOptions() , then you also need to override this to proved the options. |
void |
onCellEdited(T item,
C value)
If your column is editable, implement this.
|
void |
setHeader(java.lang.String header) |
protected java.lang.String header
protected java.lang.Class<C> type
public Column(java.lang.Class<C> type, java.lang.String headerKey)
type
- The type of the columnheaderKey
- A resource bundle key for the column headerpublic Column(java.lang.Class<C> type, java.lang.String header, boolean doKeyLookup)
public java.lang.String getHeader()
public int getWidth()
public void setHeader(java.lang.String header)
public abstract C getValue(T item)
public java.lang.Class<C> getType()
public boolean isEditable()
public boolean isLoadOptions()
loadOptions()
public java.util.List<C> loadOptions() throws java.lang.Exception
isLoadOptions()
, then you also need to override this to proved the options.
will be run on a background thread.java.lang.Exception
public boolean isVisible()