qnx.fuse.ui.dialog.DialogBase

DialogBase

Properties | Methods | Events | Constants


Packageqnx.fuse.ui.dialog
Classpublic class DialogBase
InheritanceDialogBase Inheritance qnx.fuse.ui.window.WindowedComponent
Subclasses AlertDialog, ToastBase



Class information:
BlackBerry 10 Version:   10.0.0



Public Properties

 PropertyDefined By
  allowEmptyResponse : Boolean
Determines whether the dialog enables the default button when input fields are empty or not.
DialogBase
  buttonCount : int
[read-only] Read-only property reflecting the number of buttons in the dialog.
DialogBase
  buttonLimit : int
Sets the limit for the number of buttons that can appear in the footer on the dialog.
DialogBase
  cancelRequired : Boolean
DialogBase
  contentSelectable : Boolean
Gets or Sets flag indicating the main content container is selectable.
DialogBase
  defaultButtonIndex : int
Gets or sets the default button index value used to determine what button to automatically select in the event that the user hits the return key.
DialogBase
  isBusy : Boolean
Determines whether the dialog should allow the activity indicator to the user or not.
DialogBase
  returnKeyType : String
Sets the return key type for input fields on the dialog.
DialogBase
  selectedIndex : int
[read-only] Read-only property which defines the index of the button selected to close the dialog, or -1 of no button was selected.
DialogBase
  textInputOptions : int
Sets the text input options for input fields on the dialog.
DialogBase
  title : String
Sets the text for the dialog title.
DialogBase

Protected Properties

 PropertyDefined By
  content : Container
The container for the dialog content area
DialogBase
  cssID : String
[override] [read-only] Returns the CSS ID of the component.
DialogBase
  dialogContainer : Container
The outer-most container for the dialog
DialogBase
  footer : Container
The container for the dialog footer area
DialogBase
  header : Container
The container for the dialog header area
DialogBase
  masterContent : Container
The container for the master content area
DialogBase
  titleHTML : String
DialogBase

Public Methods

 MethodDefined By
  
DialogBase
  
addButton(label:String):int
Adds a button to the dialog.
DialogBase
  
cancel():void
[override] Cancels the on-screen dialog.
DialogBase
  
[override] Called by the WindowManager class to request that the window control object immediately cancel the window.
DialogBase
  
getButtonPropertyAt(prop:String, index:int):Object
Gets the value of a property, given the property name and property object index.
DialogBase
  
getItemAt(index:int):Object
Returns the button at the given index, or null if the index is out of range.
DialogBase
  
onTransition(state:String):void
[override]
DialogBase
  
removeButtonAt(index:int):void
Removes the button from the dialog at the specified index.
DialogBase
  
setButtonPropertyAt(prop:String, value:Object, index:int):void
Sets a button property given a property name, a property value, and the index of a button property object.
DialogBase
  
show():void
[override] Shows the dialog on the screen.
DialogBase
  
update():void
[override] Updates the on-screen dialog to reflect its current attributes.
DialogBase
  
[override]
DialogBase

Protected Methods

 MethodDefined By
  
This function is called whenever the textInputOptions have changed for the dialog.
DialogBase
  
createButton(position:String):LabelButton
Called to create a dialog button (must be derived from LabelButton)
DialogBase
  
createContent(container:Container):void
Called to create the content area
DialogBase
  
createDialog(container:Container):void
Called to create the dialog area
DialogBase
  
createFooter(container:Container):void
Called to create the footer area
DialogBase
  
createHeader(container:Container):void
Called to populate the header area
DialogBase
  
Called to create the content area
DialogBase
  
Called to create the button content area
DialogBase
  
Ensures the given component is properly destroyed.
DialogBase
  
The disableActionButton method disables the action button if there is more than one button, if it is not currently disabled and if defaultButtonIndex is set.
DialogBase
  
The enableActionButton method enables the action button if it was disabled.
DialogBase

Events

 Event Summary Defined By
  Dispatched when a button in the dialog has been clicked.DialogBase

Protected Constants

 ConstantDefined By
  CONTENT_SELECTED_INDEX : int = -2
[static] Selected index assigned when selectable content is pressed
DialogBase
  DIALOG_CHECKBOX : String = dialogCheckBox
[static]
DialogBase
  ID_ALIGN_RIGHT : String = dialogAlignRight
[static] Id tag assigned to labels or text fields that want to inherit CSS right alignment formatting.
DialogBase

Property Detail

allowEmptyResponse


allowEmptyResponse:Boolean

Determines whether the dialog enables the default button when input fields are empty or not.


Implementation

public function get allowEmptyResponse():Boolean
public function set allowEmptyResponse(value:Boolean):void

buttonCount


buttonCount:int  [read-only]

Read-only property reflecting the number of buttons in the dialog.


Implementation

public function get buttonCount():int

buttonLimit


buttonLimit:int

Sets the limit for the number of buttons that can appear in the footer on the dialog. If the number of buttons provided to the dialog exceeds buttonLimit, then the buttons will be displayed vertically in the dialog, with the last button provided shown in the footer area of the dialog. Valid values for buttonLimit are: 1, 2 or 3.

The default value is 3.


Implementation

public function get buttonLimit():int
public function set buttonLimit(value:int):void

cancelRequired


cancelRequired:Boolean


Implementation

public function get cancelRequired():Boolean
public function set cancelRequired(value:Boolean):void

content


protected var content:Container

The container for the dialog content area

contentSelectable


contentSelectable:Boolean

Gets or Sets flag indicating the main content container is selectable.


Implementation

public function get contentSelectable():Boolean
public function set contentSelectable(value:Boolean):void

See also

