gui.dialog
Class JAPDialog

java.lang.Object
  extended by gui.dialog.JAPDialog
All Implemented Interfaces:
IDialogOptions, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
Direct Known Subclasses:
ActivePaymentDetails, BISelectionDialog, CaptchaDialog, CertDetailsDialog, ClipFrame, ConfigAssistant, FlatrateDialog, JAPAbout, JAPAboutNew, JAPConf, JAPInternalHelpViewer, MapBox, MixDetailsDialog, MultiCertOverview, PassivePaymentDetails, TermsAndConditionsDialog, TermsAndConditionsInfoDialog, TransactionOverviewDialog

public class JAPDialog
extends java.lang.Object
implements javax.accessibility.Accessible, javax.swing.WindowConstants, javax.swing.RootPaneContainer, java.awt.MenuContainer, java.awt.image.ImageObserver, IDialogOptions

This is the generic implementation for an optionally modal, resizable a dialog. Use the getRootPane() and getContentPane() methods for customization.
The customizable dialogs show the same behaviour as the standard JDialog, except for the modality attribute: Modal JAPDialogs are only modal for their parent window and the parent of its parent and so on, but not for other Dialogs or Windows. This allows for example to access a non-modal help window at the time a modal dialog is displayed.
This class is also a replacement for JOptionPane: it allows for the same type of dialogs, and even has the same syntax (save that it only accepts String messages), but with additional features. JAPDialog option panes

These features take the need to put newlines or HTML breaks into the message text to format the dialog. This is done fully automatically. Also, dialog texts may get smaller, without ignoring important information. This information may be stored behind the optional dialog link. For displaying a simple link to a JAPHelp window, for example, there is a class named LinkedHelpContext. Its implementation should cover most needs.

Warning: This is a really complex class handling many bugs and differences in different JDKs. If you change something here, be sure you know what you are doing and test the class at least with the following JDKs:

Author:
Rolf Wendolsky
See Also:
JDialog, JOptionPane, DialogContentPane, JAPDialog.ILinkedInformation

Nested Class Summary
static class JAPDialog.AbstractLinkedURLAdapter
          May be used to show a URL.
private  class JAPDialog.BlockedWindowDeactivationAdapter
          Keeps the blocked window in a disabled state and transfers the focus from it to the dialog, even if some other part of the application set it to enabled or set the focus on it.
private  class JAPDialog.DialogWindowAdapter
          Catches all window events and informs the window listeners about them.
static interface JAPDialog.ILinkedInformation
          Classes of this type are used to append a clickable and/or selectable message at the end of a dialog message.
static class JAPDialog.LinkedCheckBox
          Shows a checkbox with a message on the dialog window.
static class JAPDialog.LinkedHelpContext
          This implementation of ILinkedInformation registers a help context in the dialog and displays a help button that opens this context.
static class JAPDialog.LinkedInformation
           
static class JAPDialog.LinkedInformationAdapter
          This class does nothing but implementing all ILinkedInformation methods.
private static class JAPDialog.LinkedInformationClickListener
          Activates a LinkedInformation, if it is given as a link.
static class JAPDialog.LinkedURLCheckBox
           
static class JAPDialog.Options
           
private static class JAPDialog.PreferredWidthBoxPanel
           
private static class JAPDialog.SimpleDialogButtonFocusWindowAdapter
           
 
Field Summary
static int FORMAT_DEFAULT_SCREEN
           
static int FORMAT_GOLDEN_RATIO_PHI
           
static int FORMAT_WIDE_SCREEN
           
private static double[] FORMATS
           
private  boolean m_bBlockParentWindow
           
private  boolean m_bCatchCancel
           
private  boolean m_bDisposed
           
private  boolean m_bForceApplicationModality
           
private  boolean m_bLocationSetManually
           
private  boolean m_bModal
           
private  boolean m_bOnTop
           
private  java.util.Vector m_componentListeners
           
private  int m_defaultCloseOperation
           
private  JAPDialog.DialogWindowAdapter m_dialogWindowAdapter
           
private  GUIUtils.WindowDocker m_docker
           
private  javax.swing.JDialog m_internalDialog
          Stores the instance of JDialog for internal use.
private static int m_optimizedFormat
           
private  java.awt.Component m_parentComponent
          This stores the parent component of this dialog.
private  java.awt.Window m_parentWindow
          This stores the parent window of this dialog.
private  java.util.Vector m_windowListeners
           
private static boolean ms_bConsoleOnly
           
private static java.util.Hashtable ms_registeredDialogs
           
static java.lang.String MSG_BTN_PROCEED
           
static java.lang.String MSG_BTN_RETRY
           
static java.lang.String MSG_ERROR_UNDISPLAYABLE
           
static java.lang.String MSG_ERROR_UNKNOWN
           
static java.lang.String MSG_TITLE_CONFIRMATION
           
static java.lang.String MSG_TITLE_ERROR
           
static java.lang.String MSG_TITLE_INFO
           
static java.lang.String MSG_TITLE_WARNING
           
private static int NUMBER_OF_HEURISTIC_ITERATIONS
           
private  java.lang.Object SYNC_DOCK
           
static java.lang.String XML_ATTR_OPTIMIZED_FORMAT
           
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Fields inherited from interface gui.dialog.IDialogOptions
MESSAGE_TYPE_ERROR, MESSAGE_TYPE_INFORMATION, MESSAGE_TYPE_PLAIN, MESSAGE_TYPE_QUESTION, MESSAGE_TYPE_WARNING, OPTION_TYPE_CANCEL, OPTION_TYPE_DEFAULT, OPTION_TYPE_EMPTY, OPTION_TYPE_OK_CANCEL, OPTION_TYPE_YES_NO, OPTION_TYPE_YES_NO_CANCEL, RETURN_VALUE_CANCEL, RETURN_VALUE_CLOSED, RETURN_VALUE_NO, RETURN_VALUE_OK, RETURN_VALUE_UNINITIALIZED, RETURN_VALUE_YES
 
