API Docs for:
Show:

Component_UIBehavior Class

Module: ui

Methods

appear

(
  • callback
)

Executes the animation defined for the "onInitialize" event. Each UI-Object can have animations for certain events defined in JSON.

Parameters:

  • callback Function
    • An optional callback function called when the animation ends.

blur

()

Removes the input focus from this UI object. If the UI object is not focusable, nothing will happen.

disappear

(
  • callback
)

Executes the animation defined for the "onTerminate" event. Each UI-Object can have animations for certain events defined in JSON.

Parameters:

  • callback Function
    • An optional callback function called when the animation ends.

dispose

()

Disposes the component.

executeAnimation

(
  • event
  • callback
)

Executes an animation defined for the specified event. Each UI-Object can have animations for certain events defined in JSON.

Parameters:

  • event String
    • The event to execute the animation for such as "onTerminate" or "onInitialize". If no animation has been defined for the specified event, nothing will happen and the callback will be called immediately.
  • callback Function
    • An optional callback function called when the animation ends.

focus

()

Gives the input focus to this UI object. If the UI object is not focusable, nothing will happen.

onDataBundleRestore.

(
  • Object
  • gs.ObjectCodecContext
)

Provided by the gs module.

Called if this object instance is restored from a data-bundle. It can be used re-assign event-handler, anonymous functions, etc.

Parameters:

  • Object Object

    data - The data-bundle

  • gs.ObjectCodecContext Object

    context - The codec-context.

prepare

()

Prepares the UI-Object for display. This method should be called before a new created UI-Object will be displayed to position all sub-elements correctly.

setup

()

Initializes the binding-handler.

setupEventHandlers

()

Adds event-handlers for mouse/touch events

update

()

Updates the binding-handler.