InputDialog constructor
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.
Implementation
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)
: super(closeCallback) {
init(
buttontype,
htmlTitleText,
textLabels,
{COL1: comboInfo},
{COL1: defaultInputTexts},
widths,
isChecked,
alternateRowColor,
buttonLabels);
}