B4J Programming Press on the image to return to the main documentation page.

jRLDialogs8

Written by Robert W.B. Linn (20160511)

List of types:

Dialogs8

Dialogs8


Events:

None

Members:


  ChoiceDialog (Title As String, Header As String, Label As String, Choices As List) As String

  ConfirmationDialog (Title As String, Header As String, Content As String) As Boolean

  DatePickerDialog (Title As String, Header As String, Label As String, DefaultDate As String) As String

  DidYouKnowDialog (Title As String, Header As String, Content As String) As Map

  ErrorDialog (Title As String, Header As String, Content As String) As String

  ExceptionDialog (Title As String, Header As String, Content As String, ex As B4AException) As String

  ExtendedDialog (Title As String, Header As String, Content As String, ContentExtended As String) As String

  InformationDialog (Title As String, Header As String, Content As String) As String

  Initialize As String

  IsInitialized As Boolean

  ListDialog (Title As String, Header As String, Items As List) As String

  ListDialog2 (Title As String, Header As String, Items As List) As Map

  LoginDialog (Title As String, Header As String) As Map

  LoginDialog2 (Title As String, Header As String, UserName As String) As Map

  MessageDialog (Title As String, Content As String) As String

  MessageHTMLDialog (Title As String, Content As String) As String

  SelectDialog (Title As String, Items As List, Height As Double, Width As Double) As Int

  SetParentWindow (ParentForm As Form) As String

  SpinnerDoubleDialog (Title As String, Header As String, LabelText As String, MinValue As Double, MaxValue As Double, InitialValue As Double, AmountToStepBy As Double) As Double

  SpinnerIntegerDialog (Title As String, Header As String, LabelText As String, MinValue As Int, MaxValue As Int, InitialValue As Int, AmountToStepBy As Int) As Int

  SpinnerListDialog (Title As String, Header As String, LabelText As String, Items As List) As String

  TextAreaDialog (Title As String, Header As String, Label As String, Text As String) As String

  TextInputDialog (Title As String, Header As String, Label As String, Text As String) As String

  TextInputDialog2 (Title As String, Header As String, Label1 As String, Label2 As String, Field1 As String, Field2 As String) As Map

  TextInputDialog3 (Title As String, Header As String, Label As String, Text As String) As String

  ToastMessage (Message As String, Duration As Int) As String

  Version As String

  WarningDialog (Title As String, Header As String, Content As String) As String

  YesNoCancelDialog (Title As String, Header As String, Content As String) As Int

Members description:

