I
- The type of items that are listedV
- The type of value that is returned by the getValue() methodpublic abstract class AbstractListColumnBean<I,V> extends Object implements ListColumnAction<I,V>
ListColumnAction.getValue(DbControl, Object)
method. The default implementation
of the getExportValue(DbControl, Object)
simply copies the getValue()
result. A subclass that need different
values must override the getExportValue()
method as well.Modifier and Type | Field and Description |
---|---|
private String |
clazz |
private Enumeration<String,String> |
enumeration |
private boolean |
exportable |
private Formatter<?> |
exportFormatter |
private String |
exportProperty |
private boolean |
filterable |
private String |
filterProperty |
private Formatter<? super V> |
formatter |
private String |
id |
private String |
property |
private boolean |
sortable |
private String |
sortProperty |
private String |
style |
private String |
title |
private String |
tooltip |
private Type |
valueType |
Constructor and Description |
---|
AbstractListColumnBean() |
Modifier and Type | Method and Description |
---|---|
String |
getClazz()
Optional HTML class attribute that is used to style the column
through CSS.
|
Enumeration<String,String> |
getEnumeration()
Get an enumeration of possible values that can be found in the
column.
|
Formatter<?> |
getExportFormatter()
Get a formatter that converts the exported value to a string that is written
to the file.
|
String |
getExportProperty()
Override the default property when this column is used for exporting.
|
Object |
getExportValue(DbControl dc,
I item)
This implementation simply forward to
ListColumnAction.getValue(DbControl, Object) . |
String |
getFilterProperty()
Override the default property when this column is used for filtering.
|
Formatter<? super V> |
getFormatter()
Get a formatter that converts the current value to a string that is displayed
in the column.
|
String |
getId()
ID attribute of the column.
|
String |
getProperty()
The property name for referencing data in the column.
|
String |
getSortProperty()
Override the default property when this column is used for sorting.
|
String |
getStyle()
Optional HTML style attribute that is used to style the column
through CSS.
|
String |
getTitle()
The column title.
|
String |
getTooltip()
An optional tooltip that is displayed when the mouse is over the
column header.
|
Type |
getValueType()
The data type of the values that are referenced by the property.
|
boolean |
isExportable()
A flag to indicate if it is possible to export this column with the
generic table exporter or not.
|
boolean |
isFilterable()
A flag to indicate if filtering on this column is enabled or
not.
|
boolean |
isSortable()
A flag to indicate if sorting by this column is enabled for
not.
|
void |
setClazz(String clazz) |
void |
setEnumeration(Enumeration<String,String> enumeration) |
void |
setExportable(boolean exportable) |
void |
setExportFormatter(Formatter<?> exportFormatter) |
void |
setExportProperty(String exportProperty) |
void |
setFilterable(boolean filterable) |
void |
setFilterProperty(String filterProperty) |
void |
setFormatter(Formatter<? super V> formatter) |
void |
setId(String id) |
void |
setProperty(String property) |
void |
setSortable(boolean sortable) |
void |
setSortProperty(String sortProperty) |
void |
setStyle(String style) |
void |
setTitle(String title) |
void |
setTooltip(String tooltip) |
void |
setValueType(Type valueType) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValue
private String id
private String clazz
private String style
private String title
private String tooltip
private String property
private Type valueType
private boolean sortable
private String sortProperty
private boolean filterable
private String filterProperty
private boolean exportable
private String exportProperty
private Formatter<?> exportFormatter
private Enumeration<String,String> enumeration
public String getId()
ListColumnAction
getId
in interface ListColumnAction<I,V>
public void setId(String id)
public String getClazz()
ListColumnAction
getClazz
in interface ListColumnAction<I,V>
public void setClazz(String clazz)
public String getStyle()
ListColumnAction
getStyle
in interface ListColumnAction<I,V>
public void setStyle(String style)
public String getTitle()
ListColumnAction
getTitle
in interface ListColumnAction<I,V>
public void setTitle(String title)
public String getTooltip()
ListColumnAction
getTooltip
in interface ListColumnAction<I,V>
public void setTooltip(String tooltip)
public String getProperty()
ListColumnAction
getProperty
in interface ListColumnAction<I,V>
public void setProperty(String property)
public Type getValueType()
ListColumnAction
getValueType
in interface ListColumnAction<I,V>
public void setValueType(Type valueType)
public boolean isSortable()
ListColumnAction
ListColumnAction.getSortProperty()
.isSortable
in interface ListColumnAction<I,V>
public void setSortable(boolean sortable)
public String getSortProperty()
ListColumnAction
getSortProperty
in interface ListColumnAction<I,V>
public void setSortProperty(String sortProperty)
public boolean isFilterable()
ListColumnAction
ListColumnAction.getFilterProperty()
.isFilterable
in interface ListColumnAction<I,V>
public void setFilterable(boolean filterable)
public String getFilterProperty()
ListColumnAction
getFilterProperty
in interface ListColumnAction<I,V>
public void setFilterProperty(String filterProperty)
public boolean isExportable()
ListColumnAction
ListColumnAction.getExportProperty()
.isExportable
in interface ListColumnAction<I,V>
public void setExportable(boolean exportable)
public String getExportProperty()
ListColumnAction
getExportProperty
in interface ListColumnAction<I,V>
public void setExportProperty(String exportProperty)
public Enumeration<String,String> getEnumeration()
ListColumnAction
getEnumeration
in interface ListColumnAction<I,V>
public void setEnumeration(Enumeration<String,String> enumeration)
public Formatter<? super V> getFormatter()
ListColumnAction
Formatter.format(Object)
method is called once for
every item that is listed in the table.getFormatter
in interface ListColumnAction<I,V>
Object.toString()
public Formatter<?> getExportFormatter()
ListColumnAction
Formatter.format(Object)
method is called once for
every item that is listed in the table.getExportFormatter
in interface ListColumnAction<I,V>
Object.toString()
public void setExportFormatter(Formatter<?> exportFormatter)
public Object getExportValue(DbControl dc, I item)
ListColumnAction.getValue(DbControl, Object)
.
If the exported value should be different from the regular value the
subclass must override this method as well.getExportValue
in interface ListColumnAction<I,V>
dc
- An open DbControl than can be used to query the databaseitem
- The current item