public final class ColumnDefList<T> extends Object implements Iterable<SimpleColumnDef<?>>
SimpleColumnDef columns used to define characteristics of columns in any
tabular presentation. This class maintains the list, and has utility methods to manipulate
that list.| Modifier and Type | Field and Description |
|---|---|
static String |
NUMERIC_CSS_CLASS |
| Constructor and Description |
|---|
ColumnDefList(Class<T> rootClass,
ClassMetaModel cmm) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(SimpleColumnDef<?> cd) |
<R> void |
addColumns(Object... cols)
Deprecated.
|
void |
addDefaultColumns()
Add all of the columns as defined by the metadata to the list.
|
void |
assignPercentages()
Width calculations: this tries to assign widths to columns that have no explicit width assigned.
|
SimpleColumnDef<T> |
column()
Add a column which gets referred the row element instead of a column element.
|
<V> SimpleColumnDef<V> |
column(Class<V> type,
String property)
Add and return the column definition for a column on the specified property.
|
SimpleColumnDef<?> |
column(String property)
This adds a column on the specified property, but has no idea about the real type.
|
<V> ExpandedColumnDef<V> |
expand(Class<V> clz,
String property) |
ExpandedColumnDef<?> |
expand(String property)
This adds an expanded column on the specified property, but has no idea about the real type.
|
SimpleColumnDef<?> |
findColumn(String propertyName) |
SimpleColumnDef<?> |
get(int ix) |
SimpleColumnDef<?> |
getSortColumn() |
int |
indexOf(SimpleColumnDef<?> scd) |
Iterator<SimpleColumnDef<?>> |
iterator()
Return the iterator for all elements.
|
void |
setDefaultSortColumn(String sort)
Set the default sort column by property name.
|
void |
setSortColumn(SimpleColumnDef<?> cd) |
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final String NUMERIC_CSS_CLASS
public ColumnDefList(@Nonnull Class<T> rootClass, @Nonnull ClassMetaModel cmm)
public int size()
public void add(@Nonnull SimpleColumnDef<?> cd)
@Nonnull public SimpleColumnDef<?> get(int ix)
@Nullable public SimpleColumnDef<?> findColumn(@Nonnull String propertyName)
public void setDefaultSortColumn(@Nullable String sort)
sort - public void setSortColumn(@Nullable SimpleColumnDef<?> cd)
@Deprecated public <R> void addColumns(@Nonnull Object... cols)
RowRenderer instead or use the different "column(xx)" methods in this class.
Add the specified list of property names and presentation options to the column definitions. The items passed in the
columns object can be multiple property definitions followed by specifications. A property name is a string starting
with a letter always. All other Strings and objects are treated as specifications for display. The possible specifications
are:
cols - public void addDefaultColumns()
public void assignPercentages()
@Nonnull public Iterator<SimpleColumnDef<?>> iterator()
iterator in interface Iterable<SimpleColumnDef<?>>Iterable.iterator()public int indexOf(@Nonnull SimpleColumnDef<?> scd)
@Nullable public SimpleColumnDef<?> getSortColumn()
@Nonnull public <V> SimpleColumnDef<V> column(@Nonnull Class<V> type, @Nonnull String property)
column(String).type - property - @Nonnull public SimpleColumnDef<?> column(@Nonnull String property)
property - @Nonnull public SimpleColumnDef<T> column()
@Nonnull public <V> ExpandedColumnDef<V> expand(@Nonnull Class<V> clz, @Nonnull String property)
clz - property - @Nonnull public ExpandedColumnDef<?> expand(@Nonnull String property)
property - Copyright © 2017 etc.to. All rights reserved.