public class ColumnConfig<M,N> extends Object
| Constructor and Description |
|---|
ColumnConfig(ValueProvider<M,N> valueProvider)
Creates a new column config.
|
ColumnConfig(ValueProvider<M,N> valueProvider,
int width)
Creates a new column config.
|
ColumnConfig(ValueProvider<M,N> valueProvider,
int width,
SafeHtml header)
Creates a new column config.
|
ColumnConfig(ValueProvider<M,N> valueProvider,
int width,
String header)
Creates a new column config.
|
| Modifier and Type | Method and Description |
|---|---|
HasHorizontalAlignment.HorizontalAlignmentConstant |
getAlignment()
Returns the column's horizontal alignment.
|
Cell<N> |
getCell()
Returns the column's cell renderer.
|
String |
getColumnClassName()
Returns the columns class name.
|
String |
getColumnStyleName()
Returns the column style name.
|
SafeHtml |
getHeader()
Returns the column's header text.
|
String |
getPath()
Returns the value provider path.
|
String |
getStyle()
Returns the column style.
|
SafeHtml |
getToolTip()
Returns the column's tool tip.
|
ValueProvider<M,N> |
getValueProvider()
Returns the column's valueProvider.
|
Widget |
getWidget()
Returns the column's widget.
|
int |
getWidth()
Returns the column's width.
|
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 |
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 |
setAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant alignment)
Sets the column's horizontal alignment.
|
void |
setCell(Cell<N> cell)
Sets the column's cell renderer (pre-render).
|
void |
setColumnClassName(String columnClassName)
If provided, this value will be appended to 'x-grid3-td-' and be added to
all table cells for the column.
|
void |
setColumnStyleName(String columnStyleName)
Sets the style name to be applied to the header element (defaults to null).
|
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 |
setHeader(String header)
Sets the column's header text, to be displayed as escaped html.
|
void |
setHidden(boolean hidden)
Sets whether the column is hidden.
|
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 |
setStyle(String style)
Sets one to many styles.
|
void |
setToolTip(SafeHtml toolTip)
Sets the column's tool tip.
|
void |
setWidget(Widget widget,
SafeHtml header)
Sets the column's widget.
|
void |
setWidth(int width)
Sets the column's width in pixels.
|
public ColumnConfig(ValueProvider<M,N> valueProvider)
public ColumnConfig(ValueProvider<M,N> valueProvider, int width)
valueProvider - the value providerwidth - the column widthpublic ColumnConfig(ValueProvider<M,N> valueProvider, int width, SafeHtml header)
valueProvider - the value providerwidth - the column widthheader - the column header contentpublic ColumnConfig(ValueProvider<M,N> valueProvider, int width, String header)
valueProvider - thevalueProviderwidth - the column widthheader - the heading textpublic HasHorizontalAlignment.HorizontalAlignmentConstant getAlignment()
public String getColumnClassName()
public String getColumnStyleName()
public SafeHtml getHeader()
public String getPath()
public String getStyle()
public SafeHtml getToolTip()
public ValueProvider<M,N> getValueProvider()
public Widget getWidget()
public int getWidth()
public boolean isFixed()
public boolean isGroupable()
public boolean isHidden()
public boolean isMenuDisabled()
public boolean isResizable()
public boolean isRowHeader()
public boolean isSortable()
true if the column is sortable (pre-render).public void setAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant alignment)
alignment - the alignmentpublic void setCell(Cell<N> cell)
cell - the cell rendererpublic void setColumnClassName(String columnClassName)
columnClassName - the column class namepublic void setColumnStyleName(String columnStyleName)
columnStyleName - the CSS style namepublic 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 textsetHeader(String)public void setHeader(String header)
header - the header text to be displayed as escaped htmlsetHeader(SafeHtml)public void setHidden(boolean hidden)
hidden - true to hidepublic 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 setStyle(String style)
<code>
setStyle("color:red;font-weight: bold");
</code>
style - the stylepublic void setToolTip(SafeHtml toolTip)
toolTip - the tool tippublic void setWidget(Widget widget, SafeHtml header)
widget - the widgetheader - the text used for the column context menupublic void setWidth(int width)
width - the widthCopyright © 2012. All Rights Reserved.