|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.gwt.user.cellview.client.Column<T,C>
T - the row typeC - the column typepublic abstract class Column<T,C>
A representation of a column in a table.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
|---|
HasHorizontalAlignment.AutoHorizontalAlignmentConstant, HasHorizontalAlignment.HorizontalAlignmentConstant |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment |
|---|
HasVerticalAlignment.VerticalAlignmentConstant |
| Field Summary |
|---|
| Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
|---|
ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_LOCALE_END, ALIGN_LOCALE_START, ALIGN_RIGHT |
| Fields inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment |
|---|
ALIGN_BOTTOM, ALIGN_MIDDLE, ALIGN_TOP |
| Constructor Summary | |
|---|---|
Column(Cell<C> cell)
Construct a new Column with a given Cell. |
|
| Method Summary | |
|---|---|
Cell<C> |
getCell()
Returns the Cell responsible for rendering items in the column. |
java.lang.String |
getCellStyleNames(Cell.Context context,
T object)
Get extra style names that should be applied to a cell in this column. |
java.lang.String |
getDataStoreName()
|
FieldUpdater<T,C> |
getFieldUpdater()
Returns the FieldUpdater used for updating values in the column. |
HasHorizontalAlignment.HorizontalAlignmentConstant |
getHorizontalAlignment()
Gets the horizontal alignment. |
abstract C |
getValue(T object)
Returns the column value from within the underlying data object. |
HasVerticalAlignment.VerticalAlignmentConstant |
getVerticalAlignment()
Gets the vertical alignment. |
boolean |
isDefaultSortAscending()
Check if the default sort order of the column is ascending or descending. |
boolean |
isSortable()
Check if the column is sortable. |
void |
onBrowserEvent(Cell.Context context,
Element elem,
T object,
NativeEvent event)
Handle a browser event that took place within the column. |
void |
render(Cell.Context context,
T object,
SafeHtmlBuilder sb)
Render the object into the cell. |
void |
setCellStyleNames(java.lang.String styleNames)
Set extra style names that should be applied to every cell. |
void |
setDataStoreName(java.lang.String name)
Sets a string that identifies this column in a data query. |
void |
setDefaultSortAscending(boolean isAscending)
Set whether or not the default sort order is ascending. |
void |
setFieldUpdater(FieldUpdater<T,C> fieldUpdater)
Set the FieldUpdater used for updating values in the column. |
void |
setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
Sets the horizontal alignment. |
void |
setSortable(boolean sortable)
Set whether or not the column can be sorted. |
void |
setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant align)
Sets the vertical alignment. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Column(Cell<C> cell)
Cell.
cell - the Cell used by this Column| Method Detail |
|---|
public Cell<C> getCell()
Cell responsible for rendering items in the column.
getCell in interface HasCell<T,C>
public java.lang.String getCellStyleNames(Cell.Context context,
T object)
context - the cell contextobject - the base object to be updated, or null if the row is empty
null if there are no extra styles for the cells in this
columnpublic java.lang.String getDataStoreName()
public FieldUpdater<T,C> getFieldUpdater()
FieldUpdater used for updating values in the column.
getFieldUpdater in interface HasCell<T,C>setFieldUpdater(FieldUpdater)public HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
HasHorizontalAlignment
getHorizontalAlignment in interface HasHorizontalAlignmentHasHorizontalAlignment.ALIGN_LEFT,
HasHorizontalAlignment.ALIGN_CENTER,
HasHorizontalAlignment.ALIGN_RIGHT,
HasHorizontalAlignment.ALIGN_JUSTIFY, or
null).public abstract C getValue(T object)
getValue in interface HasCell<T,C>object - a record of type T
public HasVerticalAlignment.VerticalAlignmentConstant getVerticalAlignment()
HasVerticalAlignment
getVerticalAlignment in interface HasVerticalAlignmentpublic boolean isDefaultSortAscending()
public boolean isSortable()
public void onBrowserEvent(Cell.Context context,
Element elem,
T object,
NativeEvent event)
context - the cell contextelem - the parent Elementobject - the base object to be updatedevent - the native browser event
public void render(Cell.Context context,
T object,
SafeHtmlBuilder sb)
context - the cell contextobject - the object to rendersb - the buffer to render intopublic void setCellStyleNames(java.lang.String styleNames)
If you want to apply style names based on the row or cell value, override
#getCellStyleNames(Context, Object) directly.
styleNames - the extra style names to apply in a space-separated list,
or null if there are no extra styles for this cellpublic void setDataStoreName(java.lang.String name)
name - name of the column from the data store's perspectivepublic void setDefaultSortAscending(boolean isAscending)
isAscending - true to set the default order to ascending, false for
descendingpublic void setFieldUpdater(FieldUpdater<T,C> fieldUpdater)
FieldUpdater used for updating values in the column.
fieldUpdater - the field updatergetFieldUpdater()public void setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
Use null to clear horizontal alignment, allowing it to be
determined by the standard HTML mechanisms such as inheritance and CSS
rules.
The new horizontal alignment will apply the next time the table is rendered.
setHorizontalAlignment in interface HasHorizontalAlignmentalign - the horizontal alignment (
HasHorizontalAlignment.ALIGN_LEFT,
HasHorizontalAlignment.ALIGN_CENTER,
HasHorizontalAlignment.ALIGN_RIGHT,
HasHorizontalAlignment.ALIGN_JUSTIFY,
HasHorizontalAlignment.ALIGN_LOCALE_START, or
HasHorizontalAlignment.ALIGN_LOCALE_END).public void setSortable(boolean sortable)
sortable - true to make sortable, false to make unsortablepublic void setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant align)
The new vertical alignment will apply the next time the table is rendered.
setVerticalAlignment in interface HasVerticalAlignmentalign - the vertical alignment (
HasVerticalAlignment.ALIGN_TOP,
HasVerticalAlignment.ALIGN_MIDDLE, or
HasVerticalAlignment.ALIGN_BOTTOM).
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||