public class ClientDialogHelper extends java.lang.Object implements FormattedChoiceDialogI
This class was extracted from the monolithic client core to decouple visual interaction routines from backend session, transaction, and event-handling lifecycles. It resolves parent component hierarchy via the supplied container context and enforces thread safety by routing dialog invocations to the Swing Event Dispatch Thread (EDT) where necessary.
Implements FormattedChoiceDialogI to provide standardized, format-aware
selection dialogs for business objects, domain entities, and arbitrary options.
CANCELED, CONFIRMED, DENIED, TYPE_ERROR, TYPE_INFO, TYPE_PLAIN, TYPE_QUESTION, TYPE_WARNING| Constructor and Description |
|---|
ClientDialogHelper(ClientContextI _ctx) |
| Modifier and Type | Method and Description |
|---|---|
de.ipcon.swing.MessagePopupConfiguration |
getMessagePopupConfiguration() |
void |
setMessagePopupConfiguration(de.ipcon.swing.MessagePopupConfiguration config) |
java.math.BigDecimal |
showBigDecimalInputDialog(java.lang.String s,
java.lang.String title,
java.math.BigDecimal oldValue,
boolean nullAllowed)
Shows a modal dialog for
BigDecimal input. |
int |
showConfirmDialog(java.lang.String s,
java.lang.String title,
boolean forceAffirmation,
java.lang.String affirmationText,
java.lang.String affirmationString)
Displays a confirmation dialog offering YES, NO, and CANCEL options, with optional
affirmation text required for confirmation.
|
java.util.Date |
showDateInputDialog(java.lang.String s,
java.lang.String title,
java.util.Date oldValue,
boolean nullAllowed,
java.lang.String format)
Shows a modal dialog for
Date input. |
java.lang.Object |
showError(java.lang.String s) |
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable throwableToShow) |
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable throwableToShow,
boolean suppressPrintCausedBy) |
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable throwableToShow,
boolean suppressPrintCausedBy,
java.lang.String title) |
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable ex,
boolean suppressPrintCausedBy,
java.lang.String title,
java.lang.Object[] buttons)
Shows an error message, controlling whether the "Caused by" trace is printed in the details.
|
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable throwableToShow,
java.lang.String title) |
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable throwableToShow,
java.lang.String title,
boolean deprecatedForceSynchronous) |
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable throwableToShow,
java.lang.String title,
boolean deprecatedForceSynchronous,
boolean takeScreenshot) |
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable throwableToShow,
java.lang.String title,
boolean deprecatedForceSynchronous,
boolean takeScreenshot,
boolean suppressPrintCausedBy) |
java.lang.Object |
showError(java.lang.String s,
java.lang.Throwable ex,
java.lang.String title,
boolean deprecatedForceSynchronous,
java.lang.Object[] buttons)
Shows an error message in a modal dialog with an optional exception stack trace.
|
java.lang.Object |
showException(java.lang.Throwable throwableToShow) |
java.lang.Object |
showException(java.lang.Throwable throwableToShow,
boolean deprecatedForceSynchronous) |
java.lang.Object |
showException(java.lang.Throwable ex,
boolean deprecatedForceSynchronous,
java.lang.Object[] buttons)
Shows an exception stack trace in a dialog without a custom error message.
|
java.lang.Integer |
showIntegerInputDialog(java.lang.String s,
java.lang.String title,
java.lang.Integer oldValue,
boolean nullAllowed)
Shows a modal dialog for
Integer input. |
java.lang.Object |
showListChoiceDialog(java.lang.String title,
java.lang.Object[] options,
int defaultIndex,
java.lang.String cboFormat,
boolean multiple)
Shows a dialog window that allows the user to select one or more from the provided options.
|
java.lang.Object |
showListChoiceDialog(java.lang.String title,
java.lang.Object[] options,
java.lang.Object defaultChoice,
java.lang.String cboFormat,
boolean multiple)
Shows a dialog window that allows the user to select one or more from the provided options.
|
java.lang.Long |
showLongInputDialog(java.lang.String s,
java.lang.String title,
java.lang.Long oldValue,
boolean nullAllowed)
Shows a modal dialog for
Long input. |
void |
showMessageDialog(java.lang.String s,
java.lang.String type,
java.lang.String title)
Shows a modal message dialog that blocks execution until the user dismisses it.
|
void |
showMessageDialogNonModal(java.lang.String s,
java.lang.String type,
java.lang.String title)
Shows a non-modal message dialog that does not block background execution.
|
java.lang.Object[] |
showMultiListChoiceDialog(java.lang.String title,
java.lang.Object[] options,
java.lang.Object[] defaultChoices,
java.lang.String cboFormat)
Shows a dialog window that allows the user to select one or more from the provided options.
|
java.lang.Object |
showMultipleChoiceDialog(java.lang.String s,
java.lang.String title,
java.lang.Object[] options,
int defaultIndex)
Shows a multiple choice dialog (checkbox style) with a default index.
|
java.lang.String |
showStringInputDialog(java.lang.String message,
java.lang.String title,
java.lang.String oldValue,
boolean multilineInput,
boolean passwordInput)
Shows a modal dialog for string input.
|
void |
showSystemMessageDialogNonModal(java.lang.String s) |
void |
showSystemMessageDialogNonModal(java.lang.String s,
java.lang.String type) |
void |
showSystemMessageDialogNonModal(java.lang.String s,
java.lang.String type,
java.lang.String title) |
void |
showSystemMessageDialogNonModal(java.lang.String s,
java.lang.String type,
java.lang.String title,
int maxLengthLines) |
void |
showSystemMessageDialogNonModal(java.lang.String s,
java.lang.String type,
java.lang.String title,
int maxLengthLines,
de.ipcon.swing.IconKeys iconKey) |
java.util.Date[] |
showTimespanInputDialog(java.lang.String s,
java.lang.String title,
java.util.Date oldValueStart,
java.util.Date oldValueEnd,
boolean startNullAllowed,
boolean endNullAllowed,
java.lang.String format)
Shows a modal dialog for inputting a start and end date timespan.
|
java.lang.String[] |
showUserLoginDialog(java.lang.String message,
java.lang.String title,
java.lang.String user)
Shows a dialog prompting for username and password, with an optionally pre-filled username.
|
boolean |
showYesNoDialog(java.lang.String s)
Shows a simple modal dialog asking a Yes/No question.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitshowListChoiceDialog, showListChoiceDialog, showListChoiceDialog, showListChoiceDialog, showListChoiceDialog, showMultiListChoiceDialog, showMultiListChoiceDialogshowBigDecimalInputDialog, showBigDecimalInputDialog, showBigDecimalInputDialog, showConfirmDialog, showConfirmDialog, showConfirmDialog, showConfirmDialog, showDateInputDialog, showDateInputDialog, showDateInputDialog, showDateInputDialog, showIntegerInputDialog, showIntegerInputDialog, showIntegerInputDialog, showLongInputDialog, showLongInputDialog, showLongInputDialog, showMessageDialog, showMessageDialog, showMessageDialogNonModal, showMessageDialogNonModal, showMultipleChoiceDialog, showPasswordInputDialog, showPasswordInputDialog, showStringInputDialog, showStringInputDialog, showStringInputDialog, showStringInputDialog, showTimespanInputDialog, showTimespanInputDialog, showTimespanInputDialog, showTimespanInputDialog, showTimespanInputDialog, showTimespanInputDialog, showUserLoginDialogpublic ClientDialogHelper(ClientContextI _ctx)
public de.ipcon.swing.MessagePopupConfiguration getMessagePopupConfiguration()
public void setMessagePopupConfiguration(de.ipcon.swing.MessagePopupConfiguration config)
public void showSystemMessageDialogNonModal(java.lang.String s)
public void showSystemMessageDialogNonModal(java.lang.String s,
java.lang.String type)
public void showSystemMessageDialogNonModal(java.lang.String s,
java.lang.String type,
java.lang.String title)
public void showSystemMessageDialogNonModal(java.lang.String s,
java.lang.String type,
java.lang.String title,
int maxLengthLines)
public void showSystemMessageDialogNonModal(java.lang.String s,
java.lang.String type,
java.lang.String title,
int maxLengthLines,
de.ipcon.swing.IconKeys iconKey)
public java.lang.Object showError(java.lang.String s)
showError in interface BasicMessageDialogIBasicMessageDialogI.showError(String, Throwable, String, boolean, Object[])public java.lang.Object showError(java.lang.String s,
java.lang.Throwable throwableToShow)
showError in interface BasicMessageDialogIBasicMessageDialogI.showError(String, Throwable, String, boolean, Object[])public java.lang.Object showError(java.lang.String s,
java.lang.Throwable throwableToShow,
java.lang.String title)
showError in interface BasicMessageDialogIBasicMessageDialogI.showError(String, Throwable, String, boolean, Object[])public java.lang.Object showError(java.lang.String s,
java.lang.Throwable throwableToShow,
java.lang.String title,
boolean deprecatedForceSynchronous)
showError in interface BasicMessageDialogIBasicMessageDialogI.showError(String, Throwable, String, boolean, Object[])public java.lang.Object showError(java.lang.String s,
java.lang.Throwable throwableToShow,
java.lang.String title,
boolean deprecatedForceSynchronous,
boolean takeScreenshot)
public java.lang.Object showError(java.lang.String s,
java.lang.Throwable throwableToShow,
boolean suppressPrintCausedBy,
java.lang.String title)
showError in interface BasicMessageDialogIBasicMessageDialogI.showError(String, Throwable, boolean, String, Object[])public java.lang.Object showError(java.lang.String s,
java.lang.Throwable throwableToShow,
boolean suppressPrintCausedBy)
showError in interface BasicMessageDialogIBasicMessageDialogI.showError(String, Throwable, boolean, String, Object[])public java.lang.Object showError(java.lang.String s,
java.lang.Throwable throwableToShow,
java.lang.String title,
boolean deprecatedForceSynchronous,
boolean takeScreenshot,
boolean suppressPrintCausedBy)
public java.lang.Object showError(java.lang.String s,
java.lang.Throwable ex,
java.lang.String title,
boolean deprecatedForceSynchronous,
java.lang.Object[] buttons)
BasicMessageDialogIshowError in interface BasicMessageDialogIs - The error message to display.ex - The exception that caused the error (may be null).title - The title of the dialog window.deprecatedForceSynchronous - Ignored for modern execution. Retained only for backward compatibility.buttons - An array of custom buttons to display, or null for default buttons.public java.lang.Object showError(java.lang.String s,
java.lang.Throwable ex,
boolean suppressPrintCausedBy,
java.lang.String title,
java.lang.Object[] buttons)
BasicMessageDialogIshowError in interface BasicMessageDialogIs - The error message to display.ex - The exception that caused the error (may be null).suppressPrintCausedBy - If true, suppresses the printing of the "Caused by" chain.title - The title of the dialog window.buttons - An array of custom buttons to display.public java.lang.Object showException(java.lang.Throwable throwableToShow)
showException in interface BasicMessageDialogIBasicMessageDialogI.showException(Throwable, boolean, Object[])public java.lang.Object showException(java.lang.Throwable throwableToShow,
boolean deprecatedForceSynchronous)
showException in interface BasicMessageDialogIBasicMessageDialogI.showException(Throwable, boolean, Object[])public java.lang.Object showException(java.lang.Throwable ex,
boolean deprecatedForceSynchronous,
java.lang.Object[] buttons)
BasicMessageDialogIshowException in interface BasicMessageDialogIex - The exception to display.deprecatedForceSynchronous - Ignored for modern execution. Retained only for backward compatibility.buttons - An array of custom buttons to display.public boolean showYesNoDialog(java.lang.String s)
BasicMessageDialogIshowYesNoDialog in interface BasicMessageDialogIs - The question/message to display.true if the user selects Yes, false if No or canceled.public int showConfirmDialog(java.lang.String s,
java.lang.String title,
boolean forceAffirmation,
java.lang.String affirmationText,
java.lang.String affirmationString)
BasicMessageDialogIImportant Note on Return Value and Scripting Languages:
This method returns an int result code from JOptionPane.
If this result is used in a language that implicitly converts integers to booleans (like NetRexx or Groovy):
JOptionPane.YES_OPTION (which is 0) evaluates to false.JOptionPane.NO_OPTION (which is 1) and JOptionPane.CANCEL_OPTION (which is 2) evaluate to true.This inversion can lead to significant logical errors if not handled explicitly.
showConfirmDialog in interface BasicMessageDialogIs - The primary text or question to display.title - The title of the dialog.forceAffirmation - If true, the user must type the affirmationString to enable the confirm button.affirmationText - The instructional text displayed above the input field.affirmationString - The specific string the user must enter to affirm the action.int indicating the user action (e.g. JOptionPane.YES_OPTION).
Note: Closing the dialog (e.g. via the close window button) will be interpreted as a cancel action.public java.lang.String showStringInputDialog(java.lang.String message,
java.lang.String title,
java.lang.String oldValue,
boolean multilineInput,
boolean passwordInput)
Implementation Note: Acts as a wrapper for DialogTools.showInputMessageDialog(...)
showStringInputDialog in interface BasicMessageDialogImessage - The prompt message.title - The title of the dialog.oldValue - The initial value shown in the input field.multilineInput - If true, allows multiple lines of text input.passwordInput - If true, hides the input text (e.g. for password entry).null if canceled.public java.lang.Integer showIntegerInputDialog(java.lang.String s,
java.lang.String title,
java.lang.Integer oldValue,
boolean nullAllowed)
BasicMessageDialogIInteger input.showIntegerInputDialog in interface BasicMessageDialogIs - The prompt message.title - The title of the dialog.oldValue - The initial value shown in the input field.nullAllowed - If true, allows the user to leave the field empty (returns null).Integer entered by the user, or null if canceled/empty.public java.lang.Long showLongInputDialog(java.lang.String s,
java.lang.String title,
java.lang.Long oldValue,
boolean nullAllowed)
BasicMessageDialogILong input.showLongInputDialog in interface BasicMessageDialogIs - The prompt message.title - The title of the dialog.oldValue - The initial value shown in the input field.nullAllowed - If true, allows the user to leave the field empty (returns null).Long entered by the user, or null if canceled/empty.public java.math.BigDecimal showBigDecimalInputDialog(java.lang.String s,
java.lang.String title,
java.math.BigDecimal oldValue,
boolean nullAllowed)
BasicMessageDialogIBigDecimal input.showBigDecimalInputDialog in interface BasicMessageDialogIs - The prompt message.title - The title of the dialog.oldValue - The initial value shown in the input field.nullAllowed - If true, allows the user to leave the field empty (returns null).BigDecimal entered by the user, or null if canceled/empty.public java.util.Date showDateInputDialog(java.lang.String s,
java.lang.String title,
java.util.Date oldValue,
boolean nullAllowed,
java.lang.String format)
BasicMessageDialogIDate input.showDateInputDialog in interface BasicMessageDialogIs - The prompt message.title - The title of the dialog.oldValue - The initial value shown in the input field.nullAllowed - If true, allows the user to leave the field empty (returns null).format - The date format pattern (e.g. "yyyy-MM-dd").Date entered by the user, or null if canceled/empty.public java.util.Date[] showTimespanInputDialog(java.lang.String s,
java.lang.String title,
java.util.Date oldValueStart,
java.util.Date oldValueEnd,
boolean startNullAllowed,
boolean endNullAllowed,
java.lang.String format)
BasicMessageDialogIshowTimespanInputDialog in interface BasicMessageDialogIs - The prompt message.title - The title of the dialog.oldValueStart - The initial value for the start date.oldValueEnd - The initial value for the end date.startNullAllowed - If true, allows the start date field to be empty.endNullAllowed - If true, allows the end date field to be empty.format - The date format pattern (e.g. "yyyy-MM-dd").Date objects: [startDate, endDate], or null if canceled.public void showMessageDialogNonModal(java.lang.String s,
java.lang.String type,
java.lang.String title)
BasicMessageDialogIshowMessageDialogNonModal in interface BasicMessageDialogIs - The message content.type - The type of message (e.g. TYPE_INFO, TYPE_ERROR).title - The title of the dialog.public void showMessageDialog(java.lang.String s,
java.lang.String type,
java.lang.String title)
BasicMessageDialogIshowMessageDialog in interface BasicMessageDialogIs - The message content.type - The type of message (e.g. TYPE_INFO, TYPE_ERROR).title - The title of the dialog.public java.lang.Object showListChoiceDialog(java.lang.String title,
java.lang.Object[] options,
java.lang.Object defaultChoice,
java.lang.String cboFormat,
boolean multiple)
FormattedChoiceDialogIshowListChoiceDialog in interface FormattedChoiceDialogItitle - The title of the dialog window.options - A non-empty array of options.defaultChoice - The object to select by default.cboFormat - Optional. An explicit formatting string used to render Business Objects (BOs) in the list.
If null, the default BO formatting logic will be used.multiple - If true, multiple options can be selected.null.public java.lang.Object[] showMultiListChoiceDialog(java.lang.String title,
java.lang.Object[] options,
java.lang.Object[] defaultChoices,
java.lang.String cboFormat)
FormattedChoiceDialogIshowMultiListChoiceDialog in interface FormattedChoiceDialogItitle - The title of the dialog window.options - A non-empty array of options.defaultChoices - An array of objects to select by default.cboFormat - Optional. An explicit formatting string used to render Business Objects (BOs) in the list.
If null, the default BO formatting logic will be used.null, if there were either no available options or
the user cancelled the selection.public java.lang.Object showListChoiceDialog(java.lang.String title,
java.lang.Object[] options,
int defaultIndex,
java.lang.String cboFormat,
boolean multiple)
FormattedChoiceDialogIshowListChoiceDialog in interface FormattedChoiceDialogItitle - The title of the dialog window.options - A non-empty array of options.defaultIndex - The index of the object to be selected by default.cboFormat - Optional. An explicit formatting string used to render Business Objects (BOs) in the list.
If null, the default BO formatting logic will be used.multiple - If true, multiple options can be selected.null.public java.lang.Object showMultipleChoiceDialog(java.lang.String s,
java.lang.String title,
java.lang.Object[] options,
int defaultIndex)
Implementation Note: Shows a dialog offering multiple options of answering (NOT selecting, if this is wanted use showListChoiceDialog() with param 'multiple' set to true)
showMultipleChoiceDialog in interface BasicMessageDialogIs - The message or question to display.title - The title of the dialog.options - An array of options to choose from.defaultIndex - The index of the option to check by default.null if canceled.public java.lang.String[] showUserLoginDialog(java.lang.String message,
java.lang.String title,
java.lang.String user)
BasicMessageDialogIshowUserLoginDialog in interface BasicMessageDialogImessage - The message or prompt to display.title - The title of the dialog.user - The initial username to pre-fill.[username, password], or null if canceled.Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.