Cell.Context
Constructor and Description |
---|
CheckboxCell()
Construct a new
CheckboxCell . |
CheckboxCell(boolean isSelectBox)
Deprecated.
use
CheckboxCell(boolean, boolean) instead |
CheckboxCell(boolean dependsOnSelection,
boolean handlesSelection)
Construct a new
CheckboxCell that optionally controls selection. |
Modifier and Type | Method and Description |
---|---|
boolean |
dependsOnSelection()
Check if this cell depends on the selection state.
|
boolean |
handlesSelection()
Check if this cell handles selection.
|
boolean |
isEditing(Cell.Context context,
Element parent,
Boolean value)
Returns true if the cell is currently editing the data identified by the
given element and key.
|
void |
onBrowserEvent(Cell.Context context,
Element parent,
Boolean value,
NativeEvent event,
ValueUpdater<Boolean> valueUpdater)
Handle a browser event that took place within the cell.
|
void |
render(Cell.Context context,
Boolean value,
SafeHtmlBuilder sb)
Render a cell as HTML into a
SafeHtmlBuilder , suitable for passing
to Element.setInnerHTML(String) on a container element. |
clearViewData, getViewData, setViewData
getConsumedEvents, onEnterKeyDown, resetFocus, setValue
public CheckboxCell()
CheckboxCell
.@Deprecated public CheckboxCell(boolean isSelectBox)
CheckboxCell(boolean, boolean)
insteadCheckboxCell
that optionally controls selection.isSelectBox
- true if the cell controls the selection statepublic CheckboxCell(boolean dependsOnSelection, boolean handlesSelection)
CheckboxCell
that optionally controls selection.dependsOnSelection
- true if the cell depends on the selection statehandlesSelection
- true if the cell modifies the selection statepublic boolean dependsOnSelection()
Cell
dependsOnSelection
in interface Cell<Boolean>
dependsOnSelection
in class AbstractCell<Boolean>
public boolean handlesSelection()
Cell
handlesSelection
in interface Cell<Boolean>
handlesSelection
in class AbstractCell<Boolean>
public boolean isEditing(Cell.Context context, Element parent, Boolean value)
AbstractEditableCell
public void onBrowserEvent(Cell.Context context, Element parent, Boolean value, NativeEvent event, ValueUpdater<Boolean> valueUpdater)
AbstractCell
If you override this method to add support for events, remember to pass the event types that the cell expects into the constructor.
onBrowserEvent
in interface Cell<Boolean>
onBrowserEvent
in class AbstractCell<Boolean>
context
- the Cell.Context
of the cellparent
- the parent Elementvalue
- the value associated with the cellevent
- the native browser eventvalueUpdater
- a ValueUpdater
, or null if not specifiedpublic void render(Cell.Context context, Boolean value, SafeHtmlBuilder sb)
Cell
SafeHtmlBuilder
, suitable for passing
to Element.setInnerHTML(String)
on a container element.
Note: If your cell contains natively focusable elements, such as buttons or input elements, be sure to set the tabIndex to -1 so that they do not steal focus away from the containing widget.
render
in interface Cell<Boolean>
render
in class AbstractCell<Boolean>
context
- the Cell.Context
of the cellvalue
- the cell value to be renderedsb
- the SafeHtmlBuilder
to be written toCopyright © 2016. All rights reserved.