Constructor Summary
  JAPDialog(java.awt.Component a_parentComponent, java.lang.String a_strTitle)
          Creates a new instance of JAPDialog.
  JAPDialog(java.awt.Component a_parentComponent, java.lang.String a_strTitle, boolean a_bModal)
          Creates a new instance of JAPDialog.
private JAPDialog(java.awt.Component a_parentComponent, java.lang.String a_strTitle, boolean a_bModal, boolean a_bForceApplicationModality)
          Creates a new instance of JAPDialog.
  JAPDialog(JAPDialog a_parentDialog, java.lang.String a_strTitle)
          Creates a new instance of JAPDialog.
  JAPDialog(JAPDialog a_parentDialog, java.lang.String a_strTitle, boolean a_bModal)
          Creates a new instance of JAPDialog.
 
Method Summary
 void addComponentListener(java.awt.event.ComponentListener a_listener)
          Adds a Componentistener to the dialog.
 void addWindowListener(java.awt.event.WindowListener a_listener)
          Adds a WindowListener to the dialog.
 void dispose()
          Disposes the dialog (set it to invisible and releases all resources).
 void doClosingOnContentPaneCancel(boolean a_bCatchCancel)
          Sets if the default click on the Cancel button of a dialog content pane is caught by the WindowClosing-Event of this dialog
(package private)  void doWindowClosing()
           
 javax.accessibility.AccessibleContext getAccessibleContext()
          Returns the AccessibleContext associated with this dialog
 java.awt.Container getContentPane()
          Returns the content pane that can be used to place elements on the dialog.
 int getDefaultCloseOperation()
          Returns the reaction of this dialog on a click on the close button in the dialog's title bar.
 java.awt.Font getFont()
           
 java.awt.Component getGlassPane()
          Returns the glass pane.
 java.awt.Insets getInsets()
           
private static java.awt.Window getInternalDialog(JAPDialog a_dialog)
          Returns the internal dialog of a JAPDialog or null if there is none.
 javax.swing.JMenuBar getJMenuBar()
          Returns the menubar set on this dialog.
 javax.swing.JLayeredPane getLayeredPane()
          Returns the JLayeredPane.
 java.awt.Point getLocation()
          Returns the dialog's location on the screen.
 java.lang.String getName()
           
static int getOptimizedFormat()
          Returns the format to which all automatically scaled dialogs are optimized.
static double getOptimizedFormatDelta(JAPDialog a_dialog)
          Calculates the difference from a JAPDialog's size and the golden ratio.
static double getOptimizedFormatDelta(java.awt.Window a_window)
          Calculates the difference from a window's size and the golden ratio.
static double getOptimizedFormatInternal(int a_format)
          Returns the format to which all automatically scaled dialogs are optimized.
 java.awt.Window getOwner()
          Returns the parent Window.
 java.awt.Component getParentComponent()
          Returns the parent Component.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of the dialog window.
 javax.swing.JRootPane getRootPane()
          Returns the root pane of the dialog.
 java.awt.Rectangle getScreenBounds()
          Returns the bounds of the screen where this dialog is shown.
 java.awt.Dimension getSize()
          Returns the size of the dialog window.
 java.lang.String getTitle()
           
 boolean imageUpdate(java.awt.Image a_image, int a_infoflags, int a_x, int a_y, int a_width, int a_height)
           
 boolean isClosingOnContentPaneCancel()
          Returns if the default click on the Cancel button of a dialog content pane is caught by the WindowClosing-Event of this dialog.
static boolean isConsoleOnly()
           
 boolean isDisposed()
           
 boolean isEnabled()
           
 boolean isModal()
          Returns if the dialog is modal.
 boolean isResizable()
          Returns if the dialog is resizable by the user.
 boolean isVisible()
          Returns if the dialog is visible on the screen.
 void moveToUpRightCorner()
           
 void pack()
          Sets the dialog to the optimal size.
 boolean postEvent(java.awt.Event a_event)
          Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
 void remove(java.awt.MenuComponent a_component)
           
 void removeComponentListener(java.awt.event.ComponentListener a_listener)
          Removes a specific ComponentListener from the dialog.
 void removeWindowListener(java.awt.event.WindowListener a_listener)
          Removes a specific WindowListener from the dialog.
 void requestFocus()
          Try to get the focus.
private static boolean requestFocusForFirstFocusableComponent(java.awt.Container a_container)
          Finds the first focusable Component in a Container and sets the focus on it.
 void resetAutomaticLocation(boolean a_bDoNotSetLocationAutomatically)
          After using a method that sets the location of the dialog, it will not automatically set its location any more.
 void restoreLocation(java.awt.Point a_point)
          Sets a window to the specified position and tries to put the window inside the screen by altering the position if needed.
 void restoreSize(java.awt.Dimension a_size)
          Sets a window to the specified size and tries to put the window inside the screen by altering the size if needed.
static java.lang.String retrieveErrorMessage(java.lang.String a_message, java.lang.Throwable a_throwable)
          Retrieves an error message from a Throwable and a message String that may be shown to the user.
 void setAlwaysOnTop(boolean a_bOnTop)
           
static void setConsoleOnly(boolean a_bConsoleOnly)
          Disables the output of static dialog methods.
 void setContentPane(java.awt.Container a_contentPane)
          Sets a new content pane for this dialog.
 void setDefaultCloseOperation(int a_windowAction)
          Defines the reaction of this dialog on a click on the close button in the dialog's title bar.
 void setDockable(boolean a_bDockable)
           
 void setEnabled(boolean b)
           
 void setGlassPane(java.awt.Component a_glassPane)
          Sets a new glass pane for this dialog.
 void setJMenuBar(javax.swing.JMenuBar a_menubar)
          Sets the menubar for this dialog.
 void setLayeredPane(javax.swing.JLayeredPane a_layeredPane)
          Sets a new JLayeredPane for this dialog.
 void setLocation(int x, int y)
          Sets the location of the dialog 'manually'.
 void setLocation(java.awt.Point a_location)
          Sets the location of the dialog 'manually'.
 void setLocationCenteredOn(java.awt.Component a_component)
          The dialog is centered on the given Component.
 void setLocationCenteredOnOwner()
          Centers the dialog on the parent window, that means either the parent, if it is a window, or the the first window that contains the parent.
 void setLocationCenteredOnParent()
          The dialog is centered on the parent Component.
 void setLocationCenteredOnScreen()
          Centers this dialog relative to the screen.
 void setLocationRelativeToOwner()
          The dialog is positioned right under the owner window.
 void setModal(boolean a_bModal)
          Defines the dialog as modal or not.
 void setName(java.lang.String a_name)
           
