|
GWT 2.4.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. The column may maintain view data
for each cell on demand. New view data, if needed, is created by the cell's
onBrowserEvent method, stored in the Column, and passed to future calls to
Cell's Cell.onBrowserEvent(com.google.gwt.cell.client.Cell.Context, com.google.gwt.dom.client.Element, C, com.google.gwt.dom.client.NativeEvent, com.google.gwt.cell.client.ValueUpdater and Cell.render(com.google.gwt.cell.client.Cell.Context, C, com.google.gwt.safehtml.shared.SafeHtmlBuilder) methods.
| 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. |
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 |
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 |
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 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 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 applyin a space-separated list,
or null if there are no extra styles for this cellpublic 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.4.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||