Options
All
  • Public
  • Public/Protected
  • All
Menu

A class to handle a board dialog.

api-version

1

system

Hierarchy

Index

Methods

  • cancel(): void
  • dismiss(): void
  • Gets one interface of the buttons used in the dialog. Returns null if the specified button does not exist or the dialog has not yet been fully created.

    api-version

    1

    user

    Parameters

    Returns null | ButtonInterface

    Return a ButtonInterface about the {@link which}, otherwise null.

  • getId(): string
  • isShowing(): boolean
  • setAlignment(horizontal: number, vertical: number): void
  • setAnchor(anchorType: number, position: number[]): void
  • setBackgroundDim(enabled: boolean): void
  • Set a background dim on the dialog. You cannot change a title view after call IBoardDialog.show.

    api-version

    1

    user

    Parameters

    • enabled: boolean

      Set whether the background dim is enabled or not.

    Returns void

  • setButton(which: number, text: string, enabled: boolean, listener: OnClickListener): void
  • Set a button.

    api-version

    1

    user

    Parameters

    • which: number

      Which button to set.

    • text: string

      A text to display in the button.

    • enabled: boolean

      Whether the button is enabled or not.

    • listener: OnClickListener

      A OnClickListener to be invoked when this button is pressed.

    Returns void

  • setCancelable(cancelable: boolean): void
  • Sets whether this dialog is canceled when touched outside the dialog's bounds. If user close a dialog via touched outside the dialog's bounds, then OnCancelListener will be called.

    api-version

    1

    user

    Parameters

    • cancelable: boolean

      Whether the dialog should be canceled when touched outside the dialog's bounds.

    Returns void

  • setCloseButton(enabled: boolean): void
  • Set a close button in the dialog. The button is shown at top right corner in the dialog. It is impossible use only close button without title. So if you want to use close button, then set title before. If user close a dialog via this button, then OnCancelListener will be called.

    api-version

    1

    user

    Parameters

    • enabled: boolean

      Set whether the close button is enabled or not.

    Returns void

  • setContentView(view: Element): void
  • Set the content view for this dialog. You cannot change a content view after call IBoardDialog.show.

    api-version

    1

    user

    Parameters

    • view: Element

      A view to display in the custom content view area.

    Returns void

  • setDraggable(draggable: boolean, defaultPosition?: { x?: number; y?: number }): void
  • Sets whether this dialog is draggable. It a dialog is set as draggable, then setAnchor, setAlignment and setCancelable will be ignored. You cannot change a dialog size after call IBoardDialog.show.

    api-version

    1

    system

    Parameters

    • draggable: boolean

      Whether the dialog is draggable.

    • Optional defaultPosition: { x?: number; y?: number }

      The [x, y] position at which the popup screen will be displayed. If is not set, then the dialog will be positioned at center.

      • Optional x?: number
      • Optional y?: number

    Returns void

  • setMessage(text: string): void
  • Set the message for this dialog.

    api-version

    1

    user

    Parameters

    • text: string

      A text to display in the content.

    Returns void

  • setSize(size: number): void
  • setTitle(text: string): void
  • Set the title text for this dialog. If trimmed text's length is 0, then title area will be hidden. But, it is impossible use only close button without title. So if you want to remove title then remove close button before.

    api-version

    1

    user

    Parameters

    • text: string

      A text to display in the title.

    Returns void

  • show(panelType?: number): void
  • Show a dialog. If module want to show a dialog on the system layer than it should be set the Manifest.PERMISSION_SYSTEM_DIALOG. But a module which has a user permission can only show a dialog on the {@link Panel.TYPE.SYSTEM_DIALOG} even if it has the Manifest.PERMISSION_SYSTEM_DIALOG. Available panel types are:

    • {@link Panel.TYPE.MODULE_TAB}
    • {@link Panel.TYPE.MODULE_POPUP_SCREEN}
    • {@link Panel.TYPE.MODULE_FULL_SCREEN}
    • {@link Panel.TYPE.SYSTEM_DIALOG}
    • {@link Panel.TYPE.SPECIAL}
    • {@link Panel.TYPE.SYSTEM_FULL_SCREEN}
    • {@link Panel.TYPE.SYSTEM_CONNECTION}
    • {@link Panel.TYPE.SYSTEM_ERROR}
    api-version

    1

    user
    permission

    Manifest.PERMISSION_SYSTEM_DIALOG

    Parameters

    • Optional panelType: number

      A Panel type (ex. {@link Panel.TYPE.SYSTEM_DIALOG}) to show the dialog. If the context is an instance of System context, than the default is {@link Panel.TYPE.SYSTEM_DIALOG}, otherwise {@link Panel.TYPE.MODULE_TAB}.

    Returns void

Generated using TypeDoc