|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractField<java.lang.Boolean>
com.vaadin.ui.CheckBox
public class CheckBox
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField |
|---|
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent |
| Nested classes/interfaces inherited from interface com.vaadin.ui.Field |
|---|
Field.ValueChangeEvent |
| Nested classes/interfaces inherited from interface com.vaadin.data.Buffered |
|---|
Buffered.SourceException |
| Nested classes/interfaces inherited from interface com.vaadin.data.Property |
|---|
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
| Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
|---|
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
|---|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener |
| Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
|---|
Sizeable.Unit |
| Field Summary |
|---|
| Fields inherited from class com.vaadin.ui.AbstractComponent |
|---|
DESIGN_ATTR_PLAIN_TEXT |
| Fields inherited from interface com.vaadin.server.Sizeable |
|---|
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
| Constructor Summary | |
|---|---|
CheckBox()
Creates a new checkbox. |
|
CheckBox(java.lang.String caption)
Creates a new checkbox with a set caption. |
|
CheckBox(java.lang.String caption,
boolean initialState)
Creates a new checkbox with a caption and a set initial state. |
|
CheckBox(java.lang.String caption,
Property<?> dataSource)
Creates a new checkbox that is connected to a boolean property. |
|
| Method Summary | |
|---|---|
void |
addBlurListener(FieldEvents.BlurListener listener)
|
void |
addFocusListener(FieldEvents.FocusListener listener)
|
void |
addListener(FieldEvents.BlurListener listener)
Deprecated. As of 7.0, replaced by #addBlurListener(BlurListener) |
void |
addListener(FieldEvents.FocusListener listener)
Deprecated. As of 7.0, replaced by #addFocusListener(FocusListener) |
boolean |
booleanValue()
Deprecated. As of 7.0, use AbstractField.getValue() instead and, if needed,
handle null values. |
void |
clear()
Clears the value of the field. |
protected java.util.Collection<java.lang.String> |
getCustomAttributes()
Returns a collection of attributes that should not be handled by the basic implementation of the readDesign and writeDesign
methods. |
protected com.vaadin.shared.ui.checkbox.CheckBoxState |
getState()
Returns the shared state bean with information to be sent from the server to the client. |
java.lang.Class<java.lang.Boolean> |
getType()
Returns the type of the Field. |
boolean |
isEmpty()
Is the field empty? In general, "empty" state is same as null. |
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Reads the component state from the given design. |
void |
removeBlurListener(FieldEvents.BlurListener listener)
|
void |
removeFocusListener(FieldEvents.FocusListener listener)
|
void |
removeListener(FieldEvents.BlurListener listener)
Deprecated. As of 7.0, replaced by #removeBlurListener(BlurListener) |
void |
removeListener(FieldEvents.FocusListener listener)
Deprecated. As of 7.0, replaced by #removeFocusListener(FocusListener) |
protected void |
setInternalValue(java.lang.Boolean newValue)
Sets the internal field value. |
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Writes the component state to the given design. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.vaadin.ui.Component |
|---|
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible |
| Methods inherited from interface com.vaadin.server.ClientConnector |
|---|
addAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
| Methods inherited from interface com.vaadin.shared.Connector |
|---|
getConnectorId |
| Methods inherited from interface com.vaadin.server.Sizeable |
|---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined |
| Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier |
|---|
addShortcutListener, removeShortcutListener |
| Constructor Detail |
|---|
public CheckBox()
public CheckBox(java.lang.String caption)
caption - the Checkbox caption.
public CheckBox(java.lang.String caption,
boolean initialState)
caption - the caption of the checkboxinitialState - the initial state of the checkbox
public CheckBox(java.lang.String caption,
Property<?> dataSource)
state - the Initial state of the switch-button.dataSource - | Method Detail |
|---|
public java.lang.Class<java.lang.Boolean> getType()
AbstractFieldgetValue and
setValue must be compatible with this type: one must be able
to safely cast the value returned from getValue to the given
type and pass any variable assignable to this type as an argument to
setValue.
getType in interface Property<java.lang.Boolean>getType in class AbstractField<java.lang.Boolean>protected com.vaadin.shared.ui.checkbox.CheckBoxState getState()
AbstractComponent
getState in class AbstractField<java.lang.Boolean>protected void setInternalValue(java.lang.Boolean newValue)
AbstractFieldAbstractField.getInternalValue() if necessary.
setInternalValue in class AbstractField<java.lang.Boolean>newValue - the new value to be set.public void addBlurListener(FieldEvents.BlurListener listener)
@Deprecated public void addListener(FieldEvents.BlurListener listener)
#addBlurListener(BlurListener)
public void removeBlurListener(FieldEvents.BlurListener listener)
@Deprecated public void removeListener(FieldEvents.BlurListener listener)
#removeBlurListener(BlurListener)
public void addFocusListener(FieldEvents.FocusListener listener)
@Deprecated public void addListener(FieldEvents.FocusListener listener)
#addFocusListener(FocusListener)
public void removeFocusListener(FieldEvents.FocusListener listener)
@Deprecated public void removeListener(FieldEvents.FocusListener listener)
#removeFocusListener(FocusListener)
@Deprecated public boolean booleanValue()
AbstractField.getValue() instead and, if needed,
handle null values.
public void readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
ComponentThe component is responsible not only for updating its own state but also for ensuring that its children update their state based on the design.
It is assumed that the component is in its default state when this method is called. Reading should only take into consideration attributes specified in the design and not reset any unspecified attributes to their defaults.
This method must not modify the design.
readDesign in interface ComponentreadDesign in class AbstractField<java.lang.Boolean>design - The design as HTML to obtain the state fromdesignContext - The DesignContext instance used for parsing the designprotected java.util.Collection<java.lang.String> getCustomAttributes()
AbstractComponentreadDesign and writeDesign
methods. Typically these are handled in a custom way in the overridden
versions of the above methods
getCustomAttributes in class AbstractField<java.lang.Boolean>
public void writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
ComponentThe component is responsible not only for writing its own state but also for ensuring that its children write their state to the design.
This method must not modify the component state.
writeDesign in interface ComponentwriteDesign in class AbstractField<java.lang.Boolean>design - The design as HTML to update with the current statepublic void clear()
Field
The field value is typically reset to the initial value of the field.
Calling Field.isEmpty() on a cleared field must always returns true.
clear in interface Field<java.lang.Boolean>clear in class AbstractField<java.lang.Boolean>public boolean isEmpty()
Field
isEmpty in interface Field<java.lang.Boolean>isEmpty in class AbstractField<java.lang.Boolean>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||