Class: $.WordFactory

Inherits:
WatchUi.PickerFactory show all

Overview

Factory that controls which words can be picked

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _font as Graphics.FontDefinition

var _words as Lang.Array<Lang.ResourceId>

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 or Lang.Symbol) as Lang.Number

Get the index of an item

Parameters:

  • value —

    The string or resource identifier to get the index of

Returns:

  • The index

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(words as Lang.Array<Lang.ResourceId>, options as { :font as Graphics.FontDefinition })

Constructor

Parameters:

  • words —

    Resource identifiers for strings

  • options —

    Dictionary of options

    • :font —

      The font to use


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