public class ColumnConfig<M,N> extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
ariaIgnore
True to disable keyboard column navigation of this column.
|
Constructor and Description |
---|
ColumnConfig(ValueProvider<? super M,N> valueProvider)
Creates a new column config.
|
ColumnConfig(ValueProvider<? super M,N> valueProvider,
int width)
Creates a new column config.
|
ColumnConfig(ValueProvider<? super M,N> valueProvider,
int width,
SafeHtml header)
Creates a new column config.
|
Modifier and Type | Method and Description |
---|---|
<any> |
getCell()
Returns the column's cell renderer.
|
String |
getCellClassName()
Returns the cell's class name(s).
|
String |
getColumnHeaderClassName()
Returns the column class names(s).
|
SafeStyles |
getColumnStyle()
Returns the column cells styles.
|
String |
getColumnTextClassName()
Returns the column text class name(s).
|
SafeStyles |
getColumnTextStyle()
Returns the column text styles.
|
Comparator<N> |
getComparator()
Returns the comparator used to compare the items in this column when
grouping or sorting.
|
SafeHtml |
getHeader()
Returns the column's header text.
|
HorizontalAlignmentConstant |
getHorizontalAlignment()
Returns the column's horizontal alignment.
|
HorizontalAlignmentConstant |
getHorizontalHeaderAlignment()
Returns the column's header horizontal alignment.
|
String |
getPath()
Returns the value provider path.
|
SafeHtml |
getToolTip()
Returns the column's tool tip.
|
ValueProvider<? super M,N> |
getValueProvider()
Returns the column's valueProvider.
|
VerticalAlignmentConstant |
getVerticalAlignment()
Returns the column's vertical alignment.
|
Widget |
getWidget()
Returns the column's widget.
|
int |
getWidth()
Returns the column's width.
|
boolean |
isCellPadding() |
boolean |
isFixed()
Returns true if the column width cannot be changed.
|
boolean |
isGroupable()
Returns true if the column can be grouped.
|
boolean |
isHidden()
Returns true if the column is hidden.
|
boolean |
isHideable()
Returns true if the column can be hidden.
|
boolean |
isMenuDisabled()
Returns true if the column's menu is disabled.
|
boolean |
isResizable()
Returns true if the column is resizable.
|
boolean |
isRowHeader()
Returns true if the column is marked as the row header.
|
boolean |
isSortable()
Returns
true if the column is sortable (pre-render). |
void |
setCell(<any> cell)
Sets the column's cell renderer (pre-render).
|
void |
setCellClassName(String cellClassName)
If provided, this value will be added to all table cells for the column.
|
void |
setCellPadding(boolean cellPadding)
Configures whether or not the column's cells should have the default padding around their contents.
|
void |
setColumnHeaderClassName(String classNames)
Sets the CSS class name(s) to be applied to the header element (defaults to
null).
|
void |
setColumnStyle(SafeStyles columnStyles)
Sets the CSS class name(s) to be applied to the cell in the column
(defaults to null).
|
void |
setColumnTextClassName(String columnTextClassName)
Sets the CSS class name(s) to be applied to the text element of each cell
in the column (defaults to null).
|
void |
setColumnTextStyle(SafeStyles textStyles)
Sets one to many CSS styles to be applied to the text element of each cell
in the column (defaults to null).
|
void |
setComparator(Comparator<N> comparator)
Sets the comparator used to compare the items in this column when grouping
or sorting.
|
void |
setFixed(boolean fixed)
True if the column width cannot be changed either by column model or user
resizing (defaults to false, pre-render).
|
void |
setGroupable(boolean groupable)
Sets if the column is groupable (defaults to true).
|
void |
setHeader(SafeHtml header)
Sets the column's header text.
|
void |
setHidden(boolean hidden)
Sets whether the column is hidden.
|
void |
setHideable(boolean hideable)
True to allow the column to be hidden via the context menu (defaults to
true).
|
void |
setHorizontalAlignment(HorizontalAlignmentConstant horizontalAlignment)
Sets the column's horizontal alignment.
|
void |
setHorizontalHeaderAlignment(HorizontalAlignmentConstant horizontalHeaderAlignment)
Sets the column's header horizontal alignment.
|
void |
setMenuDisabled(boolean menuDisabled)
Sets whether the column's menu is disabled (pre-render).
|
void |
setResizable(boolean resizable)
Specifies if the column may be resized (defaults to true, pre-render).
|
void |
setRowHeader(boolean rowHeader)
True to mark this column as the row header.
|
void |
setSortable(boolean sortable)
Sets if the column can be sorted (defaults to true, pre-render).
|
void |
setToolTip(SafeHtml toolTip)
Sets the column's tool tip.
|
void |
setVerticalAlignment(VerticalAlignmentConstant verticalAlignment)
Sets the column's vertical alignment.
|
void |
setWidget(Widget widget,
SafeHtml header)
Sets the column's widget.
|
void |
setWidth(int width)
Sets the column's width in pixels.
|
protected boolean ariaIgnore
public ColumnConfig(ValueProvider<? super M,N> valueProvider)
public ColumnConfig(ValueProvider<? super M,N> valueProvider, int width)
valueProvider
- the value providerwidth
- the column widthpublic ColumnConfig(ValueProvider<? super M,N> valueProvider, int width, SafeHtml header)
valueProvider
- the value providerwidth
- the column widthheader
- the column header contentpublic HorizontalAlignmentConstant getHorizontalAlignment()
public VerticalAlignmentConstant getVerticalAlignment()
public HorizontalAlignmentConstant getHorizontalHeaderAlignment()
public <any> getCell()
public String getCellClassName()
public String getColumnHeaderClassName()
public SafeStyles getColumnStyle()
public String getColumnTextClassName()
public SafeStyles getColumnTextStyle()
public Comparator<N> getComparator()
N
implements Comparable
, this is
not required to sort or group.public SafeHtml getHeader()
public String getPath()
public SafeHtml getToolTip()
public ValueProvider<? super M,N> getValueProvider()
public Widget getWidget()
public int getWidth()
public boolean isCellPadding()
public boolean isFixed()
public boolean isGroupable()
public boolean isHidden()
public boolean isHideable()
public boolean isMenuDisabled()
public boolean isResizable()
public boolean isRowHeader()
public boolean isSortable()
true
if the column is sortable (pre-render).public void setHorizontalAlignment(HorizontalAlignmentConstant horizontalAlignment)
horizontalAlignment
- the horizontal alignmentpublic void setHorizontalHeaderAlignment(HorizontalAlignmentConstant horizontalHeaderAlignment)
horizontalHeaderAlignment
- the horizontal header alignmentpublic void setCell(<any> cell)
cell
- the cell rendererpublic void setCellPadding(boolean cellPadding)
cellPadding
- false to disable padding around the contents of a cellpublic void setCellClassName(String cellClassName)
cellClassName
- the cell class name(s)public void setColumnHeaderClassName(String classNames)
classNames
- the space separated list of class namespublic void setColumnStyle(SafeStyles columnStyles)
columnStyles
- the column stylespublic void setColumnTextClassName(String columnTextClassName)
columnTextClassName
- the space separated list of class namespublic void setColumnTextStyle(SafeStyles textStyles)
textStyles
- the stylespublic void setComparator(Comparator<N> comparator)
N
implements Comparable
, this is not
required to sort or group.comparator
- the Comparator to use when locally sorting or groupingpublic void setFixed(boolean fixed)
fixed
- true for fixed column widthpublic void setGroupable(boolean groupable)
groupable
- true to allow groupingpublic void setHeader(SafeHtml header)
header
- the header text#setHeader(String)
public void setHidden(boolean hidden)
hidden
- true to hidepublic void setHideable(boolean hideable)
hideable
- true to allow hidingpublic void setMenuDisabled(boolean menuDisabled)
menuDisabled
- true to disable the menupublic void setResizable(boolean resizable)
resizable
- the resizable statepublic void setRowHeader(boolean rowHeader)
rowHeader
- true to mark the column as the row headerpublic void setSortable(boolean sortable)
sortable
- the sortable statepublic void setToolTip(SafeHtml toolTip)
toolTip
- the tool tippublic void setVerticalAlignment(VerticalAlignmentConstant verticalAlignment)
verticalAlignment
- the verticalAlignmentpublic void setWidget(Widget widget, SafeHtml header)
widget
- the widgetheader
- the text used for the column context menupublic void setWidth(int width)
width
- the widthCopyright © 2018. All rights reserved.