Zebra API Doc

zebra.ui.FocusManager Class

Focus manager class defines the strategy of focus traversing among hierarchy of UI components. It keeps current focus owner component and provides API to change current focus component

Methods

canvasFocusGained

(
  • canvas
)
protected

The method is called by a canvas that gained native focus

Parameters:

canvasFocusLost

(
  • canvas
)
protected

The method is called by a canvas that lost native focus

Parameters:

compEnabled

(
  • c
)

Component enabled event handler

Parameters:

compRemoved

(
  • p
  • c
)

Component removed event handler

Parameters:

compShown

(
  • c
)

Component shown event handler

Parameters:

hasFocus

(
  • c
)
Boolean

Test if the given component is a focus owner

Parameters:


Return: Boolean

true if the given component holds focus

isFocusable

(
  • c
)
Boolean

Test if the given component can catch focus

Parameters:


Return: Boolean

true if the given component can catch a focus

keyPressed

(
  • e
)

Key pressed event handler.

Parameters:

mousePressed

(
  • e
)

Mouse pressed event handler.

Parameters:

requestFocus

(
  • c
)

Force to pass a focus to the given UI component

Parameters:

Attributes

focusOwner

zebra.ui.Panel readonly

Reference to the current focus owner component.