ChoiceDialog (Title As String, Header As String, Label As String, Choices As List) As String
Show a Choice Dialog.
Parameter Title, Header, Label for the Choices as string. Choices as a List.
Returns the selection as string or an empty string
ConfirmationDialog (Title As String, Header As String, Content As String) As Boolean
Show a Confirmation Dialog.
Parameter Title, Header and Content as string.
Returns a Boolean = True for OK or False for Cancel.
DatePickerDialog (Title As String, Header As String, Label As String, DefaultDate As String) As String
Show a DatePicker Dialog with default date, weeknumbers.
Parameter: Title, Header, Prompt, Default Date
Result: String with selected date or an empty string if cancelled
Note: Important To set the pattern prior calling this method; If default date Is empty ("") Then actual date Is set
DidYouKnowDialog (Title As String, Header As String, Content As String) As Map
Show DidYouKnow Dialog with Icon. The content is shown in an expanded TextArea.
Parameter Title, Header and the Did You Know Content as string.
Returns None
Note: Ensure the icon file dyk.png is added to the B4J project.
ErrorDialog (Title As String, Header As String, Content As String) As String
Show an Error Dialog.
Parameter Title, Header and Content as string.
Returns None
ExceptionDialog (Title As String, Header As String, Content As String, ex As B4AException) As String
Show an Exception Dialog in an expanded Textarea.
Parameter Title, Header, Content as string. Ex as Exception.
Returns None
Note: For the content, an option is to use LastException.Message and for Ex the LastException.
ExtendedDialog (Title As String, Header As String, Content As String, ContentExtended As String) As String
Show an Extended Dialog which has a expandable Textarea. This textarea is by default not expanded.
Parameter Title, Header, Content and Extended Content as string.
Returns None
InformationDialog (Title As String, Header As String, Content As String) As String
Show an Information Dialog.
Parameter Title, Header and Content as string.
Returns None
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
ListDialog (Title As String, Header As String, Items As List) As String
Show a List Dialog from which one item can be selected.
Parameter: Title, Header information, List of items to select from.
Result Selected item As String OR an empty String
ListDialog2 (Title As String, Header As String, Items As List) As Map
Show a List Dialog from which multiple items can be selected.
Parameter: Title, Header information, List of items to select from.
Result One OR more selected items As a Map (nr:item) OR a non initialized Map
LoginDialog (Title As String, Header As String) As Map
Show a Login Dialog.
Parameter Title, Header as string.
Returns a map username:username, password:password
If cancel selected, the returned map will not be initialized.
LoginDialog2 (Title As String, Header As String, UserName As String) As Map
Show a Login Dialog with Icon and default UserName.
Parameter Title, Header and default Username as string.
Returns a map username:username, password:password
If cancel selected, the returned map will not be initialized.
Note: Ensure the icon file login.png is added to the B4J project.
MessageDialog (Title As String, Content As String) As String
Show a Message Dialog with plain text in an expanded Textarea.
Parameter Title, Content as string.
Returns None
MessageHTMLDialog (Title As String, Content As String) As String
Show a Message Dialog with HTML formatted content in an expanded WebView.
Anchors are handled if defined like
Jump To myanchor ...
Parameter Title, Content HTML formatted as string.
Returns None
SelectDialog (Title As String, Items As List, Height As Double, Width As Double) As Int
Show a Select Dialog from which a single item can be selected.
Parameter: Title, List of items to select from, Height and Width
Result Selected item As Int or -1 if nothing selected
SetParentWindow (ParentForm As Form) As String
Set the parent window for the dialogs.
Parameter: The form to be used as parent window
Example: SetParentWindow(MainForm)
Notes:
To reset the parentwindow, call SetParentWindow(Null)
The parent window can not be set for ToastMessageShow
SpinnerDoubleDialog (Title As String, Header As String, LabelText As String, MinValue As Double, MaxValue As Double, InitialValue As Double, AmountToStepBy As Double) As Double
Show a Spinner Double Dialog with default value and amount to step by.
Parameter: Title, Header, Label as string, Double Values for Min, Max, InitialValue, AmountToStepBy
Result: Double with selected value or -1 if cancelled
SpinnerIntegerDialog (Title As String, Header As String, LabelText As String, MinValue As Int, MaxValue As Int, InitialValue As Int, AmountToStepBy As Int) As Int
Show a Spinner Integer Dialog with default value, amount to step by.
Parameter: Title, Header, Label, Integer Values for Min, Max, InitialValue, AmountToStepBy
Result: Integer with selected value or -1 if cancelled
SpinnerListDialog (Title As String, Header As String, LabelText As String, Items As List) As String
Show a Spinner List Dialog.
Parameter: Title, Header and label as string, Items As List
Result: String with selected value or empty string if cancelled
TextAreaDialog (Title As String, Header As String, Label As String, Text As String) As String
Show a TextInput Dialog with one field with user cancel handling.
Parameter Title, Header, Input Label and the default text as string.
Returns the text entered as string or a null string if dialog cancelled
To test the result of the dialog use like If result.EqualsIgnoreCase(Null) Then ...
TextInputDialog (Title As String, Header As String, Label As String, Text As String) As String
Show a TextInput Dialog with one field.
Parameter Title, Header, Input Label and the default text as string.
Returns the text entered as string or an empty string
TextInputDialog2 (Title As String, Header As String, Label1 As String, Label2 As String, Field1 As String, Field2 As String) As Map
Show a TextInputDialog with two fields.
Parameter: Title and Header, Prompts (Label1 and Label2) for field1 and 2, Default values For field1 and 2
Result: Map with 2 entries holding field1:textinputfield1, field2:textinputfield2 or if cancelled a non initialized Map
TextInputDialog3 (Title As String, Header As String, Label As String, Text As String) As String
Show a TextInput Dialog with one field with user cancel handling
Parameter Title, Header, Input Label and the default text as string.
Returns the text entered as string or a null string if dialog cancelled
To test the result of the dialog use like If result.EqualsIgnoreCase(Null) Then ...
ToastMessage (Message As String, Duration As Int) As String
Show a ToastMessage.
Parameter: Message displayed. Can include html tags (ensure to include the html and /html tags
Parameter: Duration miliseconds keeping the message visible. Must be greater 0.
Version As String
WarningDialog (Title As String, Header As String, Content As String) As String
Show an Warning Dialog.
Parameter Title, Header and Content as string.
Returns None
YesNoCancelDialog (Title As String, Header As String, Content As String) As Int
Show a Yes No Cancel Dialog.
Parameter Title, Header and Content as string.
Returns an Int: Yes = 1, No = 0, Cancel = -1

Top