CONTENT_SELECTED_INDEX

cssID


cssID:String  [read-only]
[override]

Returns the CSS ID of the component. The CSS ID is used for identifying the type of component in CSS.

The default value is Dialog.


Implementation

protected function get cssID():String

defaultButtonIndex


defaultButtonIndex:int

Gets or sets the default button index value used to determine what button to automatically select in the event that the user hits the return key.


Implementation

public function get defaultButtonIndex():int
public function set defaultButtonIndex(value:int):void

dialogContainer


protected var dialogContainer:Container

The outer-most container for the dialog

footer


protected var footer:Container

The container for the dialog footer area

header


protected var header:Container

The container for the dialog header area

isBusy


isBusy:Boolean

Determines whether the dialog should allow the activity indicator to the user or not.


Implementation

public function get isBusy():Boolean
public function set isBusy(value:Boolean):void

masterContent


protected var masterContent:Container

The container for the master content area

returnKeyType


returnKeyType:String

Sets the return key type for input fields on the dialog. These types are specified in ReturnKeyType.


Implementation

public function get returnKeyType():String
public function set returnKeyType(value:String):void

See also

ReturnKeyType

selectedIndex


selectedIndex:int  [read-only]

Read-only property which defines the index of the button selected to close the dialog, or -1 of no button was selected.


Implementation

public function get selectedIndex():int

textInputOptions


textInputOptions:int

Sets the text input options for input fields on the dialog. These options are specified in an integer bit mask using the values in DialogTextInputOptions.


Implementation

public function get textInputOptions():int
public function set textInputOptions(value:int):void

See also

DialogTextInputOptions

title


title:String

Sets the text for the dialog title.


Implementation

public function get title():String
public function set title(value:String):void

titleHTML


titleHTML:String


Implementation

protected function get titleHTML():String
protected function set titleHTML(value:String):void

Constructor Detail

DialogBase()


public function DialogBase()



Method Detail

addButton()


public function addButton(label:String):int

Adds a button to the dialog.

Parameters

label:String — The button label.

Returns

int — int The index number of the newly added button.

applyTextInputOptions()


protected function applyTextInputOptions():void

This function is called whenever the textInputOptions have changed for the dialog. Override applyTextInputOptions to apply text input options on any text input fields in the dialog as appropriate.

See also

textInputOptions
DialogTextInputOptions

cancel()


override public function cancel():void

Cancels the on-screen dialog.

cancelWindow()


override public function cancelWindow():void

Called by the WindowManager class to request that the window control object immediately cancel the window.

createButton()


protected function createButton(position:String):LabelButton

Called to create a dialog button (must be derived from LabelButton)

Parameters

position:String

Returns

LabelButton

createContent()


protected function createContent(container:Container):void

Called to create the content area

Parameters

container:Container

createDialog()


protected function createDialog(container:Container):void

Called to create the dialog area

Parameters

container:Container

createFooter()


protected function createFooter(container:Container):void

Called to create the footer area

Parameters

container:Container

createHeader()


protected function createHeader(container:Container):void

Called to populate the header area

Parameters

container:Container

createMasterContent()


protected function createMasterContent(container:Container):void

Called to create the content area

Parameters

container:Container

createUnscrollableContent()


protected function createUnscrollableContent(container:Container):void

Called to create the button content area

Parameters

container:Container

destroyComponent()


protected function destroyComponent(component:UIComponent):void

Ensures the given component is properly destroyed.

Parameters

component:UIComponent

disableActionButton()


protected function disableActionButton():void

The disableActionButton method disables the action button if there is more than one button, if it is not currently disabled and if defaultButtonIndex is set.

enableActionButton()


protected function enableActionButton():void

The enableActionButton method enables the action button if it was disabled.

getButtonPropertyAt()


public function getButtonPropertyAt(prop:String, index:int):Object

Gets the value of a property, given the property name and property object index.

Parameters

prop:String — The property String value.
index:int — The index of the property object to inspect.

Returns

Object

See also

DialogButtonProperty

getItemAt()


public function getItemAt(index:int):Object

Returns the button at the given index, or null if the index is out of range.

Parameters

index:int — The index of the button object.

Returns

Object — A Button object.

onTransition()


override public function onTransition(state:String):void

Parameters

state:String

removeButtonAt()


public function removeButtonAt(index:int):void

Removes the button from the dialog at the specified index.

Parameters

index:int — The index of the button to remove.

setButtonPropertyAt()


public function setButtonPropertyAt(prop:String, value:Object, index:int):void

Sets a button property given a property name, a property value, and the index of a button property object.

In the following listing, the button at the second index position is disabled.

alert.setButtonPropertyAt(DialogButtonProperty.ENABLED, false, 1);
         

Parameters

prop:String — The name of the property to set.
value:Object — The value of the property.
index:int — The index of a button property object.

See also

DialogButtonProperty

show()


override public function show():void

Shows the dialog on the screen.

update()


override public function update():void

Updates the on-screen dialog to reflect its current attributes.

validateNow()


override public function validateNow():void

Event Detail

select


Event Object Type: flash.events.Event
Event.type property = flash.events.Event.SELECT

Dispatched when a button in the dialog has been clicked.

Constant Detail

CONTENT_SELECTED_INDEX


protected static const CONTENT_SELECTED_INDEX:int = -2

Selected index assigned when selectable content is pressed

DIALOG_CHECKBOX


protected static const DIALOG_CHECKBOX:String = dialogCheckBox

ID_ALIGN_RIGHT


protected static const ID_ALIGN_RIGHT:String = dialogAlignRight

Id tag assigned to labels or text fields that want to inherit CSS right alignment formatting.





comments powered by Disqus