static void setOptimizedFormat(int a_optimizedFormat)
          Sets the format to which all automatically scaled dialogs are optimized.
 void setResizable(boolean a_bResizable)
          Allows to set the dialog resizable or fixed-sized.
 void setSize(java.awt.Dimension a_size)
          Sets the size of the dialog window.
 void setSize(int a_width, int a_height)
          Sets the size of the dialog window.
 void setTitle(java.lang.String a_title)
          Sets the title of this dialog.
 void setVisible(boolean a_bVisible)
          Shows or hides the dialog.
 void setVisible(boolean a_bVisible, boolean a_bCenterOnParentComponent)
          Shows or hides the dialog.
private  void setVisibleInternal(boolean a_bVisible)
          JAPDialog's main logic.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_optionType, int a_messageType)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_optionType, int a_messageType, javax.swing.Icon a_icon)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_optionType, int a_messageType, JAPDialog.ILinkedInformation a_linkedInformation)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.Options a_options, int a_messageType)
          Displays a confirm dialog.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.Options a_options, int a_messageType, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a confirm dialog.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType, javax.swing.Icon a_icon)
          Displays a message dialog.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a confirm dialog.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType, JAPDialog.ILinkedInformation a_linkedInformation)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, JAPDialog.Options a_options, int a_messageType, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a confirm dialog.
static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, JAPDialog.Options a_options, int a_messageType, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a confirm dialog.
static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_optionType, int a_messageType)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_optionType, int a_messageType, javax.swing.Icon a_icon)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_optionType, int a_messageType, JAPDialog.ILinkedInformation a_linkedInformation)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType, javax.swing.Icon a_icon)
          Displays a message dialog.
static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a message dialog.
static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType, JAPDialog.ILinkedInformation a_linkedInformation)
          Brings up a dialog where the number of choices is determined by the optionType parameter.
static void showErrorDialog(java.awt.Component a_parentComponent, int a_logType, java.lang.Throwable a_throwable)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_logType)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_logType, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_logType, java.lang.String a_title)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_logType, java.lang.Throwable a_throwable)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_logType)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_logType, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_logType, java.lang.Throwable a_throwable)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_logType, java.lang.Throwable a_throwable, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(JAPDialog a_parentDialog, int a_logType, java.lang.Throwable a_throwable)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_logType)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_logType, JAPDialog.ILinkedInformation a_linkedInformation)
           
static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_logType, java.lang.String a_title)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_logType, java.lang.Throwable a_throwable)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, int a_logType, java.lang.Throwable a_throwable)
          Displays a dialog showing an error message to the user and logs the error message to the currently used Log.
static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message)
          Displays an info message dialog.
static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, javax.swing.Icon a_icon)
          Displays an info message dialog.
static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays an info message dialog.
static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays an info message dialog.
static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title)
          Displays an info message dialog.
static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, javax.swing.Icon a_icon)
          Displays an info message dialog.
static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays an info message dialog.
static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays an info message dialog.
static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message)
          Displays an info message dialog.
static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, javax.swing.Icon a_icon)
          Displays an info message dialog.
static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays an info message dialog.
static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays an info message dialog.
static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title)
          Displays an info message dialog.
static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, javax.swing.Icon a_icon)
          Displays an info message dialog.
static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays an info message dialog.
static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays an info message dialog.
static void showWarningDialog(java.awt.Component a_parentComponent, java.lang.String a_message)
          Displays a warning message dialog.
static void showWarningDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a warning message dialog.
static void showWarningDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title)
          Displays a warning message dialog.
static void showWarningDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a warning message dialog.
static void showWarningDialog(JAPDialog a_parentDialog, java.lang.String a_message)
          Displays a warning message dialog.
static void showWarningDialog(JAPDialog a_parentDialog, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a warning message dialog.
static void showWarningDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title)
          Displays a warning message dialog.
static void showWarningDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a warning message dialog.
static boolean showYesNoDialog(java.awt.Component a_parentComponent, java.lang.String a_message)
          Displays a message dialog that asks the user for a confirmation.
static boolean showYesNoDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a message dialog that asks the user for a confirmation.
static boolean showYesNoDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title)
          Displays a message dialog that asks the user for a confirmation.
static boolean showYesNoDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a message dialog that asks the user for a confirmation.
static boolean showYesNoDialog(JAPDialog a_parentDialog, java.lang.String a_message)
          Displays a message dialog that asks the user for a confirmation.
static boolean showYesNoDialog(JAPDialog a_parentDialog, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a message dialog that asks the user for a confirmation.
static boolean showYesNoDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title)
          Displays a message dialog that asks the user for a confirmation.
static boolean showYesNoDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
          Displays a message dialog that asks the user for a confirmation.
 void toBack()
          If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window.
 void toFront()
          If this Window is visible, brings this Window to the front and may make it the focused Window.
 void validate()
          Validates the dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_ATTR_OPTIMIZED_FORMAT

public static final java.lang.String XML_ATTR_OPTIMIZED_FORMAT
See Also:
Constant Field Values

FORMAT_GOLDEN_RATIO_PHI

public static final int FORMAT_GOLDEN_RATIO_PHI
See Also:
Constant Field Values

FORMAT_DEFAULT_SCREEN

public static final int FORMAT_DEFAULT_SCREEN
See Also:
Constant Field Values

FORMAT_WIDE_SCREEN

public static final int FORMAT_WIDE_SCREEN
See Also:
Constant Field Values

FORMATS

private static final double[] FORMATS

MSG_ERROR_UNKNOWN

public static final java.lang.String MSG_ERROR_UNKNOWN

MSG_TITLE_INFO

public static final java.lang.String MSG_TITLE_INFO

MSG_TITLE_CONFIRMATION

public static final java.lang.String MSG_TITLE_CONFIRMATION

MSG_TITLE_WARNING

public static final java.lang.String MSG_TITLE_WARNING

MSG_TITLE_ERROR

public static final java.lang.String MSG_TITLE_ERROR

MSG_ERROR_UNDISPLAYABLE

public static final java.lang.String MSG_ERROR_UNDISPLAYABLE

MSG_BTN_PROCEED

public static final java.lang.String MSG_BTN_PROCEED

MSG_BTN_RETRY

public static final java.lang.String MSG_BTN_RETRY

NUMBER_OF_HEURISTIC_ITERATIONS

private static final int NUMBER_OF_HEURISTIC_ITERATIONS
See Also:
Constant Field Values

m_optimizedFormat

private static int m_optimizedFormat

ms_registeredDialogs

private static java.util.Hashtable ms_registeredDialogs

ms_bConsoleOnly

private static boolean ms_bConsoleOnly

m_bLocationSetManually

private boolean m_bLocationSetManually

m_bModal

private boolean m_bModal

m_bBlockParentWindow

private boolean m_bBlockParentWindow

m_defaultCloseOperation

private int m_defaultCloseOperation

m_windowListeners

private java.util.Vector m_windowListeners

m_componentListeners

private java.util.Vector m_componentListeners

m_dialogWindowAdapter

private JAPDialog.DialogWindowAdapter m_dialogWindowAdapter

m_bForceApplicationModality

private boolean m_bForceApplicationModality

m_bDisposed

private boolean m_bDisposed

m_bCatchCancel

private boolean m_bCatchCancel

m_docker

private GUIUtils.WindowDocker m_docker

SYNC_DOCK

private final java.lang.Object SYNC_DOCK

m_internalDialog

private javax.swing.JDialog m_internalDialog
Stores the instance of JDialog for internal use.


m_parentComponent

private java.awt.Component m_parentComponent
This stores the parent component of this dialog.


m_parentWindow

private java.awt.Window m_parentWindow
This stores the parent window of this dialog.


m_bOnTop

private boolean m_bOnTop
Constructor Detail

JAPDialog

public JAPDialog(java.awt.Component a_parentComponent,
                 java.lang.String a_strTitle,
                 boolean a_bModal)
Creates a new instance of JAPDialog. It is user-resizable.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_strTitle - The title String for this dialog.
a_bModal - if the dialog should be modal

JAPDialog

public JAPDialog(java.awt.Component a_parentComponent,
                 java.lang.String a_strTitle)
Creates a new instance of JAPDialog. It is user-resizable and modal.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_strTitle - The title String for this dialog.

JAPDialog

public JAPDialog(JAPDialog a_parentDialog,
                 java.lang.String a_strTitle,
                 boolean a_bModal)
Creates a new instance of JAPDialog. It is user-resizable.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_strTitle - The title String for this dialog.
a_bModal - if the dialog should be modal

JAPDialog

public JAPDialog(JAPDialog a_parentDialog,
                 java.lang.String a_strTitle)
Creates a new instance of JAPDialog. It is user-resizable.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_strTitle - The title String for this dialog.

JAPDialog

private JAPDialog(java.awt.Component a_parentComponent,
                  java.lang.String a_strTitle,
                  boolean a_bModal,
                  boolean a_bForceApplicationModality)
Creates a new instance of JAPDialog. It is user-resizable.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_strTitle - The title String for this dialog.
a_bModal - if the dialog should be modal
a_bForceApplicationModality - Force the JAPDialog to behave like a JDialog and block all application windows. This should not be available for the public, only for internal use!
Method Detail

setConsoleOnly

public static void setConsoleOnly(boolean a_bConsoleOnly)
Disables the output of static dialog methods. All those method will return RETURN_VALUE_UNINITIALIZED.

Parameters:
a_bConsoleOnly - if the output of static dialog methods should be disabled

isConsoleOnly

public static boolean isConsoleOnly()

setOptimizedFormat

public static void setOptimizedFormat(int a_optimizedFormat)
Sets the format to which all automatically scaled dialogs are optimized. It is one of the constants FORMAT_GOLDEN_RATIO_PHI, FORMAT_DEFAULT_SCREEN and FORMAT_WIDE_SCREEN.

Parameters:
a_optimizedFormat - the format to which all automatically scaled dialogs are optimized

getOptimizedFormat

public static int getOptimizedFormat()
Returns the format to which all automatically scaled dialogs are optimized. It is one of the constants GOLDEN_RATIO_PHI, DEFAULT_SCREEN_FORMAT and WIDE_SCREEN_FORMAT.

Returns:
the format to which all automatically scaled dialogs are optimized

getOptimizedFormatInternal

public static double getOptimizedFormatInternal(int a_format)
Returns the format to which all automatically scaled dialogs are optimized. It is one of the constants FORMAT_DEFAULT_SCREEN, FORMAT_GOLDEN_RATIO_PHI, and FORMAT_WIDE_SCREEN.

Parameters:
a_format - one of the constants FORMAT_DEFAULT_SCREEN, FORMAT_GOLDEN_RATIO_PHI, and FORMAT_WIDE_SCREEN
Returns:
the format to which all automatically scaled dialogs are optimized

getOptimizedFormatDelta

public static double getOptimizedFormatDelta(java.awt.Window a_window)
Calculates the difference from a window's size and the golden ratio.

Parameters:
a_window - a Window
Returns:
the difference from a window's size and the golden ratio

getOptimizedFormatDelta

public static double getOptimizedFormatDelta(JAPDialog a_dialog)
Calculates the difference from a JAPDialog's size and the golden ratio.

Parameters:
a_dialog - a JAPDialog
Returns:
the difference from a JAPDialog's size and the golden ratio

showMessageDialog

public static void showMessageDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.

showMessageDialog

public static void showMessageDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text

showMessageDialog

public static void showMessageDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.

showMessageDialog

public static void showMessageDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text

showMessageDialog

public static void showMessageDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     java.lang.String a_title)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.

showMessageDialog

public static void showMessageDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     java.lang.String a_title,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text

showMessageDialog

