T
- the row typeC
- the column typepublic abstract class Column<T,C> extends Object implements com.google.gwt.cell.client.HasCell<T,C>, gwt.material.design.client.base.HasHideOn, gwt.material.design.client.base.HasTextAlign
Constructor and Description |
---|
Column(com.google.gwt.cell.client.Cell<C> cell)
Construct a new Column with a given
Cell . |
Modifier and Type | Method and Description |
---|---|
boolean |
autoSort() |
boolean |
defaultSortAscending()
Check if the default sort order of the column is ascending or descending.
|
com.google.gwt.cell.client.FieldUpdater<T,C> |
fieldUpdater() |
com.google.gwt.cell.client.Cell<C> |
getCell()
Returns the
Cell responsible for rendering items in the column. |
com.google.gwt.cell.client.FieldUpdater<T,C> |
getFieldUpdater() |
gwt.material.design.client.constants.HideOn |
getHideOn() |
String |
getName() |
Comparator<? super RowComponent<T>> |
getSortComparator() |
Map<StyleName,String> |
getStyleProperties()
Return the registered style properties.
|
String |
getStyleProperty(StyleName styleName)
Get a styles property.
|
gwt.material.design.client.constants.TextAlign |
getTextAlign() |
abstract C |
getValue(T object)
Returns the column value from within the underlying data object.
|
String |
getWidth()
Get the columns header width.
|
gwt.material.design.client.constants.HideOn |
hideOn() |
boolean |
isAutoSort()
Is this column auto sorting when rendered.
|
boolean |
isDefaultSortAscending()
Check if the default sort order of the column is ascending or descending.
|
boolean |
isNumeric() |
boolean |
isSortable()
Check if the column is sortable.
|
String |
name() |
boolean |
numeric() |
void |
onBrowserEvent(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element elem,
T object,
com.google.gwt.dom.client.NativeEvent event)
Handle a browser event that took place within the column.
|
void |
render(com.google.gwt.cell.client.Cell.Context context,
T object,
com.google.gwt.safehtml.shared.SafeHtmlBuilder sb)
Render the object into the cell.
|
void |
setAutoSort(boolean autoSort)
Make this column auto sort on rendering, if multiple columns are auto
sorting it will be based on the first one set to auto sort.
|
void |
setDefaultSortAscending(boolean isAscending)
Set whether or not the default sort order is ascending.
|
void |
setFieldUpdater(com.google.gwt.cell.client.FieldUpdater<T,C> fieldUpdater) |
void |
setHideOn(gwt.material.design.client.constants.HideOn hideOn) |
void |
setName(String name)
Sets a string that identifies this column in a data query.
|
void |
setNumeric(boolean numeric) |
void |
setSortComparator(Comparator<? super RowComponent<T>> sortComparator) |
void |
setStyleProperties(Map<StyleName,String> styleProps)
Set the style properties map.
|
void |
setStyleProperty(StyleName styleName,
String value)
Set a style property using its name as the key.
|
void |
setTextAlign(gwt.material.design.client.constants.TextAlign align) |
void |
setWidth(String width)
Set the columns header width.
|
Comparator<? super RowComponent<T>> |
sortComparator() |
Map<StyleName,String> |
styleProperties() |
gwt.material.design.client.constants.TextAlign |
textAlign() |
String |
toString() |
String |
width() |
public void onBrowserEvent(com.google.gwt.cell.client.Cell.Context context, com.google.gwt.dom.client.Element elem, T object, com.google.gwt.dom.client.NativeEvent event)
context
- the cell contextelem
- the parent Elementobject
- the base object to be updatedevent
- the native browser eventpublic final com.google.gwt.cell.client.Cell<C> getCell()
Cell
responsible for rendering items in the column.public abstract C getValue(T object)
public void render(com.google.gwt.cell.client.Cell.Context context, T object, com.google.gwt.safehtml.shared.SafeHtmlBuilder sb)
object
- the object to rendersb
- the buffer to render intopublic final void setName(String name)
name
- name of the column from the data store's perspectivepublic final String getName()
public final boolean isDefaultSortAscending()
public final void setDefaultSortAscending(boolean isAscending)
isAscending
- true to set the default order to ascending, false for
descendingpublic boolean defaultSortAscending()
public final boolean isAutoSort()
public final void setAutoSort(boolean autoSort)
public boolean autoSort()
public boolean isSortable()
public final void setSortComparator(Comparator<? super RowComponent<T>> sortComparator)
public final Comparator<? super RowComponent<T>> getSortComparator()
public Comparator<? super RowComponent<T>> sortComparator()
public final com.google.gwt.cell.client.FieldUpdater<T,C> getFieldUpdater()
public final void setFieldUpdater(com.google.gwt.cell.client.FieldUpdater<T,C> fieldUpdater)
public com.google.gwt.cell.client.FieldUpdater<T,C> fieldUpdater()
public final boolean isNumeric()
public final void setNumeric(boolean numeric)
public boolean numeric()
public final void setHideOn(gwt.material.design.client.constants.HideOn hideOn)
setHideOn
in interface gwt.material.design.client.base.HasHideOn
public final gwt.material.design.client.constants.HideOn getHideOn()
getHideOn
in interface gwt.material.design.client.base.HasHideOn
public gwt.material.design.client.constants.HideOn hideOn()
public final void setTextAlign(gwt.material.design.client.constants.TextAlign align)
setTextAlign
in interface gwt.material.design.client.base.HasTextAlign
public final gwt.material.design.client.constants.TextAlign getTextAlign()
getTextAlign
in interface gwt.material.design.client.base.HasTextAlign
public gwt.material.design.client.constants.TextAlign textAlign()
public final void setStyleProperty(StyleName styleName, String value)
styleName
- the style name as seen here Style.STYLE_Z_INDEX
for example.value
- the string value required for the given style property.public final String getStyleProperty(StyleName styleName)
styleName
- the styles name as represented in a Style
class.public final Map<StyleName,String> getStyleProperties()
public final void setStyleProperties(Map<StyleName,String> styleProps)
public Map<StyleName,String> styleProperties()
Copyright © 2018. All rights reserved.