Class: $.ColorFactory

Inherits:
WatchUi.PickerFactory show all

Overview

Factory that controls which colors can be picked

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _colorWheel as $.ColorWheel

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 Graphics.ColorType) as Lang.Number

Get the index of a color item

Parameters:

  • value —

    The color to get the index of

Returns:

  • The index of the color

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(colors as Lang.Array<Graphics.ColorType>)

Constructor

Parameters:

  • colors —

    Colors to display in the Color Wheel


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