public static void showMessageDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     java.lang.String a_title)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.

showMessageDialog

public static void showMessageDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     java.lang.String a_title,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text

showMessageDialog

public static void showMessageDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     javax.swing.Icon a_icon)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog

showMessageDialog

public static void showMessageDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     javax.swing.Icon a_icon,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_linkedInformation - a clickable information message that is appended to the text

showMessageDialog

public static void showMessageDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     javax.swing.Icon a_icon)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog

showMessageDialog

public static void showMessageDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     javax.swing.Icon a_icon,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_linkedInformation - a clickable information message that is appended to the text

showMessageDialog

public static void showMessageDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     java.lang.String a_title,
                                     javax.swing.Icon a_icon)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog

showMessageDialog

public static void showMessageDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     java.lang.String a_title,
                                     javax.swing.Icon a_icon,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_linkedInformation - a clickable information message that is appended to the text

showMessageDialog

public static void showMessageDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     java.lang.String a_title,
                                     javax.swing.Icon a_icon)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog

showMessageDialog

public static void showMessageDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     java.lang.String a_title,
                                     javax.swing.Icon a_icon,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays an info message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_linkedInformation - a clickable information message that is appended to the text

showWarningDialog

public static void showWarningDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message)
Displays a warning message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.

showWarningDialog

public static void showWarningDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message)
Displays a warning message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.

showWarningDialog

public static void showWarningDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     java.lang.String a_title)
Displays a warning message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.

showWarningDialog

public static void showWarningDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     java.lang.String a_title)
Displays a warning message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.

showWarningDialog

public static void showWarningDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     java.lang.String a_title,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays a warning message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text

showWarningDialog

public static void showWarningDialog(JAPDialog a_parentDialog,
                                     java.lang.String a_message,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays a warning message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text

showWarningDialog

public static void showWarningDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays a warning message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text

showWarningDialog

public static void showWarningDialog(java.awt.Component a_parentComponent,
                                     java.lang.String a_message,
                                     java.lang.String a_title,
                                     JAPDialog.ILinkedInformation a_linkedInformation)
Displays a warning message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text

showConfirmDialog

public static int showConfirmDialog(JAPDialog a_parentDialog,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    int a_optionType,
                                    int a_messageType,
                                    javax.swing.Icon a_icon)
Displays a message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
Returns:
The value the user has selected. RETURN_VALUE_UNINITIALIZED implies the user has not yet made a choice.
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    int a_optionType,
                                    int a_messageType,
                                    javax.swing.Icon a_icon)
Displays a message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
Returns:
The value the user has selected. RETURN_VALUE_UNINITIALIZED implies the user has not yet made a choice.
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(JAPDialog a_parentDialog,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    int a_optionType,
                                    int a_messageType,
                                    javax.swing.Icon a_icon,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Displays a message dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
The value the user has selected. RETURN_VALUE_UNINITIALIZED implies the user has not yet made a choice.
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    int a_optionType,
                                    int a_messageType,
                                    javax.swing.Icon a_icon,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Displays a confirm dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
The value the user has selected. RETURN_VALUE_UNINITIALIZED implies the user has not yet made a choice or that the current thread has been interrupted
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    JAPDialog.Options a_options,
                                    int a_messageType)
Displays a confirm dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_options - use the option types from JOptionPane
Returns:
The value the user has selected. RETURN_VALUE_UNINITIALIZED implies the user has not yet made a choice or that the current thread has been interrupted
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    JAPDialog.Options a_options,
                                    int a_messageType,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Displays a confirm dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_options - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
The value the user has selected. RETURN_VALUE_UNINITIALIZED implies the user has not yet made a choice or that the current thread has been interrupted
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    JAPDialog.Options a_options,
                                    int a_messageType,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Displays a confirm dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_options - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
The value the user has selected. RETURN_VALUE_UNINITIALIZED implies the user has not yet made a choice or that the current thread has been interrupted
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    JAPDialog.Options a_options,
                                    int a_messageType,
                                    javax.swing.Icon a_icon,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Displays a confirm dialog. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_icon - an icon that will be displayed on the dialog
a_messageType - use the message types from JOptionPane
a_options - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
The value the user has selected. RETURN_VALUE_UNINITIALIZED implies the user has not yet made a choice or that the current thread has been interrupted
See Also:
JOptionPane

showYesNoDialog

public static boolean showYesNoDialog(JAPDialog a_parentDialog,
                                      java.lang.String a_message)
Displays a message dialog that asks the user for a confirmation. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
Returns:
true if the answer was 'yes'; fale otherwise

showYesNoDialog

public static boolean showYesNoDialog(JAPDialog a_parentDialog,
                                      java.lang.String a_message,
                                      JAPDialog.ILinkedInformation a_linkedInformation)
Displays a message dialog that asks the user for a confirmation. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text
Returns:
true if the answer was 'yes'; fale otherwise

showYesNoDialog

public static boolean showYesNoDialog(java.awt.Component a_parentComponent,
                                      java.lang.String a_message)
Displays a message dialog that asks the user for a confirmation. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
Returns:
true if the answer was 'yes'; false otherwise

showYesNoDialog

public static boolean showYesNoDialog(java.awt.Component a_parentComponent,
                                      java.lang.String a_message,
                                      JAPDialog.ILinkedInformation a_linkedInformation)
Displays a message dialog that asks the user for a confirmation. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text
Returns:
true if the answer was 'yes'; fale otherwise

showYesNoDialog

public static boolean showYesNoDialog(JAPDialog a_parentDialog,
                                      java.lang.String a_message,
                                      java.lang.String a_title)
Displays a message dialog that asks the user for a confirmation. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
Returns:
true if the answer was 'yes'; fale otherwise

showYesNoDialog

public static boolean showYesNoDialog(JAPDialog a_parentDialog,
                                      java.lang.String a_message,
                                      java.lang.String a_title,
                                      JAPDialog.ILinkedInformation a_linkedInformation)
Displays a message dialog that asks the user for a confirmation. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text
Returns:
true if the answer was 'yes'; fale otherwise

showYesNoDialog

