UNPKG

com.phloxui

Version:

PhloxUI Ng2+ Framework

41 lines (40 loc) 1.52 kB
import { INavigatee } from './INavigatee'; import { AbstractNavMenu } from './AbstractNavMenu'; import { AbstractRippleButton } from './AbstractRippleButton'; import { PhloxAppService } from '../service/PhloxAppService.service'; import { NeedFocusService } from '../service/NeedFocusService.service'; /** * <p style="text-indent: 2em;"> * An abstract base class for <code>nav item</code>. A <code>nav item</code> must be in <code>nav menu</code>. This class provides a * default [[onClick]] method implementation calling [[AbstractNavMenu.navigateTo]] to navigate the associated <code>nav menu</code> to * <code>this</code> item when it is clicked. * </p> * * @author shiorin, tee4cute * @see [[AbstractNavMenu]] */ export declare abstract class AbstractNavItem extends AbstractRippleButton implements INavigatee { /** * A flag indicating that this item is currently active or not. */ active: boolean; protected navMenu: AbstractNavMenu<AbstractNavItem>; protected name: string; constructor(phloxAppService: PhloxAppService, needFocusService: NeedFocusService); /** * Get the <code>nav menu</code> which this item is in. */ getNavMenu(): AbstractNavMenu<AbstractNavItem>; /** * Getter method for [[active]] flag. */ isActive(): boolean; /** * Get the name of this item. */ getName(): string; /** * Default click event handler calling [[AbstractNavMenu.navigateTo]] to this item. */ onClick(event: any): void; }