Alert dialog box.
The Alert control is modal, which means it will retain focus until the user closes it.
Is connected to Fever Localisation API
public function test() : Void { var alert : FvAlert = new FvAlert( FvAlertType.OK_ONLY ); alert.message = "Delete this file"; alert.title = "Caution"; alert.addListener( this, _onResult ); alert.enabledBlurEffect = true; alert.open( ); } private function _onResult( event : FvAlertEvent ) : Void { if( event.getButton() == FvAlert.BUTTON_YES ) { //do something } }
new FvAlert()public function FvAlert(type:FvAlertType)Constructor.
type | The alert dialog type, possible values are : |
static public onAlertClosedEvent:EventTypestatic public buttonHeight:Numberstatic public buttonWidth:Numberpublic alertType:FvAlertTypePossible values are :
If no valid flag is passed, use fvaswing.components.alert.FvAlertType.OK_ONLY.
public defaultButton:FvAlertButtonPossible values are :
public message:Stringpublic title:Stringpublic icon:Iconpublic enabledBlurEffect:Booleanstatic public function show(text:String, caption:String, type:FvAlertType, listener, customIcon:Icon, defaultFlag:FvAlertButton):FvAlertCreates and show an new alert dialog box.
text | The alert message |
type | The alert dialog type, possible values are : |
public function removeListener(listener):VoidRemove the specified event listener.
listener | the listener which will be removed. |
public function isOpen():BooleanIndicates if current alert instance is opened or not.
true if alert is opened.
public function open():VoidDisplays the alert window.
The buttons label are automatically update
public function close():VoidCloses the alert window.
When user click on 'close button', the ON_ALERT_CLOSED event is dispatched with BUTTON_CANCEL id.