public static boolean showYesNoDialog(java.awt.Component a_parentComponent,
                                      java.lang.String a_message,
                                      java.lang.String a_title)
Displays a message dialog that asks the user for a confirmation. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
Returns:
true if the answer was 'yes'; fale otherwise

showYesNoDialog

public static boolean showYesNoDialog(java.awt.Component a_parentComponent,
                                      java.lang.String a_message,
                                      java.lang.String a_title,
                                      JAPDialog.ILinkedInformation a_linkedInformation)
Displays a message dialog that asks the user for a confirmation. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_linkedInformation - a clickable information message that is appended to the text
Returns:
true if the answer was 'yes'; fale otherwise

showConfirmDialog

public static int showConfirmDialog(JAPDialog a_parentDialog,
                                    java.lang.String a_message,
                                    int a_optionType,
                                    int a_messageType,
                                    javax.swing.Icon a_icon)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
a_icon - an icon that will be displayed on the dialog
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    int a_optionType,
                                    int a_messageType,
                                    javax.swing.Icon a_icon)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
a_icon - an icon that will be displayed on the dialog
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(JAPDialog a_parentDialog,
                                    java.lang.String a_message,
                                    int a_optionType,
                                    int a_messageType)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    int a_optionType,
                                    int a_messageType)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(JAPDialog a_parentDialog,
                                    java.lang.String a_message,
                                    int a_optionType,
                                    int a_messageType,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    int a_optionType,
                                    int a_messageType,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(JAPDialog a_parentDialog,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    int a_optionType,
                                    int a_messageType)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    int a_optionType,
                                    int a_messageType)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(JAPDialog a_parentDialog,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    int a_optionType,
                                    int a_messageType,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showConfirmDialog

public static int showConfirmDialog(java.awt.Component a_parentComponent,
                                    java.lang.String a_message,
                                    java.lang.String a_title,
                                    int a_optionType,
                                    int a_messageType,
                                    JAPDialog.ILinkedInformation a_linkedInformation)
Brings up a dialog where the number of choices is determined by the optionType parameter. The messageType parameter is primarily used to supply a default icon from the look and feel. Words are wrapped automatically if a message line is too long.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - The title of the message dialog
a_message - The message to be displayed. It is interpreted as HTML. You do not need to put in formatting tags, as the text will be auto-formatted in a way that the dialog's size is very close to the golden ratio.
a_messageType - use the message types from JOptionPane
a_optionType - use the option types from JOptionPane
a_linkedInformation - a clickable information message that is appended to the text
Returns:
an int indicating the option selected by the user
See Also:
JOptionPane

showErrorDialog

public static void showErrorDialog(JAPDialog a_parentDialog,
                                   java.lang.String a_message,
                                   int a_logType)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null or the parent dialog is not within a frame, the dialog's parent frame is the default frame.
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   java.lang.String a_message,
                                   java.lang.String a_title,
                                   int a_logType,
                                   JAPDialog.ILinkedInformation a_linkedInformation)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - a message that is shown to the user (may be null)
a_title - The title of the message dialog (may be null)
a_logType - the log type for this error
a_linkedInformation - a clickable information message that is appended to the text
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   java.lang.String a_message,
                                   int a_logType,
                                   JAPDialog.ILinkedInformation a_linkedInformation)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
a_linkedInformation - a clickable information message that is appended to the text
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   java.lang.String a_message,
                                   int a_logType)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   java.lang.String a_message,
                                   int a_logType,
                                   java.lang.String a_title)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - a title for the error message (may be null)
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(JAPDialog a_parentDialog,
                                   java.lang.String a_message,
                                   int a_logType,
                                   java.lang.String a_title)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null or the parent dialog is not within a frame, the dialog's parent frame is the default frame.
a_title - a title for the error message (may be null)
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(JAPDialog a_parentDialog,
                                   java.lang.String a_message,
                                   int a_logType,
                                   JAPDialog.ILinkedInformation a_linkedInformation)

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   java.lang.String a_message,
                                   java.lang.String a_title,
                                   int a_logType)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - a title for the error message (may be null)
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(JAPDialog a_parentDialog,
                                   int a_logType,
                                   java.lang.Throwable a_throwable)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null or the parent dialog is not within a frame, the dialog's parent frame is the default frame.
a_throwable - a Throwable that has been caught (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   int a_logType,
                                   java.lang.Throwable a_throwable)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_throwable - a Throwable that has been caught (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(JAPDialog a_parentDialog,
                                   java.lang.String a_message,
                                   int a_logType,
                                   java.lang.Throwable a_throwable)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null or the parent dialog is not within a frame, the dialog's parent frame is the default frame.
a_throwable - a Throwable that has been caught (may be null)
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   java.lang.String a_message,
                                   int a_logType,
                                   java.lang.Throwable a_throwable)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_throwable - a Throwable that has been caught (may be null)
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(JAPDialog a_parentDialog,
                                   java.lang.String a_message,
                                   java.lang.String a_title,
                                   int a_logType,
                                   java.lang.Throwable a_throwable)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentDialog - The parent dialog for this dialog. If it is null or the parent dialog is not within a frame, the dialog's parent frame is the default frame.
a_throwable - a Throwable that has been caught (may be null)
a_title - a title for the error message (may be null)
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   java.lang.String a_message,
                                   java.lang.String a_title,
                                   int a_logType,
                                   java.lang.Throwable a_throwable)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - a title for the error message (may be null)
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
a_throwable - a Throwable that has been caught (may be null)
See Also:
LogHolder, LogType, Log

showErrorDialog

public static void showErrorDialog(java.awt.Component a_parentComponent,
                                   java.lang.String a_message,
                                   java.lang.String a_title,
                                   int a_logType,
                                   java.lang.Throwable a_throwable,
                                   JAPDialog.ILinkedInformation a_linkedInformation)
Displays a dialog showing an error message to the user and logs the error message to the currently used Log.

Parameters:
a_parentComponent - The parent component for this dialog. If it is null or the parent component is not within a frame, the dialog's parent frame is the default frame.
a_title - a title for the error message (may be null)
a_message - a message that is shown to the user (may be null)
a_logType - the log type for this error
a_throwable - a Throwable that has been caught (may be null)
a_linkedInformation - a clickable information message that is appended to the text
See Also:
LogHolder, LogType, Log

