Methods

(static) buttonDialogResult(index, confirmIndex, buttons, externallyCancelledopt) → {object}

Result for a button-row dialog (JRDialog). index = -1 means cancelled. confirmIndex is the button that counts as the affirmative action (-1 = none), which is what showConfirmDialog sets so callers can read result.confirmed.

Parameters:
NameTypeAttributesDefaultDescription
indexinteger
confirmIndexinteger
buttonsobject
externallyCancelledboolean<optional>
false
Returns:
Type: 
object

(static) listDialogResult(index, externallyCancelledopt) → {object}

Result for a selection-list dialog (JRListDialog). index = -1 means dismissed without choosing. A list dialog has NO buttons at all: its rows are the only focusable thing in it and Back is the exit, so both button fields stay empty and callers branch on optionIndex / cancelled.

It used to take a cancelText and report it as buttonText on dismissal, from when the dialog had a Cancel button. Keeping that would have meant a result naming a control the user was never shown.

Parameters:
NameTypeAttributesDefaultDescription
indexinteger
externallyCancelledboolean<optional>
false
Returns:
Type: 
object

(static) makeDialogResult(cancelled, confirmed, buttonIndex, optionIndex, buttonText, value, externallyCancelledopt) → {object}

Parameters:
NameTypeAttributesDefaultDescription
cancelledboolean
confirmedboolean
buttonIndexinteger
optionIndexinteger
buttonTextstring
valuestring
externallyCancelledboolean<optional>
false
Returns:
Type: 
object

(static) textDialogResult(cancelled, enteredText) → {object}

Result for a text-entry dialog (JRKeyboardDialog). cancelled distinguishes a cancel/back from an intentionally empty entry, so callers can tell them apart.

Parameters:
NameTypeDescription
cancelledboolean
enteredTextstring
Returns:
Type: 
object