Creates and manages an HTMLButtonElement that toggles between two images; the state is connected to a ParameterBoolean. The button is assigned classname icon for CSS scripting.

Implements

Constructors

Properties

state_: boolean

The state of the user control (which might not match the state of the target)

Methods

  • Returns the top level Element of this control. For example, this might be a label Element that encloses an input Element.

    Returns HTMLElement

    the top level Element of this control

  • Returns the state of this control (which should match the target state when observe is being called).

    Returns boolean

    the state of this control, true means 'on'

  • This callback fires when the button is clicked.

    Parameters

    • _event: Event

      the event that caused this callback to fire

    Returns void

  • Notifies this Observer that a change has occurred in the Subject.

    Parameters

    • event: SubjectEvent

      contains information about what has changed in the Subject: typically either a one-time GenericEvent, or a change to the value of a Parameter

    Returns void

  • Sets the state of the control, and modifies the ParameterBoolean to match.

    Parameters

    • newState: boolean

      the new state of the control, true means 'on'

    Returns void

  • Returns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.

    For an object whose main purpose is to represent another Printable object, it is recommended to include the result of calling toStringShort on that other object. For example, calling toStringShort() on a DisplayShape might return something like this:

    DisplayShape{polygon:Polygon{'chain3'}}
    

    Returns string

    a minimal string representation of this object.

Generated using TypeDoc