public class IstiDialogPopup extends java.lang.Object implements javax.swing.WindowConstants, IstiDialogInterface
Modifier and Type | Class and Description |
---|---|
static class |
IstiDialogPopup.CloseListener
Class CloseListener defines a call-back method that is to be invoked
when a dialog instance is closed, hidden or disposed.
|
Modifier and Type | Field and Description |
---|---|
static int |
CANCEL_OPTION
Return value if CANCEL is chosen.
|
static int |
CLOSED_OPTION
Return value for closed without selection.
|
static int |
DEFAULT_OPTION
Value for 'optionType' parameter.
|
static int |
DISPOSE_ON_CLOSE
Value for 'setDefaultCloseOperation()' method.
|
protected boolean |
disposeDialogOnButtonFlag |
protected javax.swing.JDialog |
dlgObj |
static int |
DO_NOTHING_ON_CLOSE
Value for 'setDefaultCloseOperation()' method.
|
protected boolean |
enforceDispatchThreadFlag |
static int |
ERROR_MESSAGE
Specifies error message type.
|
static int |
HIDE_ON_CLOSE
Value for 'setDefaultCloseOperation()' method.
|
protected boolean |
hideDialogOnButtonFlag |
static int |
INFORMATION_MESSAGE
Specifies information message type.
|
protected java.awt.Component |
initialFocusCompObj |
protected boolean |
initialFocusFlag |
protected boolean |
maxHeightLimitFlag |
protected java.lang.String |
messageString |
static int |
NO_AUTOBUTTONS_OPTION
Value for 'optionType' parameter; specifies no auto-created buttons.
|
static int |
NO_OPTION
Return value if NO is chosen.
|
static int |
OK_CANCEL_OPTION
Value for 'optionType' parameter.
|
static int |
OK_OPTION
Return value if OK is chosen.
|
protected java.lang.Object[] |
optionsArr |
protected boolean |
packNeededFlag |
protected javax.swing.JOptionPane |
paneObj |
protected boolean |
parentHeightLimitFlag |
static int |
PLAIN_MESSAGE
Specifies plain message with no icon.
|
static int |
QUESTION_MESSAGE
Specifies question message type.
|
protected java.awt.Point |
repackCheckLocationObj |
protected boolean |
repackNeededFlag |
protected static boolean |
staticEnforceDispatchThreadFlag |
protected static boolean |
staticMaxHeightLimitFlag |
protected static boolean |
staticParentHeightLimitFlag |
protected boolean |
waitingForShowFlag |
static int |
WARNING_MESSAGE
Specifies warning message type.
|
static int |
YES_NO_CANCEL_OPTION
Value for 'optionType' parameter.
|
static int |
YES_NO_OPTION
Value for 'optionType' parameter.
|
static int |
YES_OPTION
Return value if YES is chosen.
|
Constructor and Description |
---|
IstiDialogPopup(java.awt.Component parentComp,
javax.swing.JDialog givenDialogObj,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
java.lang.Object[] optionsArr,
int initValIdx,
boolean modalFlag,
boolean createButtonFlag,
int optionType)
Creates a popup dialog window.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
boolean modalFlag,
int optionType)
Creates a plain-message popup dialog window with default buttons
based on the value of 'optionType'.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType)
Creates a plain-message modal popup dialog window with default buttons
based on the value of 'optionType'.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
boolean modalFlag,
int optionType)
Creates a popup dialog window with default buttons based on the
value of 'optionType'.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
int optionType)
Creates a modal popup dialog window with default buttons based on the
value of 'optionType'.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
java.lang.Object optionObj)
Creates a popup dialog window containing a single button.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
java.lang.Object[] optionsArr,
int initValIdx)
Creates a popup dialog window.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
java.lang.Object[] optionsArr,
int initValIdx,
boolean modalFlag)
Creates a popup dialog window.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
java.lang.Object[] optionsArr,
int initValIdx,
boolean modalFlag,
boolean createButtonFlag)
Creates a popup dialog window.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
java.lang.Object[] optionsArr,
int initValIdx,
boolean modalFlag,
boolean createButtonFlag,
int optionType)
Creates a popup dialog window.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int msgType,
java.lang.Object optionObj,
boolean modalFlag)
Creates a popup dialog window containing a single button.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
java.lang.Object optionObj)
Creates a plain-message popup dialog window containing a single button.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
java.lang.Object[] optionsArr,
int initValIdx)
Creates a plain-message popup dialog window.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
java.lang.Object[] optionsArr,
int initValIdx,
boolean modalFlag)
Creates a plain-message popup dialog window.
|
IstiDialogPopup(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
java.lang.Object optionObj,
boolean modalFlag)
Creates a plain-message popup dialog window containing a single
button.
|
Modifier and Type | Method and Description |
---|---|
void |
addCloseListener(IstiDialogPopup.CloseListener listenerObj)
Adds the given "close" listener to the dialog.
|
void |
addComponentListener(java.awt.event.ComponentListener listenerObj)
Adds the given component listener to the dialog.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener for a specific property.
|
void |
addWindowListener(java.awt.event.WindowListener listenerObj)
Adds the given window listener to the dialog.
|
protected boolean |
allowDialogClose()
This method is invoked before the dialog is closed by pressing the OK button.
|
protected boolean |
allowDialogClose(java.lang.Object value)
This method is invoked before the dialog is closed by pressing a button.
|
void |
close()
Closes the popup dialog window.
|
void |
close(java.lang.Object obj)
Closes the popup dialog window.
|
void |
closeWithWait(int maxWaitTimeMs)
Waits (if necessary) for the popup dialog window to be visible and
then closes it.
|
void |
closeWithWait(java.lang.Object obj,
int maxWaitTimeMs)
Waits (if necessary) for the popup dialog window to be visible and
then closes it.
|
javax.swing.JDialog |
createDialog(java.awt.Component parentComponent,
java.lang.String title)
Creates and returns a new
JDialog wrapping
the JOptionPane for this IstiDialogPanel
centered on the parentComponent
in the parentComponent 's frame. |
javax.swing.JDialog |
createDialog(javax.swing.JDialog givenDialogObj,
java.awt.Component parentComponent,
java.lang.String title)
Creates and returns a new
JDialog wrapping
the JOptionPane for this IstiDialogPanel
centered on the parentComponent
in the parentComponent 's frame. |
void |
dispose()
Disposes the popup dialog window.
|
protected void |
doDelayedRepack(java.awt.Component parentComp)
Performs a repack after a slight delay (using a worker thread).
|
protected void |
doPack()
Causes this dialog to be sized to fit the preferred size and layouts
of its subcomponents.
|
protected void |
doSetDialogVisible(boolean flgVal)
Sets the visibility of the dialog window.
|
protected void |
doSetVisible(boolean flgVal)
Sets the visibility of the dialog window.
|
java.awt.Color |
getBackground()
Returns the background color of the dialog.
|
javax.swing.JDialog |
getDialogObj()
Returns the 'JDialog' object used by this object.
|
boolean |
getDisposeDialogOnButtonFlag()
Returns a flag indicating whether or not the dialog will be
automatically closed after any button is pressed.
|
boolean |
getEnforceDispatchThreadFlag()
Returns the enforce-changes-via-event-dispatch-thread flag.
|
java.awt.Color |
getForeground()
Returns the foreground color of the dialog.
|
boolean |
getHideDialogOnButtonFlag()
Returns a flag indicating whether or not the dialog will be
automatically hidden after any button is pressed.
|
java.lang.Object |
getInputValue()
Returns the value the user has input.
|
boolean |
getMaxHeightLimit()
Returns the limit-height-to-the-maximum flag.
|
java.lang.Object |
getMessageObj()
Returns the message object displayed by this dialog.
|
java.lang.String |
getMessageStr()
Returns the message string displayed by this dialog.
|
javax.swing.JOptionPane |
getOptionPaneObj()
Returns the 'JOptionPane' object used by this object.
|
boolean |
getParentHeightLimit()
Returns the limit-height-to-that-of-parent flag.
|
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this dialog.
|
boolean |
getRepackNeededFlag()
Returns a flag indicating whether or not the dialog will be repacked
the first time it is shown.
|
static boolean |
getStaticEnforceDispatchThreadFlag()
Returns the static enforce-changes-via-event-dispatch-thread flag
that is used as a default on all newly-created instances.
|
static boolean |
getStaticMaxHeightLimit()
Returns the static limit-height-to-the-maximum flag
that is used as a default on all newly-created instances.
|
static boolean |
getStaticParentHeightLimit()
Returns the static limit-height-to-that-of-parent flag
that is used as a default on all newly-created instances.
|
java.lang.String |
getTitleStr()
Returns the title displayed by this dialog.
|
java.lang.String |
getUserMessageString()
Returns the user-defined message string set via the
'setMessageString()' method.
|
java.lang.Object |
getValue()
Returns the value the user has selected.
|
static java.awt.Window |
getWindowForComponent(java.awt.Component parentComponent)
Returns the specified component's toplevel
Frame or
Dialog . |
void |
hide()
Hides the popup dialog window.
|
void |
invalidate()
Invalidates the popup dialog window.
|
boolean |
isClosed()
Determines if this dialog was closed.
|
boolean |
isModal()
Returns the modal status of the dialog.
|
boolean |
isShowIfNotClosed()
Determines if the window should only be shown if not closed.
|
boolean |
isShowing()
Returns true if the popup dialog window is showing.
|
boolean |
isVisible()
Determines whether the popup dialog should be visible when its
parent is visible.
|
void |
pack()
Causes this dialog to be sized to fit the preferred size and layouts
of its subcomponents.
|
void |
removeCloseListener(IstiDialogPopup.CloseListener listenerObj)
Removes the given "close" listener from the dialog.
|
void |
removeComponentListener(java.awt.event.ComponentListener listenerObj)
Removes the given component listener from the dialog.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener for a specific property.
|
void |
removeWindowListener(java.awt.event.WindowListener listenerObj)
Removes the given window listener from the dialog.
|
void |
repaint()
Repaints the popup dialog window.
|
void |
requestFocus()
Requests that the dialog get the input focus, and that the
dialog's top-level ancestor become the focused Window.
|
protected void |
selectAndShow()
Selects the initial button and calls the dialog's 'show()' method.
|
void |
setBackground(java.awt.Color colorObj)
Sets the background color of the dialog.
|
void |
setDefaultCloseOperation(int selVal)
Sets the operation which will happen by default when the user
initiates a "close" on this dialog.
|
void |
setDisposeDialogOnButtonFlag(boolean flgVal)
Configures whether or not the dialog will be automatically hidden
and disposed after any button is pressed.
|
void |
setEnforceDispatchThreadFlag(boolean flgVal)
Sets the enforce-changes-via-event-dispatch-thread flag.
|
void |
setForeground(java.awt.Color colorObj)
Sets the foreground color of the dialog.
|
void |
setHideDialogOnButtonFlag(boolean flgVal)
Configures whether or not the dialog will be automatically hidden
after any button is pressed.
|
void |
setInitialFocus()
Requests that the current "initial" component have focus.
|
void |
setInitialFocusComponent(java.awt.Component compObj)
Sets the initial focus component for the dialog and requests that
it have focus.
|
void |
setLocation(int x,
int y)
Moves the dialog to a new location.
|
void |
setLocation(java.awt.Point ptObj)
Moves the dialog to a new location.
|
void |
setLocationRelativeTo(java.awt.Component compObj)
Sets the location of the dialog relative to the specified
component.
|
void |
setMaxHeightLimit(boolean flgVal)
Sets the limit-height-to-the-maximum flag.
|
void |
setMessageObj(java.lang.Object obj)
Sets the message object displayed by this dialog.
|
void |
setMessageStr(java.lang.String str)
Sets the message object displayed by this dialog to the given string.
|
void |
setMinimumSize(java.awt.Dimension dimObj)
Sets the minimum size of the dialog.
|
void |
setModal(boolean modalFlag)
Specifies whether this dialog should be modal.
|
void |
setOptionPaneValue(java.lang.Object obj)
Sets the value that will be returned by the 'getValue()' method.
|
void |
setParentHeightLimit(boolean flgVal)
Sets the limit-height-to-that-of-parent flag.
|
void |
setPreferredSize(java.awt.Dimension dimObj)
Sets the preferred size of the dialog.
|
void |
setRepackNeededFlag(boolean flgVal)
Configures whether or not the dialog will be repacked the first time
it is shown.
|
void |
setResizable(boolean resizableFlag)
Sets whether the dialog is resizable by the user.
|
void |
setShowIfNotClosed(boolean b)
Sets if the window should only be shown if not closed.
|
void |
setSize(java.awt.Dimension dimObj)
Sets the size of the dialog.
|
void |
setSize(int width,
int height)
Sets the size of the dialog.
|
static void |
setStaticEnforceDispatchThreadFlag(boolean flgVal)
Sets the static enforce-changes-via-event-dispatch-thread flag
that is used as a default on all newly-created instances.
|
static void |
setStaticMaxHeightLimit(boolean flgVal)
Sets the static limit-height-to-the-maximum flag
that is used as a default on all newly-created instances.
|
static void |
setStaticParentHeightLimit(boolean flgVal)
Sets the static limit-height-to-that-of-parent flag
that is used as a default on all newly-created instances.
|
void |
setTitleStr(java.lang.String str)
Sets the title displayed by this dialog.
|
void |
setUserMessageString(java.lang.String str)
Sets a user-defined message string that may be fetched via the
'getMessageString()' method.
|
void |
setVisible(boolean flgVal)
Sets the visibility of the dialog window.
|
void |
setVisibleViaInvokeLater(boolean flgVal)
Sets the visibility of the dialog window, using the event-dispatch
thread via a call to 'SwingUtilities.invokeLater()'.
|
java.lang.Object |
show()
Displays the popup dialog window.
|
int |
showAndReturnIndex()
Displays a popup option dialog window.
|
java.lang.Object |
showAndWait()
Displays the popup dialog window.
|
static int |
showMessageDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr)
Creates and displays a modal information-message popup dialog window
with a default "OK" button.
|
static int |
showMessageDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
boolean modalFlag,
boolean waitFlag)
Creates and displays a information-message popup dialog window with
a default "OK" button.
|
static int |
showOptionDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType)
Creates and displays a plain-message modal popup dialog window with
default buttons based on the value of 'optionType'.
|
static int |
showOptionDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType,
boolean modalFlag,
boolean waitFlag)
Creates and displays a plain-message popup dialog window with default
buttons based on the value of 'optionType'.
|
static int |
showOptionDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType,
int msgType)
Creates and displays a modal popup dialog window with default buttons
based on the value of 'optionType'.
|
static int |
showOptionDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType,
int msgType,
boolean modalFlag,
boolean waitFlag)
Creates and displays a popup dialog window with default buttons
based on the value of 'optionType'.
|
static int |
showOptionDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType,
int msgType,
java.lang.Object[] optionsArr,
int initValIdx)
Creates and displays a modal popup dialog window.
|
static int |
showOptionDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType,
int msgType,
java.lang.Object[] optionsArr,
int initValIdx,
boolean modalFlag,
boolean waitFlag)
Creates and displays a popup dialog window.
|
static int |
showOptionDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType,
int msgType,
java.lang.Object[] optionsArr,
java.lang.Object initialValue)
Creates and displays a modal popup dialog window.
|
static int |
showOptionDialog(java.awt.Component parentComp,
java.lang.Object msgObj,
java.lang.String titleStr,
int optionType,
int msgType,
java.lang.Object[] optionsArr,
java.lang.Object initialValue,
boolean modalFlag,
boolean waitFlag)
Creates and displays a popup dialog window.
|
void |
validate()
Validates the popup dialog window.
|
boolean |
waitForDialogVisible(int maxWaitTimeMs)
Waits for the popup dialog window to be visible, up to the given
maximum time value.
|
protected final javax.swing.JOptionPane paneObj
protected final javax.swing.JDialog dlgObj
protected java.lang.String messageString
protected java.awt.Component initialFocusCompObj
protected boolean initialFocusFlag
protected boolean packNeededFlag
protected boolean repackNeededFlag
protected java.awt.Point repackCheckLocationObj
protected boolean waitingForShowFlag
protected boolean hideDialogOnButtonFlag
protected boolean disposeDialogOnButtonFlag
protected final java.lang.Object[] optionsArr
protected static boolean staticEnforceDispatchThreadFlag
protected boolean enforceDispatchThreadFlag
protected static boolean staticParentHeightLimitFlag
protected boolean parentHeightLimitFlag
protected static boolean staticMaxHeightLimitFlag
protected boolean maxHeightLimitFlag
public static final int ERROR_MESSAGE
public static final int INFORMATION_MESSAGE
public static final int WARNING_MESSAGE
public static final int QUESTION_MESSAGE
public static final int PLAIN_MESSAGE
public static final int DEFAULT_OPTION
public static final int YES_NO_OPTION
public static final int YES_NO_CANCEL_OPTION
public static final int OK_CANCEL_OPTION
public static final int NO_AUTOBUTTONS_OPTION
public static final int YES_OPTION
public static final int NO_OPTION
public static final int CANCEL_OPTION
public static final int OK_OPTION
public static final int CLOSED_OPTION
public static final int DISPOSE_ON_CLOSE
public static final int DO_NOTHING_ON_CLOSE
public static final int HIDE_ON_CLOSE
public IstiDialogPopup(java.awt.Component parentComp, javax.swing.JDialog givenDialogObj, java.lang.Object msgObj, java.lang.String titleStr, int msgType, java.lang.Object[] optionsArr, int initValIdx, boolean modalFlag, boolean createButtonFlag, int optionType)
parentComp
- the parent component for the popup.givenDialogObj
- A 'JDialog' to be used, or null to have a
new one created.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for default or no buttons, based on 'optionType'.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.modalFlag
- true for modal, false for modeless (allows other
windows to run).createButtonFlag
- if true and the given 'optionsArr' contains a
single non-Component item and the given 'modalFlag' is false then the
button created for 'optionObj' will dispose the dialog (in addition to
hiding it) when used.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION. If default buttons are created and the user
selects one then the object value returned by 'show()' or 'getValue()'
will be an 'Integer' object wrapping one of the 'JOptionPane' values
(such as 'OK_OPTION').public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int msgType, java.lang.Object[] optionsArr, int initValIdx, boolean modalFlag, boolean createButtonFlag, int optionType)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for default or no buttons, based on 'optionType'.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.modalFlag
- true for modal, false for modeless (allows other
windows to run).createButtonFlag
- if true and the given 'optionsArr' contains a
single non-Component item and the given 'modalFlag' is false then the
button created for 'optionObj' will dispose the dialog (in addition to
hiding it) when used.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION. If default buttons are created and the user
selects one then the object value returned by 'show()' or 'getValue()'
will be an 'Integer' object wrapping one of the 'JOptionPane' values
(such as 'OK_OPTION').public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int msgType, java.lang.Object[] optionsArr, int initValIdx, boolean modalFlag, boolean createButtonFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for no buttons.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.modalFlag
- true for modal, false for modeless (allows other
windows to run).createButtonFlag
- if true and the given 'optionsArr' contains a
single non-Component item and the given 'modalFlag' is false then the
button created for 'optionObj' will dispose the dialog (in addition to
hiding it) when used.public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int msgType, java.lang.Object[] optionsArr, int initValIdx, boolean modalFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for no buttons.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.modalFlag
- true for modal, false for modeless (allows other
windows to run).public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, java.lang.Object[] optionsArr, int initValIdx, boolean modalFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionsArr
- an array of Objects that defines what buttons are
shown, or null for no buttons.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.modalFlag
- true for modal, false for modeless (allows other
windows to run).public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int msgType, java.lang.Object[] optionsArr, int initValIdx)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for no buttons.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, java.lang.Object[] optionsArr, int initValIdx)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionsArr
- an array of Objects that defines what buttons are
shown, or null for no buttons.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int msgType, java.lang.Object optionObj, boolean modalFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionObj
- the Object that defines the button, or null to display
no buttons.modalFlag
- true for modal, false for modeless (allows other
windows to run).public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, java.lang.Object optionObj, boolean modalFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionObj
- the Object that defines the button, or null to display
no buttons.modalFlag
- true for modal, false for modeless (allows other
windows to run).public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int msgType, java.lang.Object optionObj)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionObj
- the Object that defines the button, or null to display
no buttons.public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, java.lang.Object optionObj)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionObj
- the Object that defines the button, or null to display
no buttons.public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int msgType, boolean modalFlag, int optionType)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.modalFlag
- true for modal, false for modeless (allows other
windows to run).optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int msgType, int optionType)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, boolean modalFlag, int optionType)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.modalFlag
- true for modal, false for modeless (allows other
windows to run).optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.public IstiDialogPopup(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.public static void setStaticEnforceDispatchThreadFlag(boolean flgVal)
flgVal
- true to make changes occur via the event-dispatch
thread, false to not.public static boolean getStaticEnforceDispatchThreadFlag()
public void setEnforceDispatchThreadFlag(boolean flgVal)
flgVal
- true to make changes occur via the event-dispatch
thread, false to not.public boolean getEnforceDispatchThreadFlag()
public static void setStaticParentHeightLimit(boolean flgVal)
flgVal
- true to limit the height of the dialog to be no
taller than its parent component, false to not.public static boolean getStaticParentHeightLimit()
public void setParentHeightLimit(boolean flgVal)
flgVal
- true to limit the height of the dialog to be no
taller than its parent component, false to not.public boolean getParentHeightLimit()
public static void setStaticMaxHeightLimit(boolean flgVal)
flgVal
- true to limit the height of the dialog to be no
taller than the maximum, false to not.public static boolean getStaticMaxHeightLimit()
public void setMaxHeightLimit(boolean flgVal)
flgVal
- true to limit the height of the dialog to be no
taller than the maximum, false to not.public boolean getMaxHeightLimit()
public final javax.swing.JDialog createDialog(javax.swing.JDialog givenDialogObj, java.awt.Component parentComponent, java.lang.String title)
JDialog
wrapping
the JOptionPane
for this IstiDialogPanel
centered on the parentComponent
in the parentComponent
's frame.
title
is the title of the returned dialog.
The returned JDialog
will be set up such that
once it is closed, or the user clicks on one of the buttons,
the optionpane's value property will be set accordingly and
the dialog will be closed. Each time the dialog is made visible,
it will reset the option pane's value property to
JOptionPane.UNINITIALIZED_VALUE
to ensure the
user's subsequent action closes the dialog properly.givenDialogObj
- A 'JDialog' to be used, or null to have a
new one created.parentComponent
- determines the frame in which the dialog
is displayed; if the parentComponent
has
no Frame
, a default Frame
is usedtitle
- the title string for the dialogJDialog
containing this instancejava.awt.HeadlessException
- if
GraphicsEnvironment.isHeadless
returns
true
GraphicsEnvironment.isHeadless()
protected boolean allowDialogClose()
protected boolean allowDialogClose(java.lang.Object value)
value
- The Object chosen by the user.public final javax.swing.JDialog createDialog(java.awt.Component parentComponent, java.lang.String title)
JDialog
wrapping
the JOptionPane
for this IstiDialogPanel
centered on the parentComponent
in the parentComponent
's frame.
title
is the title of the returned dialog.
The returned JDialog
will be set up such that
once it is closed, or the user clicks on one of the buttons,
the optionpane's value property will be set accordingly and
the dialog will be closed. Each time the dialog is made visible,
it will reset the option pane's value property to
JOptionPane.UNINITIALIZED_VALUE
to ensure the
user's subsequent action closes the dialog properly.parentComponent
- determines the frame in which the dialog
is displayed; if the parentComponent
has
no Frame
, a default Frame
is usedtitle
- the title string for the dialogJDialog
containing this instancejava.awt.HeadlessException
- if
GraphicsEnvironment.isHeadless
returns
true
GraphicsEnvironment.isHeadless()
public void setHideDialogOnButtonFlag(boolean flgVal)
flgVal
- true to be hidden after any button is pressed; false
to remain open (in which case the hiding and disposing of the dialog
will need to be handled by the calling code).public boolean getHideDialogOnButtonFlag()
public void setDisposeDialogOnButtonFlag(boolean flgVal)
flgVal
- true to hide and dispose after any button is pressed;
false to not dispose (in which case the disposing of the dialog
will need to be handled by the calling code).public boolean getDisposeDialogOnButtonFlag()
public void setRepackNeededFlag(boolean flgVal)
flgVal
- true to have the dialog repacked the first time it is
shown; false to not.public boolean getRepackNeededFlag()
protected void doDelayedRepack(java.awt.Component parentComp)
parentComp
- parent component to be recentered upon after
repack, or null for no recentering.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener to be added.public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the name of the property to listen on.listener
- the PropertyChangeListener to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener to be removed.public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the name of the property that was listened on.listener
- the PropertyChangeListener to be removed.public boolean isShowIfNotClosed()
b
- true to only show window if not closed, false otherwise.public void setShowIfNotClosed(boolean b)
b
- true to only show window if not closed, false otherwise.public java.lang.Object show()
show
in interface IstiDialogInterface
public java.lang.Object showAndWait()
showAndWait
in interface IstiDialogInterface
public int showAndReturnIndex()
public void setVisible(boolean flgVal)
setVisible
in interface IstiDialogInterface
flgVal
- true for visible, false for hidden.protected void doPack()
protected void doSetDialogVisible(boolean flgVal)
flgVal
- true for visible, false for hidden.protected void doSetVisible(boolean flgVal)
flgVal
- true for visible, false for hidden.public void setVisibleViaInvokeLater(boolean flgVal)
setVisibleViaInvokeLater
in interface IstiDialogInterface
flgVal
- true for visible, false for hidden.protected void selectAndShow()
public boolean isVisible()
isVisible
in interface IstiDialogInterface
true
if the popup dialog is visible;
false
otherwise.public boolean isShowing()
isShowing
in interface IstiDialogInterface
public boolean waitForDialogVisible(int maxWaitTimeMs)
waitForDialogVisible
in interface IstiDialogInterface
maxWaitTimeMs
- the maximum time to wait, in milliseconds.public boolean isClosed()
public void close(java.lang.Object obj)
close
in interface IstiDialogInterface
obj
- the value to be returned via the 'show()' or 'showAndWait()'
method.public void close()
close
in interface IstiDialogInterface
public void closeWithWait(java.lang.Object obj, int maxWaitTimeMs)
closeWithWait
in interface IstiDialogInterface
obj
- the value to be returned via the 'show()' or 'showAndWait()'
method.maxWaitTimeMs
- the maximum time to wait for the popup dialog
window to be visible, in milliseconds.public void closeWithWait(int maxWaitTimeMs)
closeWithWait
in interface IstiDialogInterface
maxWaitTimeMs
- the maximum time to wait for the popup dialog
window to be visible, in milliseconds.public void hide()
hide
in interface IstiDialogInterface
public void dispose()
dispose
in interface IstiDialogInterface
public void repaint()
repaint
in interface IstiDialogInterface
public void validate()
validate
in interface IstiDialogInterface
public void invalidate()
invalidate
in interface IstiDialogInterface
public void pack()
pack
in interface IstiDialogInterface
public void setSize(int width, int height)
setSize
in interface IstiDialogInterface
width
- the width to use.height
- the height to use.public void setSize(java.awt.Dimension dimObj)
dimObj
- the dimension of width and height to use.public void setResizable(boolean resizableFlag)
setResizable
in interface IstiDialogInterface
resizableFlag
- true if the user can resize this dialog; false
otherwise.public void setLocation(int x, int y)
x
and y
parameters in the coordinate space of this component's parent.setLocation
in interface IstiDialogInterface
x
- The x-coordinate of the new location's
top-left corner in the parent's coordinate space.y
- The y-coordinate of the new location's
top-left corner in the parent's coordinate space.public void setLocation(java.awt.Point ptObj)
p
. Point
p
is given in the parent's coordinate space.ptObj
- The point defining the top-left corner
of the new location, given in the coordinate space of this
component's parent.public void setLocationRelativeTo(java.awt.Component compObj)
compObj
- the component in relation to which the dialog's
location is determined.public void requestFocus()
requestFocus
in interface IstiDialogInterface
public void setModal(boolean modalFlag)
setModal
in interface IstiDialogInterface
modalFlag
- true for modal, false for modeless (allows other
windows to run).public boolean isModal()
isModal
in interface IstiDialogInterface
public void setDefaultCloseOperation(int selVal)
setDefaultCloseOperation
in interface IstiDialogInterface
selVal
- one of the following constants: DISPOSE_ON_CLOSE,
DO_NOTHING_ON_CLOSE, or HIDE_ON_CLOSE.public void setForeground(java.awt.Color colorObj)
colorObj
- to color object to use.public java.awt.Color getForeground()
public void setBackground(java.awt.Color colorObj)
colorObj
- to color object to use.public java.awt.Color getBackground()
public void setMessageObj(java.lang.Object obj)
setMessageObj
in interface IstiDialogInterface
obj
- the message obj.public java.lang.Object getMessageObj()
getMessageObj
in interface IstiDialogInterface
public void setMessageStr(java.lang.String str)
setMessageStr
in interface IstiDialogInterface
str
- the message string.public java.lang.String getMessageStr()
getMessageStr
in interface IstiDialogInterface
public void setTitleStr(java.lang.String str)
setTitleStr
in interface IstiDialogInterface
str
- the title string to display.public java.lang.String getTitleStr()
getTitleStr
in interface IstiDialogInterface
public void addCloseListener(IstiDialogPopup.CloseListener listenerObj)
listenerObj
- the "close" listener object to add.public void removeCloseListener(IstiDialogPopup.CloseListener listenerObj)
listenerObj
- the "close" listener object to remove.public void addWindowListener(java.awt.event.WindowListener listenerObj)
listenerObj
- the window listener to add.public void removeWindowListener(java.awt.event.WindowListener listenerObj)
listenerObj
- the window listener to remove.public void addComponentListener(java.awt.event.ComponentListener listenerObj)
listenerObj
- the component listener to add.public void removeComponentListener(java.awt.event.ComponentListener listenerObj)
listenerObj
- the component listener to remove.public javax.swing.JDialog getDialogObj()
public javax.swing.JOptionPane getOptionPaneObj()
public java.lang.Object getInputValue()
getInputValue
in interface IstiDialogInterface
public java.lang.Object getValue()
getValue
in interface IstiDialogInterface
public void setOptionPaneValue(java.lang.Object obj)
obj
- the value object to set.public void setUserMessageString(java.lang.String str)
setUserMessageString
in interface IstiDialogInterface
str
- the message text.public java.lang.String getUserMessageString()
getUserMessageString
in interface IstiDialogInterface
public void setInitialFocusComponent(java.awt.Component compObj)
compObj
- the component to use.public void setInitialFocus()
setInitialFocus
in interface IstiDialogInterface
public static java.awt.Window getWindowForComponent(java.awt.Component parentComponent)
Frame
or
Dialog
.parentComponent
- the Component
to check for a
Frame
or Dialog
Frame
or Dialog
that
contains the component, or the default
frame if the component is null
,
or does not have a valid
Frame
or Dialog
parentpublic static int showOptionDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType, int msgType, java.lang.Object[] optionsArr, java.lang.Object initialValue, boolean modalFlag, boolean waitFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for default or no buttons, based on 'optionType'.initialValue
- the object that represents the default selection
for the dialog.modalFlag
- true for modal, false for modeless (allows other
windows to run).waitFlag
- if false and 'modalFlag' is false then this method
will not wait for the dialog window to be dismissed; otherwise this
method blocks until the dialog window is dismissed.public static int showOptionDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType, int msgType, java.lang.Object[] optionsArr, int initValIdx, boolean modalFlag, boolean waitFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for default or no buttons, based on 'optionType'.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.modalFlag
- true for modal, false for modeless (allows other
windows to run).waitFlag
- if false and 'modalFlag' is false then this method
will not wait for the dialog window to be dismissed; otherwise this
method blocks until the dialog window is dismissed.public static int showOptionDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType, int msgType, java.lang.Object[] optionsArr, java.lang.Object initialValue)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for default or no buttons, based on 'optionType'.initialValue
- the object that represents the default selection
for the dialog.public static int showOptionDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType, int msgType, java.lang.Object[] optionsArr, int initValIdx)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.optionsArr
- an array of Objects that defines what buttons are
shown, or null for default or no buttons, based on 'optionType'.initValIdx
- the index of the 'optionsArr[]' object
corresponding to the option to be selected by default.public static int showOptionDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType, int msgType, boolean modalFlag, boolean waitFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.modalFlag
- true for modal, false for modeless (allows other
windows to run).waitFlag
- if false and 'modalFlag' is false then this method
will not wait for the dialog window to be dismissed; otherwise this
method blocks until the dialog window is dismissed.public static int showOptionDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType, int msgType)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.msgType
- the type of message to be displayed (primarily used
to determine the icon from the pluggable Look and Feel):
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE.public static int showOptionDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType, boolean modalFlag, boolean waitFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.modalFlag
- true for modal, false for modeless (allows other
windows to run).waitFlag
- if false and 'modalFlag' is false then this method
will not wait for the dialog window to be dismissed; otherwise this
method blocks until the dialog window is dismissed.public static int showOptionDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, int optionType)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.optionType
- specifies what default option buttons to
automatically create if 'optionsArr' is null or empty; one of:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION
or NO_AUTOBUTTONS_OPTION.public static int showMessageDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, boolean modalFlag, boolean waitFlag)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.modalFlag
- true for modal, false for modeless (allows other
windows to run).waitFlag
- if false and 'modalFlag' is false then this method
will not wait for the dialog window to be dismissed; otherwise this
method blocks until the dialog window is dismissed.public static int showMessageDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.public java.awt.Dimension getPreferredSize()
public void setMinimumSize(java.awt.Dimension dimObj)
dimObj
- the dimension of width and height to use.public void setPreferredSize(java.awt.Dimension dimObj)
dimObj
- the dimension of width and height to use.