Class: $.CharacterFactory

Inherits:
WatchUi.PickerFactory show all

Overview

Factory that controls which characters can be picked

Constant Summary

Constant Variables

Type Name Value Since Description
Type DONE -1

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _addOk as Lang.Boolean

var _characterSet as Lang.String

Instance Method Details

getDrawable(index as Lang.Number, selected as Lang.Boolean) as WatchUi.Drawable or Null

Generate a Drawable instance for an item

Parameters:

  • index —

    The item index

  • selected —

    true if the current item is selected, false otherwise

Returns:

  • Drawable for the item

getIndex(value as Lang.String) as Lang.Number or Null

Get the index of a character item

Parameters:

  • value —

    The character to get the index of

Returns:

  • The index of the character

getSize() as Lang.Number

Get the number of picker items

Returns:

  • Number of items

getValue(index as Lang.Number) as Lang.Object or Null

Get the value of the item at the given index

Parameters:

  • index —

    Index of the item to get the value of

Returns:

  • Value of the item

initialize(characterSet as Lang.String, addOk as Lang.Boolean)

Constructor

Parameters:

  • characterSet —

    The characters to include in the Picker

  • addOk —

    true to add OK button, false otherwise

isDone(value as Lang.String or Lang.Number) as Lang.Boolean

Get whether the user selected OK and is done picking

Parameters:

  • value —

    Value user selected

Returns:

  • true if user is done, false otherwise


Generated Jun 9, 2026, 8:45:54 AM