Options
All
  • Public
  • Public/Protected
  • All
Menu

An abstract base class for menu item component. This class provides you a default onClick event handler which automatically call the MenuItemModel.actionPerformedHandler if specified. It also resets the current focusing component if MenuItemModel.autoResetFocus is set to true. A menu item can be, but not necessary, in a parent menu. It is up to each component implementation which is a sub class of this class to decide that it is required to allow a menu item can be displayed standalone outside the parent menu or not.

author

shiorin, tee4cute

see

MenuItemModel

see

AbstractMenu

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected beforeClickEvent

beforeClickEvent: EventEmitter<any>

Protected bypass

bypass: boolean

Protected clickEvent

clickEvent: EventEmitter<any>

Protected i18nKey

i18nKey: string

Protected i18nValue

i18nValue: any

Protected menu

Protected model

Protected needFocusService

needFocusService: NeedFocusService

Protected options

options: any

Methods

applyI18N

  • applyI18N(value: any): void

emitActionPerform

  • emitActionPerform($event?: any): void
  • Parameters

    • Optional $event: any

    Returns void

Protected emitBeforeClickEvent

  • emitBeforeClickEvent($event?: any): void
  • Parameters

    • Optional $event: any

    Returns void

Protected emitClickEvent

  • emitClickEvent($event?: any): void
  • Parameters

    • Optional $event: any

    Returns void

getBeforeClickEvent

  • getBeforeClickEvent(): EventEmitter<any>
  • Returns EventEmitter<any>

getClickEvent

  • getClickEvent(): EventEmitter<any>
  • Returns EventEmitter<any>

getI18NKey

  • getI18NKey(): string

getI18NValue

  • getI18NValue(): any

getMenu

  • Get the parent memu associated with this menu item.

    Returns AbstractMenu

getModel

  • Get the model of this menu item.

    Returns MenuItemModel

getOptions

  • getOptions(): any

isBypassKey

  • isBypassKey(): boolean

onClick

  • onClick($event: MouseEvent, fireEvent?: boolean): void
  • Parameters

    • $event: MouseEvent
    • Optional fireEvent: boolean

    Returns void

setBeforeClickEvent

  • setBeforeClickEvent(event: EventEmitter<any>): void
  • Parameters

    • event: EventEmitter<any>

    Returns void

setBypassKey

  • setBypassKey(bypass: boolean): void

setClickEvent

  • setClickEvent(event: EventEmitter<any>): void
  • Parameters

    • event: EventEmitter<any>

    Returns void

setI18NKey

  • setI18NKey(i18nKey: string): void

setMenu

  • Set a parent menu associated with this menu item.

    Parameters

    Returns void

setModel

  • Set a model of this menu item.

    Parameters

    Returns void

setOptions

  • setOptions(options: any): void

Generated using TypeDoc