Interface UICheckBox<BackgroundType, PictureOffType, PictureOnType>

Interface for 'CheckBox'.

Type Parameters

Hierarchy

Methods

  • Permanently destroy the component.

    Returns

    Object itself for fluent interface.

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Get elements Background object

    Type of Background is generic, see UIBackground for minimum interface.

    Returns

    Background object

    Returns BackgroundType

  • Get theme effect enabled on component or disabled.

    A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components. Whether this effect is drawn above a particular component can be configured using the setEffect method.

     // Example, disable theme effect from a particular component.
    Component.setEffect(false)

    For the most part, theme effects are enabled by default on most components.

    Theme effect is configured with effect property.

    Returns

    Boolean that describes whether drawing the theme effect is enabled around the component or not.

    Returns boolean

  • Get state of component highlighting.

    Returns

    Number between 0 and 1, where 1 is fully highlighted.

    Returns number

  • Returns

    State of isLocked boolean flag

    Returns boolean

  • Returns

    State as boolean flag

    Returns boolean

  • Get padding around object in pixels. Padding is empty space between the UiElements content and Background

    Returns

    Margin datastructure

    Returns Margin

  • Get the text of the entire shape.

    Returns

    The entire text string.

    Returns string

  • Returns

    Current text fill style object

    Returns FillStyle

  • Get font of Label.

    Returns

    FontSettings

    Returns FontSettings

  • Get rotation of Label.

    Returns

    Rotation in degrees

    Returns number

  • Remove event listener from dispose event.

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Unsubscribe from Highlight object event. This is called whenever an object is highlighted

    Returns

    True if the unsubscription was successful.

    Parameters

    • token: Token

      Token that was received when subscribing to the event.

    Returns boolean

  • Remove event listener from Mouse Click Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Double Click Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Down Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Drag Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Drag start Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Drag stop Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Enter Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Leave Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Move Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Up Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Mouse Wheel Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Switch event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Touch End Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Touch Move Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Remove event listener from Touch Start Event

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Subscribe to onDispose event. This event is triggered whenever the object is disposed.

    A component can only be disposed by the end user, by calling the dispose method on the component or the component which owns it.

     // Example usage

    Dashboard.onDispose(() => {
    console.log('Dashboard was disposed')
    })

    Dashboard.dispose()

    Returns

    Token of subscription

    Parameters

    • handler: (() => unknown)

      Handler function for event

        • (): unknown
        • Returns unknown

    Returns Token

  • Subscribe to highlight object event. This is called whenever an object is highlighted.

    Returns

    Token that can be used to unsubscribe from the event.

    Parameters

    • handler: ((highlight: number | boolean) => void)

      Function that is called when event is triggered.

        • (highlight: number | boolean): void
        • Parameters

          • highlight: number | boolean

          Returns void

    Returns Token

  • Subscribe to Switch event

    Returns

    Token of subscription

    Parameters

    • listener: ((obj: UICheckBox<BackgroundType, PictureOffType, PictureOnType>, state: boolean) => void)
        • (obj: UICheckBox<BackgroundType, PictureOffType, PictureOnType>, state: boolean): void
        • Parameters

          • obj: UICheckBox<BackgroundType, PictureOffType, PictureOnType>
          • state: boolean

          Returns void

    Returns Token

  • Method for mutating Background of object.

    Type of Background is generic, see UIBackground for minimum interface.

    Returns

    Object itself for fluent interface

    Parameters

    • mutator: Mutator<BackgroundType>

      Mutator function for Background

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set size of Button when state is OFF

    Returns

    Object itself

    Parameters

    • size: number | Point

      Point or pixel for squared button size

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set size of Button when state is ON

    Returns

    Object itself

    Parameters

    • size: number | Point

      Point or pixel for squared button size

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set theme effect enabled on component or disabled.

    A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components. Whether this effect is drawn above a particular component can be configured using the setEffect method.

     // Example, disable theme effect from a particular component.
    Component.setEffect(false)

    For the most part, theme effects are enabled by default on most components.

    Theme effect is configured with effect property.

    Returns

    Object itself.

    Parameters

    • enabled: boolean

      Theme effect enabled

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set state of component highlighting.

     // Example usage

    component.setHighlight(true)

    Returns

    Object itself

    Parameters

    • highlight: number | boolean

      Boolean or number between 0 and 1, where 1 is fully highlighted.

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set whether Switchable is locked or not. When locked, Switchable.setOn() is disabled.

    Returns

    State as boolean flag

    Parameters

    • isLocked: boolean

      state

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set margin around object in pixels.

    Returns

    Object itself

    Parameters

    • margin: number | Partial<MMargin>

      Number with pixel margins for all sides or datastructure with individual pixel margins for each side. Any side can be omitted, only passed values will be overridden.

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set mouse interactions enabled or disabled

    Returns

    Object itself for fluent interface

    Parameters

    • state: boolean

      Specifies state of mouse interactions

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set mouse style when hovering over UI object.

    Returns

    Object itself

    Parameters

    • mouseStyle: UIMouseStyle

      Interface for defining how mouse should look when hovering over UI object

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set state of switchable object.

    NOTE: If Switchable.getLocked() == true, this method will not do anything.!

    Returns

    Object itself for fluent interface

    Parameters

    • isOn: boolean

      State as boolean flag

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set padding around object in pixels. Padding is empty space between the UiElements content and Background

    Returns

    Object itself

    Parameters

    • padding: number | Partial<Margin>

      Number with pixel margins for all sides or datastructure with individual pixel paddings for each side. Any side can be omitted, only passed values will be overridden.

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set the text of the entire shape.

    Parameters

    • text: string

      Text string.

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>

  • Set rotation of Label.

    Returns

    Object itself

    Parameters

    • rotation: number

    Returns UICheckBox<BackgroundType, PictureOffType, PictureOnType>