|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.cell.client.AbstractCell<C> com.google.gwt.cell.client.AbstractEditableCell<java.lang.Boolean,java.lang.Boolean> com.google.gwt.cell.client.CheckboxCell
public class CheckboxCell
A Cell
used to render a checkbox. The value of the checkbox may be
toggled using the ENTER key as well as via mouse click.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell |
---|
Cell.Context |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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,
java.lang.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,
java.lang.Boolean value,
NativeEvent event,
ValueUpdater<java.lang.Boolean> valueUpdater)
Handle a browser event that took place within the cell. |
void |
render(Cell.Context context,
java.lang.Boolean value,
SafeHtmlBuilder sb)
Render a cell as HTML into a SafeHtmlBuilder , suitable for passing
to Element.setInnerHTML(String) on a container element. |
Methods inherited from class com.google.gwt.cell.client.AbstractEditableCell |
---|
clearViewData, getViewData, setViewData |
Methods inherited from class com.google.gwt.cell.client.AbstractCell |
---|
getConsumedEvents, onEnterKeyDown, resetFocus, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CheckboxCell()
CheckboxCell
.
@Deprecated public CheckboxCell(boolean isSelectBox)
CheckboxCell(boolean, boolean)
instead
CheckboxCell
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 stateMethod Detail |
---|
public boolean dependsOnSelection()
Cell
dependsOnSelection
in interface Cell<java.lang.Boolean>
dependsOnSelection
in class AbstractCell<java.lang.Boolean>
public boolean handlesSelection()
Cell
handlesSelection
in interface Cell<java.lang.Boolean>
handlesSelection
in class AbstractCell<java.lang.Boolean>
public boolean isEditing(Cell.Context context, Element parent, java.lang.Boolean value)
AbstractEditableCell
isEditing
in interface Cell<java.lang.Boolean>
isEditing
in class AbstractEditableCell<java.lang.Boolean,java.lang.Boolean>
context
- the Context
of the cellparent
- the parent Elementvalue
- the value associated with the cell
public void onBrowserEvent(Cell.Context context, Element parent, java.lang.Boolean value, NativeEvent event, ValueUpdater<java.lang.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<java.lang.Boolean>
onBrowserEvent
in class AbstractCell<java.lang.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, java.lang.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<java.lang.Boolean>
render
in class AbstractCell<java.lang.Boolean>
context
- the Cell.Context
of the cellvalue
- the cell value to be renderedsb
- the SafeHtmlBuilder
to be written to
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |