com.phloxui
Version:
PhloxUI Ng2+ Framework
62 lines (61 loc) • 3.04 kB
TypeScript
import { EventEmitter } from '@angular/core';
import { IApplicationAware } from './IApplicationAware';
import { PhloxApp } from './PhloxApp.component';
import { PhloxAppService } from '../service/PhloxAppService.service';
import { NeedFocusService } from '../service/NeedFocusService.service';
import { INeedFocus } from '../component/INeedFocus';
import { AbstractI18NApplicable } from '../share/AbstractI18NApplicable';
/**
* <p style="text-indent: 2em;">
* An abstract base class of clickable component (such as buttons) playing <code>ripple</code> effect when it is clicked.
* </p>
*
* @author shiorin, tee4cute
*/
export declare abstract class AbstractRippleButton extends AbstractI18NApplicable implements IApplicationAware, INeedFocus {
protected beforeFocusEvent: EventEmitter<any>;
protected focusEvent: EventEmitter<any>;
protected beforeLostFocusEvent: EventEmitter<any>;
protected lostFocusEvent: EventEmitter<any>;
protected beforeChangeEvent: EventEmitter<any>;
protected phloxAppService: PhloxAppService;
protected needFocusService: NeedFocusService;
private readonly app;
constructor(phloxAppService: PhloxAppService, needFocusService: NeedFocusService);
getApplication(): PhloxApp;
protected emitBeforeFocusEvent($event?: any): void;
protected emitFocusEvent($event: any): void;
protected emitBeforeLostFocusEvent($event?: any): void;
protected emitLostFocusEvent($event: any): void;
onLostFocus($event: any, fireEvent?: boolean): void;
onFocus($event: any, fireEvent?: boolean): void;
/**
* <p style="text-indent: 1em;">
* Play a <code>ripple</code> effect at the position specified in <code><b>event</b></code> object.
* </p>
*
* @param event A mouse event causing the <code>ripple</code> effect to be played. For example, a mouse click event, etc.
* @param target A target DOM element to display the effect. By default, this should be an element causing an event to
* occur (<code>event.target</code>).
*/
playRippleEffect(event: MouseEvent, target?: any): Promise<any>;
/**
* <p style="text-indent: 1em;">
* A default implementation of <code>click</code> <code>handler</code> method which automatcially plays a <code>ripple</code> effect
* ([[playRippleEffect]]) at the position specified in <code><b>event</b></code> object.
* </p>
*/
onClick(event: MouseEvent): void;
onFocusing($event: Event): void;
onLostFocusing($event: Event): void;
getBeforeLostFocusEvent(): EventEmitter<any>;
setBeforeLostFocusEvent(event: EventEmitter<any>): void;
getLostFocusEvent(): EventEmitter<any>;
setLostFocusEvent(event: EventEmitter<any>): void;
getBeforeFocusEvent(): EventEmitter<any>;
setBeforeFocusEvent(event: EventEmitter<any>): void;
getFocusEvent(): EventEmitter<any>;
setFocusEvent(event: EventEmitter<any>): void;
protected abstract doFocus($event: Event): void;
protected abstract doLostFocus($event: Event): void;
}