|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gui.dialog.JAPDialog
public class JAPDialog
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
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:
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 |
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 |
---|
public static final java.lang.String XML_ATTR_OPTIMIZED_FORMAT
public static final int FORMAT_GOLDEN_RATIO_PHI
public static final int FORMAT_DEFAULT_SCREEN
public static final int FORMAT_WIDE_SCREEN
private static final double[] FORMATS
public static final java.lang.String MSG_ERROR_UNKNOWN
public static final java.lang.String MSG_TITLE_INFO
public static final java.lang.String MSG_TITLE_CONFIRMATION
public static final java.lang.String MSG_TITLE_WARNING
public static final java.lang.String MSG_TITLE_ERROR
public static final java.lang.String MSG_ERROR_UNDISPLAYABLE
public static final java.lang.String MSG_BTN_PROCEED
public static final java.lang.String MSG_BTN_RETRY
private static final int NUMBER_OF_HEURISTIC_ITERATIONS
private static int m_optimizedFormat
private static java.util.Hashtable ms_registeredDialogs
private static boolean ms_bConsoleOnly
private boolean m_bLocationSetManually
private boolean m_bModal
private boolean m_bBlockParentWindow
private int m_defaultCloseOperation
private java.util.Vector m_windowListeners
private java.util.Vector m_componentListeners
private JAPDialog.DialogWindowAdapter m_dialogWindowAdapter
private boolean m_bForceApplicationModality
private boolean m_bDisposed
private boolean m_bCatchCancel
private GUIUtils.WindowDocker m_docker
private final java.lang.Object SYNC_DOCK
private javax.swing.JDialog m_internalDialog
private java.awt.Component m_parentComponent
private java.awt.Window m_parentWindow
private boolean m_bOnTop
Constructor Detail |
---|
public JAPDialog(java.awt.Component a_parentComponent, java.lang.String a_strTitle, boolean a_bModal)
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 modalpublic JAPDialog(java.awt.Component a_parentComponent, java.lang.String a_strTitle)
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.public JAPDialog(JAPDialog a_parentDialog, java.lang.String a_strTitle, boolean a_bModal)
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 modalpublic JAPDialog(JAPDialog a_parentDialog, java.lang.String a_strTitle)
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.private JAPDialog(java.awt.Component a_parentComponent, java.lang.String a_strTitle, boolean a_bModal, boolean a_bForceApplicationModality)
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 modala_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 |
---|
public static void setConsoleOnly(boolean a_bConsoleOnly)
a_bConsoleOnly
- if the output of static dialog methods should be disabledpublic static boolean isConsoleOnly()
public static void setOptimizedFormat(int a_optimizedFormat)
a_optimizedFormat
- the format to which all automatically scaled dialogs are optimizedpublic static int getOptimizedFormat()
public static double getOptimizedFormatInternal(int a_format)
a_format
- one of the constants
FORMAT_DEFAULT_SCREEN, FORMAT_GOLDEN_RATIO_PHI, and FORMAT_WIDE_SCREEN
public static double getOptimizedFormatDelta(java.awt.Window a_window)
a_window
- a Window
public static double getOptimizedFormatDelta(JAPDialog a_dialog)
a_dialog
- a JAPDialog
public static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message)
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.public static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
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 textpublic static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message)
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.public static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
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 textpublic static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title)
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 dialoga_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.public static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
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 dialoga_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 textpublic static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title)
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 dialoga_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.public static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
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 dialoga_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 textpublic static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, javax.swing.Icon a_icon)
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 dialogpublic static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
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 dialoga_linkedInformation
- a clickable information message that is appended to the textpublic static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, javax.swing.Icon a_icon)
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 dialogpublic static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, javax.swing.Icon a_icon, JAPDialog.ILinkedInformation a_linkedInformation)
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 dialoga_linkedInformation
- a clickable information message that is appended to the textpublic static void showMessageDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, javax.swing.Icon a_icon)
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 dialoga_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 dialogpublic 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)
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 dialoga_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 dialoga_linkedInformation
- a clickable information message that is appended to the textpublic static void showMessageDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, javax.swing.Icon a_icon)
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 dialoga_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 dialogpublic 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)
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 dialoga_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 dialoga_linkedInformation
- a clickable information message that is appended to the textpublic static void showWarningDialog(JAPDialog a_parentDialog, java.lang.String a_message)
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.public static void showWarningDialog(java.awt.Component a_parentComponent, java.lang.String a_message)
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.public static void showWarningDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title)
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 dialoga_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.public static void showWarningDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title)
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 dialoga_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.public static void showWarningDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
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 dialoga_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 textpublic static void showWarningDialog(JAPDialog a_parentDialog, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
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 textpublic static void showWarningDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
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 textpublic static void showWarningDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
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 dialoga_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 textpublic 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)
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 dialoga_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 dialoga_messageType
- use the message types from JOptionPanea_optionType
- use the option types from JOptionPane
JOptionPane
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)
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 dialoga_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 dialoga_messageType
- use the message types from JOptionPanea_optionType
- use the option types from JOptionPane
JOptionPane
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)
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 dialoga_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 dialoga_messageType
- use the message types from JOptionPanea_optionType
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
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)
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 dialoga_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 dialoga_messageType
- use the message types from JOptionPanea_optionType
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
public static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.Options a_options, int a_messageType)
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 JOptionPanea_options
- use the option types from JOptionPane
JOptionPane
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)
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 dialoga_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 JOptionPanea_options
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
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)
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 dialoga_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 JOptionPanea_options
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
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)
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 dialoga_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 dialoga_messageType
- use the message types from JOptionPanea_options
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
public static boolean showYesNoDialog(JAPDialog a_parentDialog, java.lang.String a_message)
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.
public static boolean showYesNoDialog(JAPDialog a_parentDialog, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
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
public static boolean showYesNoDialog(java.awt.Component a_parentComponent, java.lang.String a_message)
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.
public static boolean showYesNoDialog(java.awt.Component a_parentComponent, java.lang.String a_message, JAPDialog.ILinkedInformation a_linkedInformation)
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
public static boolean showYesNoDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title)
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 dialoga_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.
public static boolean showYesNoDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
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 dialoga_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
public static boolean showYesNoDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title)
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 dialoga_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.
public static boolean showYesNoDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, JAPDialog.ILinkedInformation a_linkedInformation)
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 dialoga_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
public static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_optionType, int a_messageType, javax.swing.Icon a_icon)
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 JOptionPanea_optionType
- use the option types from JOptionPanea_icon
- an icon that will be displayed on the dialog
JOptionPane
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)
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 JOptionPanea_optionType
- use the option types from JOptionPanea_icon
- an icon that will be displayed on the dialog
JOptionPane
public static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_optionType, int a_messageType)
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 JOptionPanea_optionType
- use the option types from JOptionPane
JOptionPane
public static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_optionType, int a_messageType)
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 JOptionPanea_optionType
- use the option types from JOptionPane
JOptionPane
public static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_optionType, int a_messageType, JAPDialog.ILinkedInformation a_linkedInformation)
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 JOptionPanea_optionType
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
public static int showConfirmDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_optionType, int a_messageType, JAPDialog.ILinkedInformation a_linkedInformation)
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 JOptionPanea_optionType
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
public static int showConfirmDialog(JAPDialog a_parentDialog, java.lang.String a_message, java.lang.String a_title, int a_optionType, int a_messageType)
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 dialoga_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 JOptionPanea_optionType
- use the option types from JOptionPane
JOptionPane
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)
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 dialoga_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 JOptionPanea_optionType
- use the option types from JOptionPane
JOptionPane
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)
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 dialoga_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 JOptionPanea_optionType
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
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)
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 dialoga_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 JOptionPanea_optionType
- use the option types from JOptionPanea_linkedInformation
- a clickable information message that is appended to the text
JOptionPane
public static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_logType)
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 errorLogHolder
,
LogType
,
Log
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)
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 errora_linkedInformation
- a clickable information message that is appended to the textLogHolder
,
LogType
,
Log
public static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_logType, JAPDialog.ILinkedInformation a_linkedInformation)
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 errora_linkedInformation
- a clickable information message that is appended to the textLogHolder
,
LogType
,
Log
public static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_logType)
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 errorLogHolder
,
LogType
,
Log
public static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_logType, java.lang.String a_title)
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 errorLogHolder
,
LogType
,
Log
public static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_logType, java.lang.String a_title)
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 errorLogHolder
,
LogType
,
Log
public static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_logType, JAPDialog.ILinkedInformation a_linkedInformation)
public static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, java.lang.String a_title, int a_logType)
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 errorLogHolder
,
LogType
,
Log
public static void showErrorDialog(JAPDialog a_parentDialog, int a_logType, java.lang.Throwable a_throwable)
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 errorLogHolder
,
LogType
,
Log
public static void showErrorDialog(java.awt.Component a_parentComponent, int a_logType, java.lang.Throwable a_throwable)
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 errorLogHolder
,
LogType
,
Log
public static void showErrorDialog(JAPDialog a_parentDialog, java.lang.String a_message, int a_logType, java.lang.Throwable a_throwable)
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 errorLogHolder
,
LogType
,
Log
public static void showErrorDialog(java.awt.Component a_parentComponent, java.lang.String a_message, int a_logType, java.lang.Throwable a_throwable)
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 errorLogHolder
,
LogType
,
Log
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)
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 errorLogHolder
,
LogType
,
Log
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)
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 errora_throwable
- a Throwable that has been caught (may be null)LogHolder
,
LogType
,
Log
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)
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 errora_throwable
- a Throwable that has been caught (may be null)a_linkedInformation
- a clickable information message that is appended to the textLogHolder
,
LogType
,
Log
public static java.lang.String retrieveErrorMessage(java.lang.String a_message, java.lang.Throwable a_throwable)
a_throwable
- a Throwable (may be null)a_message
- an error message (may be null)
public java.awt.Component getGlassPane()
getGlassPane
in interface javax.swing.RootPaneContainer
public javax.swing.JLayeredPane getLayeredPane()
getLayeredPane
in interface javax.swing.RootPaneContainer
public javax.swing.JRootPane getRootPane()
getRootPane
in interface javax.swing.RootPaneContainer
public final java.awt.Container getContentPane()
getContentPane
in interface javax.swing.RootPaneContainer
public void setContentPane(java.awt.Container a_contentPane)
setContentPane
in interface javax.swing.RootPaneContainer
a_contentPane
- a new content pane for this dialogpublic void setGlassPane(java.awt.Component a_glassPane)
setGlassPane
in interface javax.swing.RootPaneContainer
a_glassPane
- a new glass pane for this dialogpublic void setLayeredPane(javax.swing.JLayeredPane a_layeredPane)
setLayeredPane
in interface javax.swing.RootPaneContainer
a_layeredPane
- a new JLayeredPane for this dialogpublic final java.awt.Component getParentComponent()
public final java.awt.Window getOwner()
public void doClosingOnContentPaneCancel(boolean a_bCatchCancel)
a_bCatchCancel
- if the default click on the Cancel button of a dialog content
pane is caught by the WindowClosing-Event of this dialogpublic boolean isClosingOnContentPaneCancel()
public void setName(java.lang.String a_name)
public java.lang.String getName()
public void setEnabled(boolean b)
public void setAlwaysOnTop(boolean a_bOnTop)
public boolean isVisible()
public void setVisible(boolean a_bVisible)
a_bVisible
- 'true' shows the dialog; 'false' hides itpublic final void setVisible(boolean a_bVisible, boolean a_bCenterOnParentComponent)
a_bVisible
- 'true' shows the dialog; 'false' hides ita_bCenterOnParentComponent
- if true, the dialog is centered on the parent component;
otherwise, it is positioned right under the parent window (owner window)public void setTitle(java.lang.String a_title)
a_title
- the title of this dialogpublic java.lang.String getTitle()
public void setJMenuBar(javax.swing.JMenuBar a_menubar)
a_menubar
- the menubar being placed in the dialogpublic javax.swing.JMenuBar getJMenuBar()
public void toFront()
public void toBack()
public final void setModal(boolean a_bModal)
a_bModal
- true if the dialog should be modal; false otherwisepublic boolean isModal()
public boolean isEnabled()
public boolean isResizable()
public boolean isDisposed()
public final void dispose()
public void validate()
public void requestFocus()
public final java.awt.Dimension getSize()
public final java.awt.Dimension getPreferredSize()
public final void setSize(int a_width, int a_height)
a_width
- the new window widtha_height
- the new window heightpublic final void setLocation(java.awt.Point a_location)
a_location
- a Point on the screenpublic final void setLocationCenteredOn(java.awt.Component a_component)
a_component
- a Componentpublic final void setLocationCenteredOnParent()
public final void setLocationCenteredOnOwner()
public final java.awt.Rectangle getScreenBounds()
public void setDockable(boolean a_bDockable)
public void resetAutomaticLocation(boolean a_bDoNotSetLocationAutomatically)
a_bDoNotSetLocationAutomatically
- if the dialog should not set its location automaticallypublic final void setLocationCenteredOnScreen()
public final void setLocationRelativeToOwner()
public void restoreLocation(java.awt.Point a_point)
a_point
- a Point; may be nullpublic void restoreSize(java.awt.Dimension a_size)
a_size
- a Dimension; may be nullpublic void moveToUpRightCorner()
public final void setLocation(int x, int y)
x
- a x cooredinate on the screeny
- a y cooredinate on the screenpublic final void setSize(java.awt.Dimension a_size)
a_size
- the new size of the dialog windowpublic void setResizable(boolean a_bResizable)
a_bResizable
- true if the dialog should become resizable; false otherwisepublic final java.awt.Point getLocation()
public boolean imageUpdate(java.awt.Image a_image, int a_infoflags, int a_x, int a_y, int a_width, int a_height)
imageUpdate
in interface java.awt.image.ImageObserver
public final javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext
in interface javax.accessibility.Accessible
public java.awt.Font getFont()
getFont
in interface java.awt.MenuContainer
public void remove(java.awt.MenuComponent a_component)
remove
in interface java.awt.MenuContainer
public boolean postEvent(java.awt.Event a_event)
postEvent
in interface java.awt.MenuContainer
a_event
- an Event
public final void setDefaultCloseOperation(int a_windowAction)
a_windowAction
- insert an element of javax.swing.WindowConstantsWindowConstants
public final int getDefaultCloseOperation()
WindowConstants
public final void addWindowListener(java.awt.event.WindowListener a_listener)
a_listener
- a WindowListenerWindowListener
public final void addComponentListener(java.awt.event.ComponentListener a_listener)
a_listener
- a ComponentListenerComponentListener
public final void removeComponentListener(java.awt.event.ComponentListener a_listener)
a_listener
- a ComponentListenerComponentListener
public final void removeWindowListener(java.awt.event.WindowListener a_listener)
a_listener
- a WindowListenerWindowListener
public final void pack()
public java.awt.Insets getInsets()
void doWindowClosing()
private static java.awt.Window getInternalDialog(JAPDialog a_dialog)
a_dialog
- a JAPDialog
private static boolean requestFocusForFirstFocusableComponent(java.awt.Container a_container)
a_container
- a Container
private void setVisibleInternal(boolean a_bVisible)
a_bVisible
- true if the dialog is shown; false if it is hidden
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |