Options
All
  • Public
  • Public/Protected
  • All
Menu

A button that represents an on/off state.

Hierarchy

Index

Constructors

constructor

  • new ToggleButton(initialyPressed: boolean, desc: string, abbreviatedDesc: string | undefined, icon?: string, extraClass?: string): ToggleButton

Properties

Protected _events

_events: Subject<ClickEvent> = new Subject()

The object on which this class and subclasses may push new events.

Protected _pressed

_pressed: boolean

abbreviatedDesc

abbreviatedDesc: string | undefined

See Button.

desc

desc: string

See Button.

Protected el

el: Element | undefined

The current DOM element representing the button, if it has been rendered already.

events

events: Observable<ClickEvent> = this._events.asObservable()

The observable on which clients can listen for events.

extraClass

extraClass: string

See Button.

icon

icon: string

See Button.

Accessors

Protected buttonClassName

  • get buttonClassName(): string

Protected buttonText

  • get buttonText(): string
  • The text that goes inside a button. This is the abbreviated description, or if unavailable, the long description.

    Returns string

pressed

  • get pressed(): boolean
  • set pressed(value: boolean): void
  • Whether the button is in the pressed state.

    Returns boolean

  • Whether the button is in the pressed state.

    Parameters

    • value: boolean

    Returns void

Methods

Protected makeButton

  • makeButton(doc: Document): Element
  • Create a button, fill its contents, set its tooltip and add the event handlers.

    Parameters

    • doc: Document

      The document in which we are creating the element.

    Returns Element

    The new button.

render

  • render(parent?: Element | Document | DocumentFragment): void
  • Render the button.

    Parameters

    • Optional parent: Element | Document | DocumentFragment

      On first render, this parameter must contain the parent DOM element of the button. On later renders, this parameter is ignored.

    Returns void

Protected setButtonContent

  • setButtonContent(button: Element): void

setButtonEventHandlers

  • setButtonEventHandlers($button: JQuery): void

Protected setButtonTooltip

  • setButtonTooltip($button: JQuery): void

Generated using TypeDoc