Options
All
  • Public
  • Public/Protected
  • All
Menu

Class XmlLoader

Class used to load GUI via XML.

Hierarchy

  • XmlLoader

Index

Constructors

constructor

  • new XmlLoader(parentClass?: any): XmlLoader
  • Create a new xml loader

    Parameters

    • Optional parentClass: any

      Sets the class context. Used when the loader is instanced inside a class and not in a global context

    Returns XmlLoader

Methods

disposeSearch playground for dispose

  • dispose(): void
  • Disposes the loaded layout

    Returns void

getNodeByIdSearch playground for getNodeById

  • getNodeById(id: string): any
  • Gets a loaded node / control by id.

    Parameters

    • id: string

      the Controls id set in the xml

    Returns any

    element of type Control

getNodesSearch playground for getNodes

  • getNodes(): any
  • Gets all loaded nodes / controls

    Returns any

    Array of controls

isLoadedSearch playground for isLoaded

  • isLoaded(): boolean
  • Gets if the loading has finished.

    Returns boolean

    whether the loading has finished or not

loadLayoutSearch playground for loadLayout

  • loadLayout(xmlFile: any, rootNode: any, onSuccess?: Nullable<() => void>, onError?: Nullable<(error: string) => void>): void
  • Initiates the xml layout loading

    Parameters

    • xmlFile: any

      defines the xml layout to load

    • rootNode: any

      defines the node / control to use as a parent for the loaded layout controls.

    • Optional onSuccess: Nullable<() => void>

      defines the callback called on layout load successfully.

    • Optional onError: Nullable<(error: string) => void>

      defines the callback called on layout load failure.

    Returns void

loadLayoutAsyncSearch playground for loadLayoutAsync

  • loadLayoutAsync(xmlFile: any, rootNode: any): Promise<any>
  • Initiates the xml layout loading asynchronously

    Parameters

    • xmlFile: any

      defines the xml layout to load

    • rootNode: any

      defines the node / control to use as a parent for the loaded layout controls.

    Returns Promise<any>

    Promise

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method