com.sap.ui.commons.client
Class CheckBoxWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sap.ui.core.client.ControlWidget
              extended by com.sap.ui.commons.client.CheckBoxWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class CheckBoxWidget
extends com.sap.ui.core.client.ControlWidget

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 AG)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  CheckBoxWidget()
          constructs the class CheckBoxWidget
protected CheckBoxWidget(CheckBox control)
          constructs the class CheckBoxWidget
  CheckBoxWidget(String id)
          constructs the class CheckBoxWidget
 
Method Summary
 void attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is triggered when the control status is changed by the user.
 void bindChecked(String path)
          Binder for property checked.
 void bindChecked(String path, com.sap.ui.core.client.Formatter formatter)
          Binder for property checked.
 void detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is triggered when the control status is changed by the user.
 CheckBox getControl()
          returns the reference to the Phoenix Control
 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.
 void setChecked(boolean value)
          Setter for property checked
Default value is: false
 void setEditable(boolean value)
          Setter for property editable
Default value is: true
 void setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 void setText(String value)
          Setter for property text
 void setTextDirection(com.sap.ui.core.client.TextDirection value)
          Setter for property textDirection
Default value is: Inherit
 void setValueState(com.sap.ui.core.client.ValueState value)
          Setter for property valueState
Default value is: None
 void setVisible(boolean value)
          Setter for property visible
Default value is: true
 void setWidth(String value)
          Setter for property width
 void toggle()
          Inverts the current value of the control.
 void unbindChecked()
          Unbinder for property checked.
 
Methods inherited from class com.sap.ui.core.client.ControlWidget
destroy, doAttachChildren, doDetachChildren, isDesignTime, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckBoxWidget

public CheckBoxWidget()
constructs the class CheckBoxWidget


CheckBoxWidget

public CheckBoxWidget(String id)
constructs the class CheckBoxWidget

Parameters:
id - id of the CheckBoxWidget

CheckBoxWidget

protected CheckBoxWidget(CheckBox control)
constructs the class CheckBoxWidget

Parameters:
control - reference to an existing CheckBox
Method Detail

getControl

public CheckBox getControl()
returns the reference to the Phoenix Control

Overrides:
getControl in class com.sap.ui.core.client.ControlWidget
Returns:
reference to the Phoenix Control

isChecked

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

Returns:
the value of property checked

setChecked

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

Parameters:
value - boolean

bindChecked

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

Parameters:
path - path to a property in the model

bindChecked

public final void 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

unbindChecked

public final void unbindChecked()
Unbinder for property checked.


getText

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

Returns:
the value of property text

setText

public void setText(String value)
Setter for property text

Parameters:
value - String

isVisible

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

Overrides:
isVisible in class com.google.gwt.user.client.ui.UIObject
Returns:
the value of property visible

setVisible

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

Overrides:
setVisible in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - boolean

isEnabled

public 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 void setEnabled(boolean value)
Setter for property enabled
Default value is: true

Parameters:
value - boolean

isEditable

public 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 void setEditable(boolean value)
Setter for property editable
Default value is: true

Parameters:
value - boolean

getValueState

public 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 void setValueState(com.sap.ui.core.client.ValueState value)
Setter for property valueState
Default value is: None

Parameters:
value - com.sap.ui.core.client.ValueState

getWidth

public 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 void setWidth(String value)
Setter for property width

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getTextDirection

public 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 void setTextDirection(com.sap.ui.core.client.TextDirection value)
Setter for property textDirection
Default value is: Inherit

Parameters:
value - com.sap.ui.core.client.TextDirection

attachChangeEvent

public void 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

detachChangeEvent

public void 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

toggle

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



Copyright © 2011 SAP. All Rights Reserved.