Package org.ujorm.tools.web.table
Class ColumnModel<D,V>
java.lang.Object
org.ujorm.tools.web.table.ColumnModel<D,V>
Table column model
- Author:
- Pavel Ponec
-
Constructor Summary
ConstructorsConstructorDescriptionColumnModel(int index, @NotNull Function<D, V> column, @NotNull CharSequence title, @Nullable HttpParameter param) ColumnModel(@NotNull Direction direction, int index) -
Method Summary
Modifier and TypeMethodDescription@NotNull Comparator<D>getComparator(@NotNull Comparator<D> defaultCompar) Get comparator of a sortable column@NotNull Comparator<D>getComparator(@Nullable Function<D, ?> defaultFce) Get comparator of a sortable column@NotNull DirectionintgetIndex()@Nullable HttpParametergetParam()@NotNull HttpParametergetParam(@NotNull HttpParameter defaultValue) @NotNull CharSequencegetTitle()booleanprotected booleanIncluding is more common choicebooleanstatic @NotNull ColumnModelstatic <D,V> ColumnModel<D, V> ofStub()Create a stub columnfinal voidsetDirection(@NotNull Direction direction) final voidsetSortable(@NotNull Direction direction) toCode(boolean opposite) Write the content to an appendable text streamtoCode(boolean opposite, @NotNull Appendable writer) Write the content to an appendable text stream where the default direction is an ASCENDING.toString()
-
Constructor Details
-
ColumnModel
-
ColumnModel
public ColumnModel(int index, @NotNull @NotNull Function<D, V> column, @NotNull @NotNull CharSequence title, @Nullable @Nullable HttpParameter param)
-
-
Method Details
-
getIndex
public int getIndex() -
getColumn
-
getTitle
-
getParam
-
getParam
-
isSortable
public boolean isSortable() -
getDirection
-
isFiltered
public boolean isFiltered() -
setSortable
-
setDirection
-
toCode
Write the content to an appendable text stream -
toCode
Write the content to an appendable text stream where the default direction is an ASCENDING.- Throws:
IOException
-
getComparator
Get comparator of a sortable column -
getComparator
Get comparator of a sortable column -
isIncludeColumnType
protected boolean isIncludeColumnType()Including is more common choice -
toString
-
ofCode
-
ofStub
Create a stub column
-