public class CheckBoxCell extends ValueBaseInputCell<Boolean>
Grid
you can adjust the grids cell padding with this code:
ColumnConfig<Stock, Boolean> splitCol = new ColumnConfig<Stock, Boolean>(props.split(), 50, "Split"); splitCol.setCell(new CheckBoxCell()); // reduce the padding on text element as we have widgets in the cells SafeStyles textStyles = SafeStylesUtils.fromTrustedString("padding: 1px 3px;"); splitCol.setColumnTextStyle(textStyles);
Modifier and Type | Class and Description |
---|---|
static interface |
CheckBoxCell.CheckBoxAppearance |
static class |
CheckBoxCell.CheckBoxCellOptions |
ValueBaseInputCell.ValueBaseFieldAppearance
FieldCell.FieldAppearance, FieldCell.FieldAppearanceOptions, FieldCell.FieldViewData
Cell.Context
Constructor and Description |
---|
CheckBoxCell() |
CheckBoxCell(CheckBoxCell.CheckBoxAppearance appearance) |
Modifier and Type | Method and Description |
---|---|
CheckBoxCell.CheckBoxAppearance |
getAppearance()
Returns the cell's appearance.
|
String |
getBoxLabel() |
boolean |
isEditing(Cell.Context context,
Element parent,
Boolean value) |
void |
onBrowserEvent(Cell.Context context,
Element parent,
Boolean value,
NativeEvent event,
ValueUpdater<Boolean> valueUpdater) |
void |
render(Cell.Context context,
Boolean value,
SafeHtmlBuilder sb) |
void |
setBoxLabel(XElement parent,
String boxLabel)
The text that appears beside the checkbox (defaults to null).
|
addParseErrorHandler, disable, enable, getCursorPos, getEmptyText, getFocusElement, getInputElement, getName, getPropertyEditor, getText, isAllowBlank, isClearValueOnParseError, isSelectOnFocus, onEmpty, resetFocus, select, selectAll, setAllowBlank, setClearValueOnParseError, setCursorPos, setEmptyText, setName, setPropertyEditor, setSelectOnFocus, setText
finishEditing, getHeight, getWidth, handlesSelection, isDisabled, isReadOnly, onValid, redrawOnResize, setHeight, setReadOnly, setSize, setSize, setWidth
addHandler, fireEvent, isDisableEvents, setDisableEvents
clearViewData, getViewData, setViewData
dependsOnSelection, getConsumedEvents, setValue
public CheckBoxCell()
public CheckBoxCell(CheckBoxCell.CheckBoxAppearance appearance)
public CheckBoxCell.CheckBoxAppearance getAppearance()
ValueBaseInputCell
getAppearance
in class ValueBaseInputCell<Boolean>
public String getBoxLabel()
public boolean isEditing(Cell.Context context, Element parent, Boolean value)
isEditing
in interface Cell<Boolean>
isEditing
in class AbstractInputCell<Boolean,FieldCell.FieldViewData>
public void onBrowserEvent(Cell.Context context, Element parent, Boolean value, NativeEvent event, ValueUpdater<Boolean> valueUpdater)
onBrowserEvent
in interface Cell<Boolean>
onBrowserEvent
in class FieldCell<Boolean>
public void render(Cell.Context context, Boolean value, SafeHtmlBuilder sb)
Copyright © 2015. All rights reserved.