retrieveErrorMessage

public static java.lang.String retrieveErrorMessage(java.lang.String a_message,
                                                    java.lang.Throwable a_throwable)
Retrieves an error message from a Throwable and a message String that may be shown to the user. By default, this is the given message. If no message is given, it is tried to get the error message from the Throwable. A log message for the error is written automatically.

Parameters:
a_throwable - a Throwable (may be null)
a_message - an error message (may be null)
Returns:
the retrieved error message or null if no error message could be found; this would indicate a serious application error (an empty String as error message will result in a return value of null, too)

getGlassPane

public java.awt.Component getGlassPane()
Returns the glass pane.

Specified by:
getGlassPane in interface javax.swing.RootPaneContainer
Returns:
the glass pane

getLayeredPane

public javax.swing.JLayeredPane getLayeredPane()
Returns the JLayeredPane.

Specified by:
getLayeredPane in interface javax.swing.RootPaneContainer
Returns:
the JLayeredPane

getRootPane

public javax.swing.JRootPane getRootPane()
Returns the root pane of the dialog.

Specified by:
getRootPane in interface javax.swing.RootPaneContainer
Returns:
the root pane of the dialog

getContentPane

public final java.awt.Container getContentPane()
Returns the content pane that can be used to place elements on the dialog.

Specified by:
getContentPane in interface javax.swing.RootPaneContainer
Returns:
the dialog's content pane

setContentPane

public void setContentPane(java.awt.Container a_contentPane)
Sets a new content pane for this dialog.

Specified by:
setContentPane in interface javax.swing.RootPaneContainer
Parameters:
a_contentPane - a new content pane for this dialog

setGlassPane

public void setGlassPane(java.awt.Component a_glassPane)
Sets a new glass pane for this dialog.

Specified by:
setGlassPane in interface javax.swing.RootPaneContainer
Parameters:
a_glassPane - a new glass pane for this dialog

setLayeredPane

public void setLayeredPane(javax.swing.JLayeredPane a_layeredPane)
Sets a new JLayeredPane for this dialog.

Specified by:
setLayeredPane in interface javax.swing.RootPaneContainer
Parameters:
a_layeredPane - a new JLayeredPane for this dialog

getParentComponent

public final java.awt.Component getParentComponent()
Returns the parent Component.

Returns:
the parent Component

getOwner

public final java.awt.Window getOwner()
Returns the parent Window. The parent Window may be but does not need to be the same than the parent Component.

Returns:
the parent Window

doClosingOnContentPaneCancel

public void doClosingOnContentPaneCancel(boolean a_bCatchCancel)
Sets if the default click on the Cancel button of a dialog content pane is caught by the WindowClosing-Event of this dialog

Parameters:
a_bCatchCancel - if the default click on the Cancel button of a dialog content pane is caught by the WindowClosing-Event of this dialog

isClosingOnContentPaneCancel

public boolean isClosingOnContentPaneCancel()
Returns if the default click on the Cancel button of a dialog content pane is caught by the WindowClosing-Event of this dialog.

Returns:
if the default click on the Cancel button of a dialog content pane is caught by the WindowClosing-Event of this dialog

setName

public void setName(java.lang.String a_name)

getName

public java.lang.String getName()

setEnabled

public void setEnabled(boolean b)

setAlwaysOnTop

public void setAlwaysOnTop(boolean a_bOnTop)

isVisible

public boolean isVisible()
Returns if the dialog is visible on the screen.

Returns:
true if the dialog is visible on the screen; false otherwise

setVisible

public void setVisible(boolean a_bVisible)
Shows or hides the dialog. If shown, the dialog is centered over the parent component. Subclasses may override this method to change this centering behaviour.

Parameters:
a_bVisible - 'true' shows the dialog; 'false' hides it

setVisible

public final void setVisible(boolean a_bVisible,
                             boolean a_bCenterOnParentComponent)
Shows or hides the dialog.

Parameters:
a_bVisible - 'true' shows the dialog; 'false' hides it
a_bCenterOnParentComponent - if true, the dialog is centered on the parent component; otherwise, it is positioned right under the parent window (owner window)

setTitle

public void setTitle(java.lang.String a_title)
Sets the title of this dialog.

Parameters:
a_title - the title of this dialog

getTitle

public java.lang.String getTitle()

setJMenuBar

public void setJMenuBar(javax.swing.JMenuBar a_menubar)
Sets the menubar for this dialog.

Parameters:
a_menubar - the menubar being placed in the dialog

getJMenuBar

public javax.swing.JMenuBar getJMenuBar()
Returns the menubar set on this dialog.

Returns:
the menubar set on this dialog

toFront

public void toFront()
If this Window is visible, brings this Window to the front and may make it the focused Window.


toBack

public void toBack()
If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window.


setModal

public final void setModal(boolean a_bModal)
Defines the dialog as modal or not.

Parameters:
a_bModal - true if the dialog should be modal; false otherwise

isModal

public boolean isModal()
Returns if the dialog is modal.

Returns:
if the dialog is modal

isEnabled

public boolean isEnabled()

isResizable

public boolean isResizable()
Returns if the dialog is resizable by the user.

Returns:
if the dialog is resizable by the user

isDisposed

public boolean isDisposed()

dispose

public final void dispose()
Disposes the dialog (set it to invisible and releases all resources).


validate

public void validate()
Validates the dialog. Should be called after changing the content pane when the dialog is visible.


requestFocus

public void requestFocus()
Try to get the focus.


getSize

public final java.awt.Dimension getSize()
Returns the size of the dialog window.

Returns:
the size of the dialog window

getPreferredSize

public final java.awt.Dimension getPreferredSize()
Returns the preferred size of the dialog window.

Returns:
the preferred size of the dialog window

setSize

public final void setSize(int a_width,
                          int a_height)
Sets the size of the dialog window.

Parameters:
a_width - the new window width
a_height - the new window height

setLocation

public final void setLocation(java.awt.Point a_location)
Sets the location of the dialog 'manually'. After that, no automatic alignment is done by this dialog.

Parameters:
a_location - a Point on the screen

setLocationCenteredOn

public final void setLocationCenteredOn(java.awt.Component a_component)
The dialog is centered on the given Component. Sets the location of the dialog 'manually'. After that, no automatic alignment is done by this dialog.

Parameters:
a_component - a Component

setLocationCenteredOnParent

public final void setLocationCenteredOnParent()
The dialog is centered on the parent Component. Sets the location of the dialog 'manually'. After that, no automatic alignment is done by this dialog.


setLocationCenteredOnOwner

public final void setLocationCenteredOnOwner()
Centers the dialog on the parent window, that means either the parent, if it is a window, or the the first window that contains the parent. Sets the location of the dialog 'manually'. After that, no automatic alignment is done by this dialog.


getScreenBounds

public final java.awt.Rectangle getScreenBounds()
Returns the bounds of the screen where this dialog is shown.

Returns:
the bounds of the screen where this dialog is shown

setDockable

public void setDockable(boolean a_bDockable)

resetAutomaticLocation

public void resetAutomaticLocation(boolean a_bDoNotSetLocationAutomatically)
After using a method that sets the location of the dialog, it will not automatically set its location any more. This may be reset by calling this method.

Parameters:
a_bDoNotSetLocationAutomatically - if the dialog should not set its location automatically

setLocationCenteredOnScreen

public final void setLocationCenteredOnScreen()
Centers this dialog relative to the screen. Sets the location of the dialog 'manually'. After that, no automatic alignment is done by this dialog.


setLocationRelativeToOwner

public final void setLocationRelativeToOwner()
The dialog is positioned right under the owner window. Sets the location of the dialog 'manually'. After that, no automatic alignment is done by this dialog.


restoreLocation

public void restoreLocation(java.awt.Point a_point)
Sets a window to the specified position and tries to put the window inside the screen by altering the position if needed.

Parameters:
a_point - a Point; may be null

restoreSize

public void restoreSize(java.awt.Dimension a_size)
Sets a window to the specified size and tries to put the window inside the screen by altering the size if needed. The location of the window should be set before.

Parameters:
a_size - a Dimension; may be null

moveToUpRightCorner

public void moveToUpRightCorner()

setLocation

public final void setLocation(int x,
                              int y)
Sets the location of the dialog 'manually'. After that, no automatic alignment is done by this dialog.

Parameters:
x - a x cooredinate on the screen
y - a y cooredinate on the screen

setSize

public final void setSize(java.awt.Dimension a_size)
Sets the size of the dialog window.

Parameters:
a_size - the new size of the dialog window

setResizable

public void setResizable(boolean a_bResizable)
Allows to set the dialog resizable or fixed-sized.

Parameters:
a_bResizable - true if the dialog should become resizable; false otherwise

getLocation

public final java.awt.Point getLocation()
Returns the dialog's location on the screen.

Returns:
the dialog's location on the screen

imageUpdate

public boolean imageUpdate(java.awt.Image a_image,
                           int a_infoflags,
                           int a_x,
                           int a_y,
                           int a_width,
                           int a_height)
Specified by:
imageUpdate in interface java.awt.image.ImageObserver

getAccessibleContext

public final javax.accessibility.AccessibleContext getAccessibleContext()
Returns the AccessibleContext associated with this dialog

Specified by:
getAccessibleContext in interface javax.accessibility.Accessible
Returns:
the AccessibleContext associated with this dialog

getFont

public java.awt.Font getFont()
Specified by:
getFont in interface java.awt.MenuContainer

remove

public void remove(java.awt.MenuComponent a_component)
Specified by:
remove in interface java.awt.MenuContainer

postEvent

public boolean postEvent(java.awt.Event a_event)
Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).

This method is not needed and only implemented to fulfill interface requirements.

Specified by:
postEvent in interface java.awt.MenuContainer
Parameters:
a_event - an Event
Returns:
if the event has been dispatched successfully

setDefaultCloseOperation

public final void setDefaultCloseOperation(int a_windowAction)
Defines the reaction of this dialog on a click on the close button in the dialog's title bar.

Parameters:
a_windowAction - insert an element of javax.swing.WindowConstants
See Also:
WindowConstants

getDefaultCloseOperation

public final int getDefaultCloseOperation()
Returns the reaction of this dialog on a click on the close button in the dialog's title bar.

Returns:
a javax.swing.WindowConstant
See Also:
WindowConstants

addWindowListener

public final void addWindowListener(java.awt.event.WindowListener a_listener)
Adds a WindowListener to the dialog.

Parameters:
a_listener - a WindowListener
See Also:
WindowListener

addComponentListener

public final void addComponentListener(java.awt.event.ComponentListener a_listener)
Adds a Componentistener to the dialog.

Parameters:
a_listener - a ComponentListener
See Also:
ComponentListener

removeComponentListener

public final void removeComponentListener(java.awt.event.ComponentListener a_listener)
Removes a specific ComponentListener from the dialog.

Parameters:
a_listener - a ComponentListener
See Also:
ComponentListener

removeWindowListener

public final void removeWindowListener(java.awt.event.WindowListener a_listener)
Removes a specific WindowListener from the dialog.

Parameters:
a_listener - a WindowListener
See Also:
WindowListener

pack

public final void pack()
Sets the dialog to the optimal size.


getInsets

public java.awt.Insets getInsets()

doWindowClosing

void doWindowClosing()

getInternalDialog

private static java.awt.Window getInternalDialog(JAPDialog a_dialog)
Returns the internal dialog of a JAPDialog or null if there is none.

Parameters:
a_dialog - a JAPDialog
Returns:
the internal dialog of a JAPDialog or null if there is none

requestFocusForFirstFocusableComponent

private static boolean requestFocusForFirstFocusableComponent(java.awt.Container a_container)
Finds the first focusable Component in a Container and sets the focus on it.

Parameters:
a_container - a Container
Returns:
if a Component has been focused

setVisibleInternal

private void setVisibleInternal(boolean a_bVisible)
JAPDialog's main logic.

Parameters:
a_bVisible - true if the dialog is shown; false if it is hidden