com.alkacon.geranium.client.ui.input
public class MultiCheckBox extends com.google.gwt.user.client.ui.Composite implements I_FormWidget, I_HasInit
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledI_FormWidget.FieldType| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
WIDGET_TYPE
The type string for this widget.
|
| Constructor and Description |
|---|
MultiCheckBox(java.util.Map<java.lang.String,java.lang.String> items)
Constructs a new checkbox group from a map from strings to strings.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getApparentValue()
Returns the "apparent value", i.e. either the real value if available, or else the ghost value if available, or null otherwise.
|
I_FormWidget.FieldType |
getFieldType()
Returns the type of data this widget produces.
|
java.lang.Object |
getFormValue()
Gets the selected/entered value from the widget.
|
java.lang.String |
getFormValueAsString()
Gets the current value of the widget as a string.
|
java.util.Set<java.lang.String> |
getSelected()
Returns the set of values of the selected checkboxes.
|
protected void |
init(java.util.Map<java.lang.String,java.lang.String> items)
Initializes the widget given a map of select options.
|
boolean |
isEnabled()
Returns
true if this widget is enabled. |
void |
reset()
Resets the widget to its default state.
|
void |
setAutoHideParent(I_AutoHider autoHideParent)
Call this when auto hiding parents are shown.
|
void |
setEnabled(boolean enabled)
Enables or disables the widget.
|
void |
setErrorMessage(java.lang.String errorMessage)
Sets the error message for this widget.
|
void |
setFormValue(java.lang.Object value)
Sets the value of the widget.
|
void |
setFormValueAsString(java.lang.String formValue)
Sets the current value of the widget as a string.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventspublic static final java.lang.String WIDGET_TYPE
public MultiCheckBox(java.util.Map<java.lang.String,java.lang.String> items)
The keys of the map are used as the selection values of the checkboxes, while the value for a given key in the map is used as the label for the checkbox which is displayed to the user.
items - the map of checkbox optionspublic java.lang.String getApparentValue()
I_FormWidgetgetApparentValue in interface I_FormWidgetI_FormWidget.getApparentValue()public I_FormWidget.FieldType getFieldType()
I_FormWidgetgetFieldType in interface I_FormWidgetI_FormWidget.getFieldType()public java.lang.Object getFormValue()
I_FormWidgetgetFormValue in interface I_FormWidgetI_FormWidget.getFormValue()public java.lang.String getFormValueAsString()
I_FormWidgetgetFormValueAsString in interface I_FormWidgetI_FormWidget.getFormValueAsString()public java.util.Set<java.lang.String> getSelected()
public boolean isEnabled()
I_FormWidgettrue if this widget is enabled.isEnabled in interface I_FormWidgettrue if this widget is enabledI_FormWidget.isEnabled()public void reset()
I_FormWidgetreset in interface I_FormWidgetI_FormWidget.reset()public void setAutoHideParent(I_AutoHider autoHideParent)
I_FormWidgetsetAutoHideParent in interface I_FormWidgetautoHideParent - the auto hide parentI_FormWidget.setAutoHideParent(com.alkacon.geranium.client.ui.I_AutoHider)public void setEnabled(boolean enabled)
I_FormWidgetsetEnabled in interface I_FormWidgetenabled - if true, the widget will be enabled, else disabledI_FormWidget.setEnabled(boolean)public void setErrorMessage(java.lang.String errorMessage)
I_FormWidgetIf the error message is null, no error message will be displayed.
setErrorMessage in interface I_FormWidgeterrorMessage - an error message or nullI_FormWidget.setErrorMessage(java.lang.String)public void setFormValue(java.lang.Object value)
value - the new valuepublic void setFormValueAsString(java.lang.String formValue)
I_FormWidgetsetFormValueAsString in interface I_FormWidgetformValue - the new value of the widgetI_FormWidget.setFormValueAsString(java.lang.String)protected void init(java.util.Map<java.lang.String,java.lang.String> items)
The keys of the map are the values of the select options, while the values of the map are the labels which should be used for the checkboxes.
items - the map of select options