Extends
vs.ui.View.
The vs.ui.Switch display an element showing the boolean state value.
User is able to tap the control to change the value.
Events:
-
change: Fired after the switch is tap. Event.data = true if button is toggled.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
vs.ui.Switch(config)
The vs.ui.Switch class
|
| Field Attributes | Field Name and Description |
|---|---|
|
Getter|Setter for the text switch.
|
|
|
Getter|Setter for the text switch.
|
|
|
Getter|Setter the toggled state.
|
- Fields borrowed from class vs.ui.View:
- autosizing, bubbling, enable, hideAnimation, layout, maxScale, minScale, position, rotation, scaling, setHideAnimation, setShowAnimation, showAnimmation, size, transformOrigin, translation, visible
- Fields borrowed from class vs.core.Object:
- getOwnPropertyDescriptor, getPropertyDescriptor, id, propagateChange
- Methods borrowed from class vs.ui.View:
- add, addClassName, addCssRule, addCssRules, animate, bind, clone, createAndAddComponent, getBorder, getComputedStyle, getMargin, getPadding, getStyle, hasClassName, hide, init, isChild, notifyToParent, redraw, remove, removeAllChild, removeClassName, rotate, scale, setStyle, setStyles, setVisible, show, translate, unbind, viewDidAdd
- Methods borrowed from class vs.core.EventSource:
- nodeBind, nodeUnbind, propagate
- Methods borrowed from class vs.core.Object:
- configure, getProperties, parseJSON, propertyChange, toJSON
Class Detail
vs.ui.Switch(config)
The vs.ui.Switch class
Author: David Thevenin.
Author: David Thevenin.
var toggle = new vs.ui.Switch (); toggle.init (); toggle.position = [100, 250]; toggle.textOn = 'I' toggle.textOff = 'O'
- Parameters:
- {Object} config
- the configuration structure [mandatory]
Field Detail
{String}
textOff
Getter|Setter for the text switch. Allow to get or change the text draw
by the switch when its off.
{String}
textOn
Getter|Setter for the text switch. Allow to get or change the text draw
by the switch when its on.
{boolean}
toggled
Getter|Setter the toggled state.