Options
All
  • Public
  • Public/Protected
  • All
Menu

A singleton UI component controlling application pop-up dialog logic. This dialog is a modal dialog, saying that, when it is displayed, all user's UI actions will be blocked and the user will be forced to focus on this dialog. When the user completes the interaction with this dialog, for example, clicking on "OK" button, this dialog will be hidden and the user can resume normal UI operations. Normally, you should NOT directly access this component instance but you could control it via DialogService.

Please note that there is a dialog display queue operating behind the scenes. This display queue is a FIFO queue keeping all dialog models (DialogModel) --which are automatically generated and kept in the queue when show...Dialog methods are called-- but those dialog models cannot be displayed suddenly. For example, if there already is a dialog being displayed currently, but, there is also someone else calling show...Dialog method simultaneously, the dialog model generated from the later show...Dialog method will not be showed suddenly. Nevertheless, it'll be showed immediately when the first dialog is closed. For this mechanism, the dialog model can be firstly kept in the queue, then, it will be showed and removed from the queue when its preceding dialog is closed.

If you want to implement your own custom dialog, you should do it using component dialog rather than building it all up from scratches. The only thing which you need to do is just implementing the component being displayed inside the dialog body. All other mechanisms, such as dialog display queue listed above, should be left to be handled by the framework or by this class. For more information about building custom dialog, please see showComponentDialog.

author

shiorin, tee4cute

see

DialogService

Hierarchy

  • PhloxDialog

Index

Constructors

constructor

Properties

Private _show

_show: boolean

Private componentDialog

componentDialog: ComponentDialog

Private confirmDialog

confirmDialog: ConfirmDialog

Private currentModel

currentModel: DialogModel

Private currentResolver

currentResolver: any

Private dialogClass

dialogClass: string[]

Private dialogQueue

dialogQueue: DialogModel[]

Private dialogResolverQueue

dialogResolverQueue: any[]

Private messageDialog

messageDialog: MessageDialog

Private needFocusService

needFocusService: NeedFocusService

Private phloxAppInfo

phloxAppInfo: PhloxAppInfo

Static COMPONENT_DIALOG

COMPONENT_DIALOG: string = COMPONENT_DIALOG

Static CONFIRM_DIALOG

CONFIRM_DIALOG: string = CONFIRM_DIALOG

Static MESSAGE_DIALOG

MESSAGE_DIALOG: string = MESSAGE_DIALOG

Static TYPE_NAME

TYPE_NAME: string = TYPE_NAME

Accessors

Private show

  • get show(): boolean
  • set show(show: boolean): void
  • Returns boolean

  • Parameters

    • show: boolean

    Returns void

Methods

Private _showDialog

  • _showDialog(): void
  • Returns void

getCurrentModel

  • Returns DialogModel

getDialogClass

  • getDialogClass(): string[]
  • Returns string[]

getDialogHeight

  • getDialogHeight(): string
  • Returns string

Private getDialogResult

  • getDialogResult(dialogType: string): any
  • Parameters

    • dialogType: string

    Returns any

getDialogWidth

  • getDialogWidth(): string
  • Returns string

Private getI18NMessage

  • getI18NMessage(key: string): string
  • Parameters

    • key: string

    Returns string

Private getResolverWrapper

  • getResolverWrapper(model: any, resolve: any, reject: any): any
  • Parameters

    • model: any
    • resolve: any
    • reject: any

    Returns any

hideDialog

  • hideDialog(): void
  • Hide the current showing dialog and show the next dialog in the queue (if any).

    Returns void

isShow

  • isShow(): boolean
  • Returns boolean

showComponentDialog

  • Display a component dialog on the screen. A component dialog is a dialog allowing you to display your own custom dialog by specifying a component type being displayed as its body. That component type must be a class which is an instance of IDialogController.

    see

    ComponentDialog

    Parameters

    Returns Promise<any>

    The promise which will be resolved when this dialog is closed. The resolving result will be the value returned from IDialogController.getDialogResult method.

showConfirmDialog

  • showConfirmDialog(title: string, message: string, showCancelBtn: boolean, width?: string, height?: string): Promise<any>
  • Display a confirmation dialog on the screen.

    see

    ConfirmDialog

    Parameters

    • title: string

      The dialog title text.

    • message: string

      The dialog message which will be displayed in the dialog body.

    • showCancelBtn: boolean

      To display the CANCEL button or not. By default, the confirmation dialog will contain only YES and NO button.

    • Optional width: string

      The css "width" style value governing dialog width e.g. 100px, 50pt.

    • Optional height: string

      The css "height" style value governing dialog height e.g. 100px, 50pt.

    Returns Promise<any>

    The promise which will be resolved when this dialog is closed. The resolving result will be the value returned from ConfirmDialog.getDialogResult method.

showDialog

  • showDialog(): void
  • Show current dialog described by the currentModel. This usually be the last model generated by the last show...Dialog method call.

    Returns void

showMessageDialog

  • showMessageDialog(title: string, message: string, width?: string, height?: string): Promise<any>
  • Display a message dialog on the screen.

    see

    MessageDialog

    Parameters

    • title: string

      The dialog title text.

    • message: string

      The dialog message which will be displayed in the dialog body.

    • Optional width: string

      The css "width" style value governing dialog width e.g. 100px, 50pt.

    • Optional height: string

      The css "height" style value governing dialog height e.g. 100px, 50pt.

    Returns Promise<any>

    The promise which will be resolved when this dialog is closed. The resolving result will be the value returned from MessageDialog.getDialogResult method (which always returns true).

Private showNextDialog

  • showNextDialog(): boolean
  • Returns boolean

Generated using TypeDoc