com.itmill.toolkit.ui
Class CheckBox
java.lang.Object
com.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.ui.AbstractField
com.itmill.toolkit.ui.Button
com.itmill.toolkit.ui.CheckBox
- All Implemented Interfaces:
- Buffered, BufferedValidatable, Property, Property.Editor, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, MethodEventSource, Paintable, Sizeable, VariableOwner, Component, Component.Focusable, Field, EventListener
public class CheckBox
- extends Button
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.itmill.toolkit.ui.Button |
addListener, booleanValue, changeVariables, fireClick, getTag, getType, isSwitchMode, paintContent, removeListener, setImmediate, setInternalValue |
Methods inherited from class com.itmill.toolkit.ui.AbstractField |
addListener, addListener, addValidator, attach, commit, constructField, discard, fireReadOnlyStatusChange, fireValueChange, focus, getErrorMessage, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, getValue, isEmpty, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isValidationVisible, isWriteThrough, removeListener, removeListener, removeValidator, setCurrentBufferedSourceException, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setReadThrough, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, setValue, setWriteThrough, toString, validate, valueChange |
Methods inherited from class com.itmill.toolkit.ui.AbstractComponent |
addListener, addListener, addListener, addListener, addStyleName, childRequestedRepaint, detach, fireComponentErrorEvent, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getHeight, getHeightUnits, getIcon, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, isEnabled, isImmediate, isVisible, paint, 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, setWidth, setWidth, setWidth, setWidthUnits, setVisible |
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.itmill.toolkit.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-2009 IT Mill Ltd. All Rights Reserved.