Class sap.ui.commons.TriStateCheckBoxModule: sap/ui/commons/TriStateCheckBox
TriStateCheckBox to reflect mixed state for checkboxes. The control can display three states, namely checked, unchecked and mixed. However, mixed state cannot be directly reached by user interaction on the particular control. It can be only set by the control's public toggle function, to make a behaviour possible which is e.g. required in checkbox trees.
Deprecated API:Since version 1.38.
Since: 1.7.2.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the change
event of this sap.ui.commons.TriStateCheckBox
.fnFunction
from the change
event of this sap.ui.commons.TriStateCheckBox
. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
- Properties
- selectionState : sap.ui.commons.TriStateCheckBoxState (default: Unchecked)
- text : string
- enabled : boolean (default: true)
- editable : boolean (default: true)
- valueState : sap.ui.core.ValueState (default: None)
- width : sap.ui.core.CSSSize
- textDirection : sap.ui.core.TextDirection (default: Inherit)
- Events
- change : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
- Deprecated:
- Since version 1.38.
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.selectionState | Checks whether the box is flagged or not flagged. |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
fnFunction
to the change
event of this sap.ui.commons.TriStateCheckBox
. When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.commons.TriStateCheckBox
itself.
Event is triggered when the control status is changed by the user by flagging or unflagging the checkbox.
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.commons.TriStateCheckBox itself |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
fnFunction
from the change
event of this sap.ui.commons.TriStateCheckBox
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
change
to attached listeners. Expects the following event parameters:
selectionState
of typestring
Checks whether the box is flagged or not flagged.
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
editable
. Specifies whether the user shall be allowed to flag the check box
Default value is true
.
{boolean} | Value of property editable |
enabled
. Using this property, the control could be disabled, if required.
Default value is true
.
{boolean} | Value of property enabled |
selectionState
. Defines the states of the checkbox
Default value is Unchecked
.
{sap.ui.commons.TriStateCheckBoxState} | Value of property selectionState |
text
. Defines the text displayed next to the check box
{string} | Value of property text |
textDirection
. The value can be set to LTR or RTL. Otherwise, the control inherits the text direction from its parent control.
Default value is Inherit
.
{sap.ui.core.TextDirection} | Value of property textDirection |
valueState
. Accepts the core enumeration ValueState.type that supports 'None', 'Error', 'Warning' and 'Success'.
Default value is None
.
{sap.ui.core.ValueState} | Value of property valueState |
width
. The width can be set to an absolute value. If no value is set, the control width results from the text length.
{sap.ui.core.CSSSize} | Value of property width |
editable
. Specifies whether the user shall be allowed to flag the check box
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bEditable | New value for property editable |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
enabled
. Using this property, the control could be disabled, if required.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bEnabled | New value for property enabled |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
selectionState
. Defines the states of the checkbox
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Unchecked
.
{sap.ui.commons.TriStateCheckBoxState} | sSelectionState | New value for property selectionState |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
text
. Defines the text displayed next to the check box
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sText | New value for property text |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
textDirection
. The value can be set to LTR or RTL. Otherwise, the control inherits the text direction from its parent control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Inherit
.
{sap.ui.core.TextDirection} | sTextDirection | New value for property textDirection |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
valueState
. Accepts the core enumeration ValueState.type that supports 'None', 'Error', 'Warning' and 'Success'.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
{sap.ui.core.ValueState} | sValueState | New value for property valueState |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
width
. The width can be set to an absolute value. If no value is set, the control width results from the text length.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.CSSSize} | sWidth | New value for property width |
{sap.ui.commons.TriStateCheckBox} | Reference to this in order to allow method chaining |
{sap.ui.commons.TriStateCheckBoxState} | destState | destined selection state of checkbox |