com.vaadin.ui
Class CheckBox
java.lang.Object
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractField
com.vaadin.ui.Button
com.vaadin.ui.CheckBox
- All Implemented Interfaces:
- Buffered, BufferedValidatable, Property, Property.Editor, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, Action.ShortcutNotifier, FieldEvents.BlurNotifier, FieldEvents.FocusNotifier, MethodEventSource, Paintable, Sizeable, VariableOwner, Component, Component.Focusable, Field, Serializable, EventListener
public class CheckBox
- extends Button
- See Also:
- Serialized Form
Constructor Summary |
CheckBox()
Creates a new switch button. |
CheckBox(String caption)
Creates a new push button with a set caption. |
CheckBox(String caption,
boolean initialState)
Creates a new switch button with a caption and a set initial state. |
CheckBox(String caption,
Button.ClickListener listener)
Creates a new switch button with a caption and a click listener. |
CheckBox(String caption,
Object target,
String methodName)
Convenience method for creating a new switch button with a method
listening button clicks. |
CheckBox(String caption,
Property dataSource)
Creates a new switch button that is connected to a boolean property. |
Method Summary |
void |
setSwitchMode(boolean switchMode)
Sets the switchMode. |
Methods inherited from class com.vaadin.ui.Button |
addListener, addListener, addListener, booleanValue, changeVariables, fireClick, getType, isSwitchMode, paintContent, removeClickShortcut, removeListener, removeListener, removeListener, setClickShortcut, setImmediate, setInternalValue |
Methods inherited from class com.vaadin.ui.AbstractField |
addListener, addListener, addShortcutListener, addValidator, attach, commit, constructField, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getActionManager, getErrorMessage, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, getValue, isEmpty, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isValidationVisible, isWriteThrough, readOnlyStatusChange, removeListener, removeListener, removeShortcutListener, removeValidator, setCurrentBufferedSourceException, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setReadThrough, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, setValue, setWriteThrough, toString, validate, valueChange |
Methods inherited from class com.vaadin.ui.AbstractComponent |
addListener, addListener, addListener, addListener, addListener, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getHeight, getHeightUnits, getIcon, getLocale, getParent, getStyle, getStyleName, getTag, getWidth, getWidthUnits, getWindow, handleError, isEnabled, isImmediate, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeight, setHeight, setHeightUnits, setIcon, setLocale, setParent, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, setWidth, setWidthUnits |
CheckBox
public CheckBox()
- Creates a new switch button.
CheckBox
public CheckBox(String caption,
boolean initialState)
- Creates a new switch button with a caption and a set initial state.
- Parameters:
caption
- the caption of the switch buttoninitialState
- the initial state of the switch button
CheckBox
public CheckBox(String caption,
Button.ClickListener listener)
- Creates a new switch button with a caption and a click listener.
- Parameters:
caption
- the caption of the switch buttonlistener
- the click listener
CheckBox
public CheckBox(String caption,
Object target,
String methodName)
- Convenience method for creating a new switch button with a method
listening button clicks. Using this method is discouraged because it
cannot be checked during compilation. Use
AbstractComponent.addListener(Class, Object, Method)
or
AbstractComponent.addListener(com.vaadin.ui.Component.Listener)
instead. The
method must have either no parameters, or only one parameter of
Button.ClickEvent type.
- Parameters:
caption
- the Button caption.target
- the Object having the method for listening button clicks.methodName
- the name of the method in target object, that receives button
click events.
CheckBox
public CheckBox(String caption,
Property dataSource)
- Creates a new switch button that is connected to a boolean property.
- Parameters:
state
- the Initial state of the switch-button.dataSource
-
CheckBox
public CheckBox(String caption)
- Creates a new push button with a set caption.
The value of the push button is always false and they are immediate by
default.
- Parameters:
caption
- the Button caption.
setSwitchMode
public void setSwitchMode(boolean switchMode)
throws UnsupportedOperationException
- Description copied from class:
Button
- Sets the switchMode.
- Overrides:
setSwitchMode
in class Button
- Parameters:
switchMode
- The switchMode to set.
- Throws:
UnsupportedOperationException
Copyright © 2000-2010 IT Mill Ltd. All Rights Reserved.