Class fvaswing.components.FvInputDialog

Description

Input dialog implementation.

2 ways to use input dialog


Thus we can create specific input dialog or always use the singleton one.

Take a look at open() unique method to show how to use this component.

Button labels are connected to the FvAlertResources localisation resources.

Field Index

buttonWidth, invalidColor, onInputResultEVENT

Method Index

new FvInputDialog()
getInstance(), open()

Constructor Detail

FvInputDialog

public function FvInputDialog()

Constructor.

Field Detail

onInputResultEVENT

static public onInputResultEVENT:EventType
Event type broadcasted when user click on submit button.

buttonWidth

static public buttonWidth:Number
Width of each button, in pixels.

invalidColor

static public invalidColor:ASColor
Invalid textfield background.

Method Detail

getInstance

static public function getInstance():FvInputDialog

Returns FvInputDialog instance.

Always returns the same instance.
Design Pattern Singleton.

Return

FvInputDialog instance

open

public function open(label:String, listener, f:Function):Void

Opens the input dialog.

Various way to open an input dialog :

  • FvInputDialog.getInstance().open( "What is your name ?", this, _onResult );
  • FvInputDialog.getInstance().open( "What is your name ?", this, _onResult, "param" );
  • FvInputDialog.getInstance().open( "What is your name ?", this );
  • FvInputDialog.getInstance().open( "What is your name ?", Delegate.create( this, _onResult ) );
  • FvInputDialog.getInstance().open( "What is your name ?", Delegate.create( this, _onResult, "param" ) );

If f callback is omitted, listener must have a onInputResultEVENT event handler.

Parameters

labelMessage to indicate which type of information we wanted
listenerListener object
f( optional ) listener callback to activate on result.