|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.widget.table.PropertyColumn
public class PropertyColumn
A column descriptor to access a specific property. Minimal configuration includes the propertyName and an
Accessor
. Other features can be set using the normal bean setters and getters or through a number
of chaining methods. The latter is particularly useful to create columns by instantiating the column with
the minimum requirements and then adding all settings in one go.
Field Summary | |
---|---|
static int |
UNSPECIFIED_WIDTH
No specific width set. |
Constructor Summary | |
---|---|
PropertyColumn(Class<?> type,
Accessor accessor,
String propertyName,
String[] headerKeys,
int minWidth,
int maxWidth,
boolean resizable,
TableCellRenderer renderer,
TableCellEditor editor,
Comparator<?> comparator,
boolean isSelectColumn,
boolean visible)
Deprecated. Please use the other system (minimal constructor + adding necessary elements) |
|
PropertyColumn(String propertyName)
|
|
PropertyColumn(String propertyName,
Accessor accessor,
Class<?> propertyType)
Minimal construction requires a propertyName and an Accessor . |
Method Summary | |
---|---|
Accessor |
getAccessor()
|
Comparator<?> |
getComparator()
|
TableCellEditor |
getEditor()
|
String |
getHeader()
Returns the header to be used as column title. |
String[] |
getHeaderKeys()
Returns the header keys that are used to fetch the column title if the header property is not set. |
int |
getMaxWidth()
Returns the maximum width for this column. |
int |
getMinWidth()
Returns the minimum width for this column. |
String |
getPropertyName()
|
TableCellRenderer |
getRenderer()
|
Class<?> |
getType()
|
boolean |
isFilterColumn()
|
boolean |
isResizable()
|
boolean |
isSelectColumn()
|
boolean |
isVisible()
|
void |
setAccessor(Accessor accessor)
Set the accessor to use when retrieving the property value. |
void |
setComparator(Comparator<?> comparator)
|
void |
setEditor(TableCellEditor editor)
|
void |
setFilterColumn(boolean isFilterColumn)
|
void |
setHeader(String header)
|
void |
setHeaderKeys(String[] headerKeys)
Set the keys used to fetch the column title from the resources if no header is explicitly set. |
void |
setMaxWidth(int maxWidth)
Set the maximum width of this column. |
void |
setMinWidth(int minWidth)
Set the minimum width for this column. |
void |
setRenderer(TableCellRenderer renderer)
|
void |
setResizable(boolean resizable)
|
void |
setSelectColumn(boolean isSelectColumn)
|
void |
setType(Class<?> type)
The type of the property. |
void |
setVisible(boolean visible)
|
PropertyColumn |
withComparator(Comparator<?> comparator)
|
PropertyColumn |
withEditor(AbstractDataEditorWidget dataEditor)
|
PropertyColumn |
withEditor(BindingFactory bindingFactory)
|
PropertyColumn |
withEditor(FormModel formModel)
|
PropertyColumn |
withEditor(TableCellEditor editor)
|
PropertyColumn |
withFilterColumn(boolean isFilterColumn)
|
PropertyColumn |
withFixedWidth(int width)
Chaining method to set the minimum and maximum width to the same value. |
PropertyColumn |
withHeaderKeys(String[] headerKeys)
Chaining method to set header keys. |
PropertyColumn |
withMaxWidth(int maxWidth)
Chaining method to set the maximum width. |
PropertyColumn |
withMinWidth(int minWidth)
Chaining method to set the minimum width. |
PropertyColumn |
withRenderer(TableCellRenderer renderer)
|
PropertyColumn |
withResizable(boolean resizable)
|
PropertyColumn |
withSelectColumn(boolean isSelectColumn)
|
PropertyColumn |
withVisible(boolean visible)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNSPECIFIED_WIDTH
Constructor Detail |
---|
public PropertyColumn(String propertyName)
public PropertyColumn(String propertyName, Accessor accessor, Class<?> propertyType)
Accessor
.
propertyName
- name of the property.accessor
- read-access for the property.public PropertyColumn(Class<?> type, Accessor accessor, String propertyName, String[] headerKeys, int minWidth, int maxWidth, boolean resizable, TableCellRenderer renderer, TableCellEditor editor, Comparator<?> comparator, boolean isSelectColumn, boolean visible)
Method Detail |
---|
public void setAccessor(Accessor accessor)
accessor
- the Accessor
to read the property value.public void setType(Class<?> type)
type
- the type of the property.public String getHeader()
public String[] getHeaderKeys()
public PropertyColumn withHeaderKeys(String[] headerKeys)
headerKeys
- keys used to fetch the column title from the resources if no header is explicitly set.
this
public void setHeaderKeys(String[] headerKeys)
public int getMaxWidth()
public PropertyColumn withMaxWidth(int maxWidth)
maxWidth
- maximum width for this column
this
public void setMaxWidth(int maxWidth)
public int getMinWidth()
public PropertyColumn withMinWidth(int minWidth)
minWidth
- minimum width for this column
this
public void setMinWidth(int minWidth)
public PropertyColumn withFixedWidth(int width)
width
- fixed width for this column
this
public boolean isResizable()
public PropertyColumn withResizable(boolean resizable)
public void setResizable(boolean resizable)
public PropertyColumn withFilterColumn(boolean isFilterColumn)
public void setFilterColumn(boolean isFilterColumn)
public boolean isFilterColumn()
public TableCellRenderer getRenderer()
public PropertyColumn withRenderer(TableCellRenderer renderer)
public void setRenderer(TableCellRenderer renderer)
public TableCellEditor getEditor()
public PropertyColumn withEditor(TableCellEditor editor)
public PropertyColumn withEditor(BindingFactory bindingFactory)
public PropertyColumn withEditor(FormModel formModel)
public PropertyColumn withEditor(AbstractDataEditorWidget dataEditor)
public void setEditor(TableCellEditor editor)
public Comparator<?> getComparator()
public PropertyColumn withComparator(Comparator<?> comparator)
public void setComparator(Comparator<?> comparator)
public PropertyColumn withSelectColumn(boolean isSelectColumn)
public boolean isSelectColumn()
public void setSelectColumn(boolean isSelectColumn)
public boolean isVisible()
public PropertyColumn withVisible(boolean visible)
public void setVisible(boolean visible)
public Class<?> getType()
public Accessor getAccessor()
public String getPropertyName()
public void setHeader(String header)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |