Class: $.CheckBox
Overview
Implementation of a CheckBox using Selectable, with the following rules:
-
A CheckBox is "checked" if selected
-
A CheckBox is only "unchecked" if selected again
-
Only one CheckBox may be highlighted at a time
Instance Member Summary collapse
-
stateHighlightedSelected as WatchUi.Bitmap or Null
Default state Drawable or color/number.
Instance Method Summary collapse
-
highlight(previousState as Lang.Symbol) as Void
Handle onSelectable() returning stateHighlighted.
-
initialize(options as { :locX as Lang.Number, :locY as Lang.Number, :width as Lang.Number, :height as Lang.Number, :stateDefault as Graphics.ColorType or WatchUi.Drawable, :stateHighlighted as Graphics.ColorType or WatchUi.Drawable, :stateSelected as Graphics.ColorType or WatchUi.Drawable, :stateDisabled as Graphics.ColorType or WatchUi.Drawable, :stateHighlightedSelected as WatchUi.Bitmap })
Constructor.
-
reset(previousState as Lang.Symbol) as Void
Handle onSelectable() returning stateDefault.
-
select(previousState as Lang.Symbol) as Void
Handle onSelectable() returning stateSelected.
-
unHighlight() as Void
Handle unhighlighting of a check box.
Instance Attribute Details
var stateHighlightedSelected as WatchUi.Bitmap or Null
Default state Drawable or color/number
Instance Method Details
highlight(previousState as Lang.Symbol) as Void
Handle onSelectable() returning stateHighlighted
initialize(options as { :locX as Lang.Number, :locY as Lang.Number, :width as Lang.Number, :height as Lang.Number, :stateDefault as Graphics.ColorType or WatchUi.Drawable, :stateHighlighted as Graphics.ColorType or WatchUi.Drawable, :stateSelected as Graphics.ColorType or WatchUi.Drawable, :stateDisabled as Graphics.ColorType or WatchUi.Drawable, :stateHighlightedSelected as WatchUi.Bitmap })
Constructor
reset(previousState as Lang.Symbol) as Void
Handle onSelectable() returning stateDefault
select(previousState as Lang.Symbol) as Void
Handle onSelectable() returning stateSelected
unHighlight() as Void
Handle unhighlighting of a check box