Zebra API Doc

zebra.ui.EventManager Class

Event manager class. One of the key zebra manager that is responsible for distributing various events in zebra UI. The manager provides number of methods to register global events listeners.

Constructor

zebra.ui.EventManager

()

Methods

addComponentListener

(
  • l
)
Boolean

Register global component listener

Parameters:

  • l Object

    a component listener


Return: Boolean

true if the listener has been successfully added

addFocusListener

(
  • l
)
Boolean

Register global focus listener

Parameters:

  • l Object

    a focus listener


Return: Boolean

true if the listener has been successfully added

addKeyListener

(
  • l
)
Boolean

Register global key listener

Parameters:

  • l Object

    a key listener


Return: Boolean

true if the listener has been successfully added

addListener

(
  • l
)

Register global event listener. The listener will get events according to event methods handlers it implements. For instance to listen key and the passed listener should implements one of key event handler method:

   // implement and register global key and mouse listener
   zebra.ui.events.addListener({

       // implement necessary events handlers methods
       keyPressed: function(e) {
           ...
       }
       ...
   });

Parameters:

  • l Object

addMouseListener

(
  • l
)
Boolean

Register global mouse listener

Parameters:

  • l Object

    a mouse listener


Return: Boolean

true if the listener has been successfully added

removeFocusListener

(
  • l
)
Boolean

Un-register global component listener

Parameters:

  • l Object

    a component listener


Return: Boolean

true if the listener has been removed successfully

removeFocusListener

(
  • l
)
Boolean

Un-register global focus listener

Parameters:

  • l Object

    a focus listener


Return: Boolean

true if the listener has been removed successfully

removeKeyListener

(
  • l
)
Boolean

Un-register global key listener

Parameters:

  • l Object

    a key listener


Return: Boolean

true if the listener has been removed successfully

removeListener

(
  • l
)
Boolean

Un-register the global listener. The method detects which listener interfaces the passed listener implements and un-registers its.

Parameters:

  • l Object

    a listener


Return: Boolean

true if the listener has been removed successfully

removeMouseListener

(
  • l
)
Boolean

Un-register global mouse listener

Parameters:

  • l Object

    a mouse listener


Return: Boolean

true if the listener has been removed successfully