Class FWMessageDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
net.simplace.ui.usermessage.FWMessageDialog
- All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible, RootPaneContainer, WindowConstants
This class serves as replacement for the JOptionPane: modal info, warning, exception, question,
confirm, input, chooser, file chooser, form and console dialogs with localised captions. The static
show... methods block until the dialog is closed.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intInfinite waiting time for the autodispose-messagepane.static final intRepresents a negative confirm.static final IconIcon for ConfirmDialogs.static final intRepresents a possitive confirm.static final intRepresents a console dialog.static final IconIcon for ConsoleDialogs.static final StringTitle for console dialogs.static final IconIcon for ThrowableDialogs.static final intRepresents File chooser to select existing directory option.static final intRepresents File chooser to select existing file option.static final intRepresents File Chooser with selection option.static final intRepresents File Chooser to select or give File Name option.static final IconIcon for InfoDialogs.static final intMessage type info (seeshowOptionDialog(Window, String, String[], int)).static final IconIcon for ProgressDialogs.static final StringTitle for progress dialogs.static final intRepresents a break to a question.static final IconIcon for QuestionDialogs.static final intMessage type question (seeshowOptionDialog(Window, String, String[], int)).static final intRepresents a negative answer to a question.static final StringTitle for questions.static final intRepresents a possitive answer to a question.static final intRepresents a email send option.static final IconIcon for WarningDialogs.static final StringTitle for warnings.Fields inherited from class JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class Dialog
DEFAULT_MODALITY_TYPEFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent aActionEvent) Is called after one of the buttons is pressed: shows/hides the throwable details, saves a problem report, updates the console, opens the file chooser or closes the dialog and records the clicked button.voidpack()Overrides java.awt.Window to recognize minimum-size.voidrun()Waits the autodispose time and closes the dialog, if it isn`t closed manually in the given time.static voidshowAutodisposeInfoDialog(Window aParent, String aInfo, int aAutodisposeWaitingTime) Shows a simple infopanel that closes automatically.static ObjectshowChooserDialog(Window aParent, String aTitle, String aInfo, Collection<Object> aValueCollection) Shows a dialog with a combo box.static ObjectshowChooserDialog(Window aParent, String aTitle, String aInfo, Collection<Object> aValueCollection, Object aDefaultValue) Shows a dialog with a combo box.static intshowConfirmDialog(Window aParent, String aMessage) Shows a dialog which asks the user to either confirm or break a process;static intshowConfirmDialog(Window aParent, String aMessage, String aMessageID) Shows a dialog which asks the user to either confirm or break a process;static voidshowConsoleDialog(Window aParent, File aConsoleFile, int aAutodisposeWaitingTime, String aMessageID) Shows the content of a log file in a console dialog with an update button.static voidshowConsoleDialog(Window aParent, File aConsoleFile, String aMessageID) Deprecated.not usedstatic intshowCustomDialog(Window aParent, String aTitle, Icon aIcon, String aMessage, int aDefaultButtonIndex) Shows a dialog with yes/no buttons.static intshowCustomDialog(Window aParent, String aTitle, Icon aIcon, String aMessage, String[] aButtonCaptions) Shows a dialog with the custom settings.static Object[]showDoubleChooserDialog(Window aParent, String aTitle, String aInfo, Collection aSourceValueCollection, Collection aTargetValueCollection) Shows a dialog with two combo boxes.static intshowEmailExceptionDialog(Window aParent, String aMessage, Throwable aThrowable) Shows a dialog, which warns the user, that a Throwable has happened and also the Email functionality button.static voidshowExceptionDialog(Window aParent, String aLocaleBundle, String aLocaleKey, Throwable aThrowable) Shows a dialog, which warns the user, that a Throwable has happened.static voidshowExceptionDialog(Window aParent, String aMessage, Throwable aThrowable) Shows a dialog, which warns the user, that a Throwable has happened.static StringshowFileChooserDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue, Integer aFileChooserOption) Shows an input panel with a button opening a file chooser.static net.simplace.core.FWObservableshowFormDialog(Window aParent, String aTitle, String aInfo, org.jdom2.Element aFormElement, net.simplace.core.FWObservable aObservable, boolean aShowCancelButton) Shows a form dialog.static voidshowInfoDialog(Window aParent, String aInfo) Shows a simple infopanel.static voidshowInfoDialog(Window aParent, String aInfo, int aAutodisposeWaitingTime, String aMessageID) Shows a simple infopanel.static voidshowInfoDialog(Window aParent, String aInfo, String aMessageID) Shows a simple infopanel.static StringshowInputDialog(Window aParent, String aTitle, String aInfo) Shows a simple input panel.static StringshowInputDialog(Window aParent, String aTitle, String aInfo, boolean aPasswordField) Shows a simple input panel.static StringshowInputDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue) Shows a simple input panel.static StringshowInputDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue, boolean aPasswordField) Shows a simple input panel.static StringshowInputDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue, boolean aPasswordField, boolean aShowCancelButton) Shows a simple input panel.static StringshowInputDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue, boolean aPasswordField, boolean aShowCancelButton, Icon aIcon) Shows a simple input panel.static StringshowInputDialog(Window aParent, String aTitle, String aInfo, Icon aIcon) Shows a simple input panel.static StringshowInputDialogWithoutCancelButton(Window aParent, String aTitle, String aInfo) Shows a simple input panel.static voidshowMessage(Window aWindow, FWMessage aMessage) Displays the givenMessageobject.static intshowOptionDialog(Window aParent, String aMessage, String[] aOptions, int aMessageType) Shows a dialog, which asks the user to press either yes, no and perhaps cancel.static intshowOptionPaneDialog(Window aParent, String aMessage, String aTitle, int aIconType, int aButtonType) Replacement forJOptionPane.showOptionDialogwith JOptionPane constants.static intshowQuestionDialog(Window aParent, String aMessage) Shows a dialog, whichs ask the user to press either yes, no.static intshowQuestionDialog(Window aParent, String aQuestion, boolean aShowCancel) Shows a dialog, which asks the user to press either yes, no and perhaps cancel.static intshowQuestionDialog(Window aParent, String aQuestion, boolean aShowCancel, int aDefaultButtonIndex) Shows a dialog, whichs ask the user to press either yes, no and perhaps cancel.static intshowQuestionDialog(Window aParent, String aLocaleBundle, String aLocaleKey) Shows a dialog, whichs ask the user to press either yes, no.static intshowQuestionDialog(Window aParent, String aLocaleBundle, String aLocaleKey, boolean aShowCancel) Shows a dialog, which asks the user to press either yes, no and perhaps cancel.static voidshowWarningDialog(Window aParent, String aWarning) Shows a dialog which warns user of something.static voidshowWarningDialog(Window aParent, String aLocaleBundle, String aLocaleKey) Shows a dialog which warns user of something.static voidshowWarningDialog(Window aParent, String aWarning, String aMessageID, Throwable aThrowable) Shows a dialog which warns user of a minor Throwable.static voidshowWarningDialog(Window aParent, String aWarning, Throwable aThrowable) Shows a dialog which warns user of a minor Throwable.static intshowWarningQuestion(Window aParent, String aQuestion) Shows a dialog which asks the user with warning him/her of the importance.static intshowWarningQuestion(Window aParent, String aQuestion, int aDefaultButtonIndex) Shows a dialog which asks the user with warning him/her of the importance.static StringupdateConsole(File aConsoleFile) Reads the console (log) file and resolves its resource tags.Methods inherited from class JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackMethods inherited from class Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontMethods inherited from class Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
INFO_ICON
Icon for InfoDialogs. -
CONSOLE_ICON
Icon for ConsoleDialogs. -
QUESTION_ICON
Icon for QuestionDialogs. -
CONFIRM_ICON
Icon for ConfirmDialogs. -
WARNING_ICON
Icon for WarningDialogs. -
EXCEPTION_ICON
Icon for ThrowableDialogs. -
PROGRESS_ICON
Icon for ProgressDialogs. -
QUESTION_TITLE
Title for questions. -
WARNING_TITLE
Title for warnings. -
PROGRESS_TITLE
Title for progress dialogs. -
CONSOLE_TITLE
Title for console dialogs. -
AUTODISPOSE_INFINITE_WAITING_TIME
public static final int AUTODISPOSE_INFINITE_WAITING_TIMEInfinite waiting time for the autodispose-messagepane.- See Also:
-
QUESTION_YES
public static final int QUESTION_YESRepresents a possitive answer to a question.- See Also:
-
QUESTION_NO
public static final int QUESTION_NORepresents a negative answer to a question.- See Also:
-
QUESTION_CANCEL
public static final int QUESTION_CANCELRepresents a break to a question.- See Also:
-
CONFIRM_OK
public static final int CONFIRM_OKRepresents a possitive confirm.- See Also:
-
CONFIRM_CANCEL
public static final int CONFIRM_CANCELRepresents a negative confirm.- See Also:
-
QUESTION_MESSAGE
public static final int QUESTION_MESSAGEMessage type question (seeshowOptionDialog(Window, String, String[], int)).- See Also:
-
INFO_MESSAGE
public static final int INFO_MESSAGEMessage type info (seeshowOptionDialog(Window, String, String[], int)).- See Also:
-
SEND_EMAIL
public static final int SEND_EMAILRepresents a email send option.- See Also:
-
CONSOLE
public static final int CONSOLERepresents a console dialog.- See Also:
-
FILE_CHOOSER_MULTISELECT
public static final int FILE_CHOOSER_MULTISELECTRepresents File Chooser with selection option.- See Also:
-
FILE_CHOOSER_SELECT
public static final int FILE_CHOOSER_SELECTRepresents File Chooser to select or give File Name option.- See Also:
-
FILE_CHOOSER_DIR
public static final int FILE_CHOOSER_DIRRepresents File chooser to select existing directory option.- See Also:
-
FILE_CHOOSER_EXISTING
public static final int FILE_CHOOSER_EXISTINGRepresents File chooser to select existing file option.- See Also:
-
-
Method Details
-
pack
-
actionPerformed
Is called after one of the buttons is pressed: shows/hides the throwable details, saves a problem report, updates the console, opens the file chooser or closes the dialog and records the clicked button.- Specified by:
actionPerformedin interfaceActionListener
-
showOptionPaneDialog
public static int showOptionPaneDialog(Window aParent, String aMessage, String aTitle, int aIconType, int aButtonType) Replacement forJOptionPane.showOptionDialogwith JOptionPane constants.- Parameters:
aParent- parent windowaMessage- shown messageaTitle- dialog titleaIconType- JOptionPane message type (ERROR_MESSAGE,INFORMATION_MESSAGE, ...)aButtonType- JOptionPane option type (YES_NO_OPTION,OK_CANCEL_OPTION, ...)- Returns:
- int representing the choice user has done (JOptionPane
YES_OPTION,NO_OPTION,OK_OPTION,CANCEL_OPTION) or -1 if the dialog was closed otherwise
-
showCustomDialog
public static int showCustomDialog(Window aParent, String aTitle, Icon aIcon, String aMessage, String[] aButtonCaptions) Shows a dialog with the custom settings.- Parameters:
aParent- parent windowaTitle- dialog titleaIcon- iconaMessage- shown messageaButtonCaptions- captions of the buttons- Returns:
- index of the clicked Button, -1 if the dialog was closed without button
-
showCustomDialog
public static int showCustomDialog(Window aParent, String aTitle, Icon aIcon, String aMessage, int aDefaultButtonIndex) Shows a dialog with yes/no buttons.- Parameters:
aParent- parent windowaTitle- dialog titleaIcon- iconaMessage- shown messageaDefaultButtonIndex- index of the default button (0 = yes, 1 = no)- Returns:
- index of the clicked Button, -1 if the dialog was closed without button
-
showInfoDialog
-
showInfoDialog
-
showConsoleDialog
@Deprecated public static void showConsoleDialog(Window aParent, File aConsoleFile, String aMessageID) Deprecated.not usedShows the content of a log file in a console dialog.- Parameters:
aParent- parent windowaConsoleFile- the log fileaMessageID- message id (currently not used)
-
showAutodisposeInfoDialog
public static void showAutodisposeInfoDialog(Window aParent, String aInfo, int aAutodisposeWaitingTime) Shows a simple infopanel that closes automatically.- Parameters:
aParent- parent windowaInfo- shown info textaAutodisposeWaitingTime- waiting time until the dialog is closed (values below 1000 are seconds, otherwise milliseconds)
-
showInfoDialog
public static void showInfoDialog(Window aParent, String aInfo, int aAutodisposeWaitingTime, String aMessageID) Shows a simple infopanel.- Parameters:
aParent- parent windowaInfo- shown info textaAutodisposeWaitingTime- waiting time until the dialog is closed (values below 1000 are seconds, otherwise milliseconds),AUTODISPOSE_INFINITE_WAITING_TIMEfor no autodisposeaMessageID- message id (currently not used)
-
showConsoleDialog
public static void showConsoleDialog(Window aParent, File aConsoleFile, int aAutodisposeWaitingTime, String aMessageID) Shows the content of a log file in a console dialog with an update button.- Parameters:
aParent- parent windowaConsoleFile- the log fileaAutodisposeWaitingTime- waiting time until the dialog is closed (values below 1000 are seconds, otherwise milliseconds),AUTODISPOSE_INFINITE_WAITING_TIMEfor no autodisposeaMessageID- message id (currently not used)
-
showInputDialogWithoutCancelButton
-
showInputDialog
-
showInputDialog
-
showInputDialog
public static String showInputDialog(Window aParent, String aTitle, String aInfo, boolean aPasswordField) Shows a simple input panel.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaPasswordField-truefor a password field- Returns:
- the entered text, or
nullif cancelled
-
showInputDialog
public static String showInputDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue) Shows a simple input panel.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaDefaultValue- default value or default selection- Returns:
- the entered text, or
nullif cancelled
-
showInputDialog
public static String showInputDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue, boolean aPasswordField) Shows a simple input panel.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaDefaultValue- default value or default selectionaPasswordField-truefor a password field- Returns:
- the entered text, or
nullif cancelled
-
showInputDialog
public static String showInputDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue, boolean aPasswordField, boolean aShowCancelButton) Shows a simple input panel.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaDefaultValue- default value or default selectionaPasswordField-truefor a password fieldaShowCancelButton- whether the cancel button is shown- Returns:
- the entered text, or
nullif cancelled
-
showInputDialog
public static String showInputDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue, boolean aPasswordField, boolean aShowCancelButton, Icon aIcon) Shows a simple input panel.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaDefaultValue- default value or default selectionaPasswordField-truefor a password fieldaShowCancelButton- whether the cancel button is shownaIcon- icon- Returns:
- the entered text, or
nullif cancelled
-
showFileChooserDialog
public static String showFileChooserDialog(Window aParent, String aTitle, String aInfo, String aDefaultValue, Integer aFileChooserOption) Shows an input panel with a button opening a file chooser.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaDefaultValue- default file (forFILE_CHOOSER_MULTISELECTa comma separated list of files); its extension selects the file filteraFileChooserOption- one of theFILE_CHOOSER_*constants- Returns:
- the chosen file, for
FILE_CHOOSER_MULTISELECTa comma separated list of all files in the combo box, ornullif cancelled
-
showChooserDialog
public static Object showChooserDialog(Window aParent, String aTitle, String aInfo, Collection<Object> aValueCollection) Shows a dialog with a combo box.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaValueCollection- values of the combo box- Returns:
- the selected value, or
nullif cancelled
-
showChooserDialog
public static Object showChooserDialog(Window aParent, String aTitle, String aInfo, Collection<Object> aValueCollection, Object aDefaultValue) Shows a dialog with a combo box.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaValueCollection- values of the combo boxaDefaultValue- initially selected value- Returns:
- the selected value, or
nullif cancelled
-
showDoubleChooserDialog
public static Object[] showDoubleChooserDialog(Window aParent, String aTitle, String aInfo, Collection aSourceValueCollection, Collection aTargetValueCollection) Shows a dialog with two combo boxes.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaSourceValueCollection- values of the first combo boxaTargetValueCollection- values of the second combo box- Returns:
- the 2 selected values or null if cancel was pressed
-
showQuestionDialog
Shows a dialog, which asks the user to press either yes, no and perhaps cancel.- Parameters:
aParent- parent windowaQuestion- shown questionaShowCancel- whether a cancel button is shown- Returns:
- int representing the choice user has done.
-
showQuestionDialog
public static int showQuestionDialog(Window aParent, String aQuestion, boolean aShowCancel, int aDefaultButtonIndex) Shows a dialog, whichs ask the user to press either yes, no and perhaps cancel.- Parameters:
aParent- parent windowaQuestion- shown questionaShowCancel- whether a cancel button is shownaDefaultButtonIndex- index of the default button, -1 for the first button- Returns:
- int representing the choice user has done.
-
showOptionDialog
public static int showOptionDialog(Window aParent, String aMessage, String[] aOptions, int aMessageType) Shows a dialog, which asks the user to press either yes, no and perhaps cancel.- Parameters:
aParent- parent windowaMessage- shown messageaOptions- captions of the buttons (up to three are mapped to yes/no/cancel)aMessageType-QUESTION_MESSAGEorINFO_MESSAGE- Returns:
- int representing the choice user has done.
-
showFormDialog
public static net.simplace.core.FWObservable showFormDialog(Window aParent, String aTitle, String aInfo, org.jdom2.Element aFormElement, net.simplace.core.FWObservable aObservable, boolean aShowCancelButton) Shows a form dialog. If required fields are empty on OK, the error is logged and the dialog is shown again.- Parameters:
aParent- parent windowaTitle- dialog titleaInfo- shown info textaFormElement- the form definitionaObservable- observable holding the form valuesaShowCancelButton- whether the cancel button is shown- Returns:
- the observable of the form panel with the entered values, or
nullif cancelled
-
showQuestionDialog
public static int showQuestionDialog(Window aParent, String aLocaleBundle, String aLocaleKey, boolean aShowCancel) Shows a dialog, which asks the user to press either yes, no and perhaps cancel.- Parameters:
aParent- parent windowaLocaleBundle- name of the locale bundleaLocaleKey- key of the message textaShowCancel- whether a cancel button is shown- Returns:
- int representing the choice user has done.
-
showQuestionDialog
-
showQuestionDialog
Shows a dialog, whichs ask the user to press either yes, no.- Parameters:
aParent- parent windowaLocaleBundle- name of the locale bundleaLocaleKey- key of the message text- Returns:
- int representing the choice user has done.
-
showConfirmDialog
-
showConfirmDialog
Shows a dialog which asks the user to either confirm or break a process;- Parameters:
aParent- parent windowaMessage- shown messageaMessageID- message id (currently not used)- Returns:
- int representing the choice user has done.
-
showWarningQuestion
-
showWarningQuestion
Shows a dialog which asks the user with warning him/her of the importance.- Parameters:
aParent- The parent windowaQuestion- Question to poseaDefaultButtonIndex- 1=NO , 0=YES, -1=DefaultSettings- Returns:
- int representing the choice user has done.
-
showWarningDialog
-
showWarningDialog
public static void showWarningDialog(Window aParent, String aWarning, String aMessageID, Throwable aThrowable) Shows a dialog which warns user of a minor Throwable.- Parameters:
aParent- parent windowaWarning- shown warningaMessageID- message id (currently not used)aThrowable- throwable shown in the details, ornull
-
showWarningDialog
-
showWarningDialog
-
showExceptionDialog
-
showEmailExceptionDialog
Shows a dialog, which warns the user, that a Throwable has happened and also the Email functionality button. This should be used if a functionality is implemented for email sending.- Parameters:
aParent- parent windowaMessage- shown messageaThrowable- throwable shown in the details, ornull- Returns:
- int representing the choice user has done.
-
showExceptionDialog
public static void showExceptionDialog(Window aParent, String aLocaleBundle, String aLocaleKey, Throwable aThrowable) Shows a dialog, which warns the user, that a Throwable has happened.- Parameters:
aParent- parent windowaLocaleBundle- name of the locale bundleaLocaleKey- key of the message textaThrowable- throwable shown in the details, ornull
-
run
-
showMessage
-
updateConsole
-