PERGOLA LOGO

pergola.ListItem

System events: YES.

User events and functions: YES. Note: beyond the implemented management of selection, deselection and activation (double click) –which invokes the callback function defined by the owner object (pergola.ComboBox instance) or by the owner's owner object (typically a pergola.Panel instance)– if fn is specified it is invoked on mouseover and mouseout events. Any specified ev is ignored. A typical use of fn is to show a preview image of the hovered list item.

System component. This class is specifically designed as component for the pergola.ComboBox class. You don't need to instantiate this class, or invoke any of its methods explicitly.

Example in combobox.

Listed: class properties/methods; prototype properties and methods; instance properties. Prototype properties and methods inherited by the Class superclass are not listed.

class

None

prototype

PROPERTIES

parent

pergola.user. The parent node is normally overridden by the instatiating object.

fill

Defined in pergola.presentationAttributes – string.

maskFill

Defined in pergola.presentationAttributes – string.

textFill

"black" – string.

textFillInverse

"white" – string.

METHODS

effects(evt)

Handles hovering effects. You never need to invoke this method explicitly.

handleEvent(evt)

Assigns this string to this owner.selection, and this to this owner.selectionHandle. Doubleclick on this invokes (through checkUserFunction()) in this order: 1) this owner.fn if specified; 2) this owner.owner.fn if specified.

build(object)

this inherits the properties specified in object. Prototype properties specified in object are overridden. Creates elements. Returns this.

instance

name

String. If not passed to the constructor, gets a generated XML name (Class).

id

String. The return value of this name.toXML(). This container ID. Used as prefix where other elements' IDs are attributed.

owner

Must be specified in the initialization object, designates the owner object.

container

<g> element.

button

<rect> element.

text

<text> element.

width

Must be specified in the initialization object; a computed number representing the smallest value between this owner.width and the greatest line length in this owner.list elements. This value is the same for all sibling items, and is computed by the instantiator (pergola.ComboBox).

string

Must be specified in the initialization object; a string representing the property name as defined in this owner.list array property, and is used as the text node of this text, therefore it's always best to declare this property name using the string notation. To clarify this, see the combobox example.

fn

If specified, or otherwise specified, callback function invoked on implemented mouseover and mouseout events.