Options
All
  • Public
  • Public/Protected
  • All
Menu

An interface of component classes requiring the user's focus. For example, the ContextMenu which that it requires the user to focus on itself all the time it is being displayed. Once the user click on anywhere else outside its area (losing its focus), the ContextMenu will be disappeared. For this kind of requirement, the ContextMenu must implement this interface and register itself as a focusing component to NeedFocusService (via NeedFocusService.setFocusingComponent method). Then, NeedFocusService will automatically call onFocus callback method on the focusing component. Once the component loses its focus, NeedFocusService will automatically call onLostFocus callback method.

author

shiorin, tee4cute

see

NeedFocusService

Hierarchy

  • INeedFocus

Implemented by

Index

Methods

onFocus

  • onFocus(event: any): void
  • A callback method automatically called by NeedFocusService when this component gains the focus.

    Parameters

    • event: any

      The source UI event causing this component to gain the focus.

    Returns void

onLostFocus

  • onLostFocus(event: any): void
  • A callback method automatically called by NeedFocusService when this component loses its focus.

    Parameters

    • event: any

      The source UI event causing this component to lose its focus.

    Returns void

Generated using TypeDoc