InputDialog class

This class defines a modal or non-modal dialog for displaying text and/or request input from a user. User input elements are consisting of multiple rows with text labels, text input fields, check and radio buttons and combo boxes. The dialog appearance (style) is defined by the attributes of the class

Inheritance
Implementers

Constructors

InputDialog(String buttontype, String htmlTitleText, List<String> textLabels, List<List<String>> comboInfo, List<String> defaultInputTexts, List<int> widths, List<String> isChecked, BaseDialogCloseCallback closeCallback, bool alternateRowColor, List<String> buttonLabels)
NOTE: In many cases it is not necessary to use the constructors. It is easier to inoke the utilities Info.show(), Info.get(), Info,get2D(), Info.confirm(). Creates and shows an InputDialog consisting of a text header, followed by several rows. Each row consists of an options radio or check button, a text label, a text input field, and an optional combo box. At its bottom, the dialog has zero up to 3 action buttons (extending to >4 is easy). At the top left or right, a red cross is displayed and serves as an Abort button. buttontype = one of DiaAttr.RADIO, DiaAttr.CHECKBOX, null(=CHECKBOX) See isChecked argument for details. htmlTitleText = the dialog header textLabels = one text label per row belonging to the row's text input field comboInfo = needed when a combox box is appended to a text input field. null = no combox at all in the dialog, otherwise e.g. if 4 dialog rows: [null, "yes", "no", "skip", null, null] would mean that rows 0,2,3 don't have combo boxes assigned, while row 1 gets a combo box with 3 members. NOTE: if the first item of combo values contains (e.g. at the beginning) InputDialog.ENABLE_TEXTINPUT_COMBO (e.g. the "yes" in the example), the text input field belonging to the combo box display will stay editable, otherwise it will be disabled. NOTE: if the first item of combo values contains InputDialog.DISABLE_COMBO_SELECTION, a selected combo item will NOT be put into the textfield the combo belongs to. defaultInputTexts = the initial contents of the text input fields. widths = the widths of the text input fields in characters. A width my be 0, then no input text field is shown for this row. isChecked = the initial values of the radio buttons or checkboxes. isChecked = null: No radio button or checkbox is drawn at all, regardless of buttontype. If a list entry of isChecked is null, then no radio button or checkbox for this row is shown. If a list entry of isChecked is "true" or "false", a radio button or checkbox (depending on buttontype) for this row is shown and gets initialized with checked or unchecked, respectively. closeCallback = called when an action button is pressed (may be null) alternateRowColor = if true, every second dialog row will get a different color. buttonLabels = the labels of the action buttons at the bottom of the dialog. If null, 1 action button labelled with "OK" is shown. If "" (empty String), no action button at all is shown. buttonLabels.length must be <= 3 at this time, extension is easy.
InputDialog.noModal(String buttontype, String htmlTitleText, List<String> inputTextLabelInfo, List<List<String>> comboInfo, List<String> defaultInputTexts, List<int> sizes, List<String> isChecked, BaseDialogCloseCallback closeCallback, bool alternateRowColor, List<String> buttonLabels)
Creates a non-modal (non-blocking) dialog. See InputDialog for the arguments.
InputDialog.twoD(String buttontype, String htmlTitleText, List<String> defaultInputTexts, Map<int, List<List<String>>> comboInfoND, Map<int, List<String>> defaultInputTextsND, List<int> sizes, List<String> isChecked, BaseDialogCloseCallback closeCallback, bool alternateRowColor, List<String> buttonLabels)
The twoD input dialog supports 2 columns of text input fields per rows, rather than just 1 column as it the case with InputDialog(). This constructor comment only describes the arguments different from InputDialog()'s arguments. comboInfoND = like comboInfo, but values for 2 columns must be given. Use the Map keys InputDialog.COL1 and InputDialog.COL2 for this. defaultInputTextsND = like defaultInputTexts, but values for 2 columns must be given.

Properties

actButs ↔ List<ActButton>
read / write
diaTable ↔ TableElement
read / write
read / write
RADIOGROUP1 → String
final
redcross_left ↔ bool
read / write
closeCallback BaseDialogCloseCallback
read / write, inherited
dia ↔ DivElement
read / write, inherited
diaContainer ↔ DivElement
read / write, inherited
hashCode → int
The hash code for this object. [...]
read-only, inherited
isModal ↔ bool
read / write, inherited
isopen ↔ bool
read / write, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

init(String buttontype, String htmlTitleText, List<String> inputTextLabelInfo, Map<int, List<List<String>>> comboInfoND, Map<int, List<String>> defaultInputTextsND, List<int> sizes, List<String> isChecked, bool alternateRowColor, List<String> buttonLabels) → dynamic
Creates and displays a dialog. See InputDialog and InputDialog.twoD for the arguments.
close(UserInput userInput) → void
Closes the dialog. userInput is passed on to closeCallback if a non-null callback is defined. if userInput is null, a non-null one is generated, with an empty String a button code.
inherited
createShowDia() → void
Performs the dialog creation and display logic.
inherited
isOpen() → bool
Returns true if the dialog is open.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Properties

ALIGN_LEFT → String
final
COL1 → int
final
COL2 → int
final
DISABLE_COMBO_SELECTION → String
final
ENABLE_TEXTINPUT_COMBO → String
final
inputDialogStatus ↔ int
read / write
READ_ONLY → String
final

Static Methods

show(String buttontype, String htmlTitleText, List<String> inputTextLabelInfo, List<List<String>> comboInfo, List<String> defaultInputTexts, List<int> sizes, List<String> isChecked, bool alternateRowColor, List<String> buttonLabels) → Future<UserInput>
Displays a dialog with a htmlTitleText and with several rows of optional check buttons, radio buttons, text entry fields, combo boxes. The name "get" indicates that UserInput into the above GUI elements is returned. buttontype - one of DiaAttr.RADIO, DiaAttr.CHECKBOX, null(=CHECKBOX)] See isChecked argument for further details. [...]
show2D(String buttontype, String htmlTitleText, List<String> inputTextLabelInfo, Map<int, List<List<String>>> comboInfoND, Map<int, List<String>> defaultInputTextsND, List<int> sizes, List<String> isChecked, bool alternateRowColor, List<String> buttonLabels) → Future<UserInput>
This method is similar to get, with the following difference: it displays not a single, but two columns with texts, text entry fields etc. So, the meaning of the arguments is the same as for get, except for the following which reflect the 2D features: comboInfoND - acts like comboInfo in get, but values for the two columns must be given. Use the Map keys InputDialog.COL1 and InputDialog.COL2 for this. defaultInputTextsND = like defaultInputTexts inget, but values for the two columns must be given. Use the Map keys InputDialog.COL1 and InputDialog.COL2 for this. Please refer to the example showAdvancedInputDialog2D in the file examples.dart of this package.