com.sap.ui.commons.client
Class CheckBox

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.CheckBox

public class CheckBox
extends com.sap.ui.core.client.Control

The class CheckBox is the GWT wrapper for the Phoenix control: sap.ui.commons.CheckBox.

Provides a flaggable box and a label. A checkbox can either stand alone, or in a group with other checkboxes. As an option, the boxes can initially be set to status Not Editable.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.commons.CheckBox)

Constructor Summary
protected CheckBox()
          constructs the class CheckBox
hidden due to JavaScriptObject restriction
 
Method Summary
 CheckBox attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is triggered when the control status is changed by the user.
 CheckBox bindChecked(String path)
          Binder for property checked.
 CheckBox bindChecked(String path, com.sap.ui.core.client.Formatter formatter)
          Binder for property checked.
static CheckBox create()
          creates a new instance of the class CheckBox
static CheckBox create(String idOrConfig)
          creates a new instance of the class CheckBox
static CheckBox create(String id, String config)
          creates a new instance of the class CheckBox
 CheckBox detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is triggered when the control status is changed by the user.
 String getText()
          Getter for property text Defines the text displayed next to the checkbox.
 com.sap.ui.core.client.TextDirection getTextDirection()
          Getter for property textDirection Inherits the text direction from its parent control/container.
 com.sap.ui.core.client.ValueState getValueState()
          Getter for property valueState Accepts the core enumeration "ValueState.type" that supports "None", "Error", "Warning" and "Success".
 String getWidth()
          Getter for property width Control width results from the text length.
 boolean isChecked()
          Getter for property checked Checks the state of the control.
 boolean isEditable()
          Getter for property editable Specifies whether or not the user can flag/unflag the checkbox.
 boolean isEnabled()
          Getter for property enabled Disabled controls are displayed in other colors, depending on user settings.
 boolean isVisible()
          Getter for property visible Invisible controls are not rendered.
 CheckBox setChecked(boolean value)
          Setter for property checked
Default value is: false
 CheckBox setEditable(boolean value)
          Setter for property editable
Default value is: true
 CheckBox setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 CheckBox setText(String value)
          Setter for property text
 CheckBox setTextDirection(com.sap.ui.core.client.TextDirection value)
          Setter for property textDirection
Default value is: Inherit
 CheckBox setValueState(com.sap.ui.core.client.ValueState value)
          Setter for property valueState
Default value is: None
 CheckBox setVisible(boolean value)
          Setter for property visible
Default value is: true
 CheckBox setWidth(String value)
          Setter for property width
 void toggle()
          Inverts the current value of the control.
 CheckBox unbindChecked()
          Unbinder for property checked.
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckBox

protected CheckBox()
constructs the class CheckBox
hidden due to JavaScriptObject restriction

Method Detail

create

public static CheckBox create()
creates a new instance of the class CheckBox


create

public static CheckBox create(String idOrConfig)
creates a new instance of the class CheckBox

Parameters:
id - id of the CheckBox or configuration JSON string

create

public static CheckBox create(String id,
                              String config)
creates a new instance of the class CheckBox

Parameters:
id - id of the CheckBox
config - configuration JSON string

isChecked

public final boolean isChecked()
Getter for property checked Checks the state of the control.

Returns:
the value of property checked

setChecked

public final CheckBox setChecked(boolean value)
Setter for property checked
Default value is: false

Parameters:
value - boolean
Returns:
this to allow method chaining

bindChecked

public final CheckBox bindChecked(String path)
Binder for property checked.

Parameters:
path - path to a property in the model
Returns:
this to allow method chaining

bindChecked

public final CheckBox bindChecked(String path,
                                  com.sap.ui.core.client.Formatter formatter)
Binder for property checked.

Parameters:
path - path to a property in the model
formatter - an optional Formatter function for the value
Returns:
this to allow method chaining

unbindChecked

public final CheckBox unbindChecked()
Unbinder for property checked.

Returns:
this to allow method chaining

getText

public final String getText()
Getter for property text Defines the text displayed next to the checkbox.

Returns:
the value of property text

setText

public final CheckBox setText(String value)
Setter for property text

Parameters:
value - String
Returns:
this to allow method chaining

isVisible

public final boolean isVisible()
Getter for property visible Invisible controls are not rendered.

Returns:
the value of property visible

setVisible

public final CheckBox setVisible(boolean value)
Setter for property visible
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isEnabled

public final boolean isEnabled()
Getter for property enabled Disabled controls are displayed in other colors, depending on user settings.

Returns:
the value of property enabled

setEnabled

public final CheckBox setEnabled(boolean value)
Setter for property enabled
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isEditable

public final boolean isEditable()
Getter for property editable Specifies whether or not the user can flag/unflag the checkbox.

Returns:
the value of property editable

setEditable

public final CheckBox setEditable(boolean value)
Setter for property editable
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

getValueState

public final com.sap.ui.core.client.ValueState getValueState()
Getter for property valueState Accepts the core enumeration "ValueState.type" that supports "None", "Error", "Warning" and "Success".

Returns:
the value of property valueState

setValueState

public final CheckBox setValueState(com.sap.ui.core.client.ValueState value)
Setter for property valueState
Default value is: None

Parameters:
value - com.sap.ui.core.client.ValueState
Returns:
this to allow method chaining

getWidth

public final String getWidth()
Getter for property width Control width results from the text length. Alternatively, the width can be set to an absolute value.

Returns:
the value of property width

setWidth

public final CheckBox setWidth(String value)
Setter for property width

Parameters:
value - String
Returns:
this to allow method chaining

getTextDirection

public final com.sap.ui.core.client.TextDirection getTextDirection()
Getter for property textDirection Inherits the text direction from its parent control/container. Alternatively, the value can be set to LTR or RTL.

Returns:
the value of property textDirection

setTextDirection

public final CheckBox setTextDirection(com.sap.ui.core.client.TextDirection value)
Setter for property textDirection
Default value is: Inherit

Parameters:
value - com.sap.ui.core.client.TextDirection
Returns:
this to allow method chaining

attachChangeEvent

public final CheckBox attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Event is triggered when the control status is changed by the user.
Event Parameters:
{boolean} checked Checks whether the box is flagged or unflagged.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachChangeEvent

public final CheckBox detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Event is triggered when the control status is changed by the user.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

toggle

public final void toggle()
Inverts the current value of the control.



Copyright © 2011 SAP. All Rights Reserved.