|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.util.gui.IstiDialogUtil
public class IstiDialogUtil
Class IstiDialogUtil provides simplified methods for popup-message-dialog creation.
Field Summary | |
---|---|
protected static int |
DEF_MAX_JLABEL_LEN
Default maximum length for popup message text. |
protected static int |
DEF_USE_JLABEL_LEN
Default use-JLabel length for popup message text. |
protected static java.lang.String |
ERROR_STR
|
protected java.awt.Component |
parentComponent
|
protected int |
popupLengthValue
|
protected java.lang.Object |
popupMessageSyncObj
Thread-synchronization object for popup-message dialogs. |
protected boolean |
sizeViaNewlinesFlag
|
protected boolean |
useJLabelFlag
|
protected int |
useJLabelLength
|
Constructor Summary | |
---|---|
IstiDialogUtil(java.awt.Component parentComp)
Creates a dialog-utility object. |
|
IstiDialogUtil(java.awt.Component parentComp,
boolean useJLabelFlag)
Creates a dialog-utility object. |
|
IstiDialogUtil(java.awt.Component parentComp,
int popupLength)
Creates a dialog-utility object. |
|
IstiDialogUtil(java.awt.Component parentComp,
int popupLength,
boolean useJLabelFlag)
Creates a dialog-utility object. |
|
IstiDialogUtil(java.awt.Component parentComp,
int popupLength,
boolean useJLabelFlag,
int useJLabelLength)
Creates a dialog-utility object. |
Method Summary | |
---|---|
java.lang.Object |
createMsgObj(java.lang.String msgStr)
Creates a message object using the given string. |
boolean |
getSizeViaNewlinesFlag()
Returns a flag indicating whether or not the dialog may be horizontally sized using the newline characters in the message text. |
void |
popupErrorMessage(LogFile logObj,
java.lang.String msgStr)
Displays an error message in a modal popup window with an "OK" button. |
void |
popupErrorMessage(LogFile logObj,
java.lang.String msgStr,
boolean modalFlag)
Displays an error message in a popup window with an "OK" button. |
void |
popupErrorMessage(LogFile logObj,
java.lang.String msgStr,
boolean modalFlag,
boolean normalizeFlag)
Displays an error message in a popup window with an "OK" button. |
void |
popupErrorMessage(LogFile logObj,
java.lang.String msgStr,
java.lang.String titleStr)
Displays an error message in a modal popup window with an "OK" button. |
void |
popupErrorMessage(LogFile logObj,
java.lang.String msgStr,
java.lang.String titleStr,
boolean modalFlag)
Displays an error message in a popup window with an "OK" button. |
void |
popupErrorMessage(LogFile logObj,
java.lang.String msgStr,
java.lang.String titleStr,
boolean modalFlag,
boolean normalizeFlag)
Displays an error message in a popup window with an "OK" button. |
void |
popupErrorMessage(java.lang.String msgStr)
Displays an error message in a modal popup window with an "OK" button. |
void |
popupErrorMessage(java.lang.String msgStr,
boolean modalFlag)
Displays an error message in a popup window with an "OK" button. |
void |
popupErrorMessage(java.lang.String msgStr,
boolean modalFlag,
boolean normalizeFlag)
Displays an error message in a popup window with an "OK" button. |
void |
popupErrorMessage(java.lang.String msgStr,
java.lang.String titleStr)
Displays an error message in a modal popup window with an "OK" button. |
void |
popupErrorMessage(java.lang.String msgStr,
java.lang.String titleStr,
boolean modalFlag)
Displays an error message in a popup window with an "OK" button. |
void |
popupErrorMessage(java.lang.String msgStr,
java.lang.String titleStr,
boolean modalFlag,
boolean normalizeFlag)
Displays an error message in a popup window with an "OK" button. |
void |
popupInfoMessage(java.lang.String msgStr)
Displays an informational message in a modal popup window with an "OK" button. |
void |
popupInfoMessage(java.lang.String msgStr,
boolean modalFlag)
Displays an informational message in a modal popup window with an "OK" button. |
void |
popupMessage(java.lang.String msgStr,
java.lang.String titleStr,
int messageType,
boolean modalFlag)
Displays a message in a popup window with an "OK" button. |
void |
popupMessage(java.lang.String msgStr,
java.lang.String titleStr,
int messageType,
boolean modalFlag,
boolean waitFlag)
Displays a message in a popup window with an "OK" button. |
int |
popupOKConfirmMessage(java.lang.String msgStr,
java.lang.String titleStr,
boolean modalFlag)
Displays a user-confirmation popup dialog window with "OK" and "Cancel" buttons. |
int |
popupOKConfirmMessage(java.lang.String msgStr,
java.lang.String titleStr,
int messageType,
boolean modalFlag)
Displays a user-confirmation popup dialog window with "OK" and "Cancel" buttons. |
int |
popupYesNoConfirmMessage(java.lang.String msgStr,
java.lang.String titleStr,
boolean modalFlag)
Displays a user-confirmation popup dialog window with "Yes" and "No" buttons. |
int |
popupYesNoConfirmMessage(java.lang.String msgStr,
java.lang.String titleStr,
int messageType,
boolean modalFlag)
Displays a user-confirmation popup dialog window with "Yes" and "No" buttons. |
void |
setSizeViaNewlinesFlag(boolean flgVal)
Configures whether or not the dialog may be horizontally sized using the newline characters in the message text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int DEF_MAX_JLABEL_LEN
protected static final int DEF_USE_JLABEL_LEN
protected static final java.lang.String ERROR_STR
protected final java.awt.Component parentComponent
protected final int popupLengthValue
protected final boolean useJLabelFlag
protected final int useJLabelLength
protected boolean sizeViaNewlinesFlag
protected java.lang.Object popupMessageSyncObj
Constructor Detail |
---|
public IstiDialogUtil(java.awt.Component parentComp, int popupLength, boolean useJLabelFlag, int useJLabelLength)
parentComp
- the parent component for the generated popups.popupLength
- if 'useJLabelFlag'==false then this defines the
preferred-size width (in character columns), or 0 for a default
width; if 'useJLabelFlag'==true then this defines the maximum
allowed length for the popup text, or 0 for a default maximum
length (when the popup text is beyond the maximum length it will
be truncated and displayed with a trailing "..." string).useJLabelFlag
- true to use a 'JLabel' object to display
message text; false to use a 'MultiLineJLabel' object.useJLabelLength
- if the message text is less than or equal
to this value then a 'JLabel' object will always be used.public IstiDialogUtil(java.awt.Component parentComp, int popupLength, boolean useJLabelFlag)
parentComp
- the parent component for the generated popups.popupLength
- if 'useJLabelFlag'==false then this defines the
preferred-size width (in character columns), or 0 for a default
width; if 'useJLabelFlag'==true then this defines the maximum
allowed length for the popup text, or 0 for a default maximum
length (when the popup text is beyond the maximum length it will
be truncated and displayed with a trailing "..." string).useJLabelFlag
- true to use a 'JLabel' object to display
message text; false to use a 'MultiLineJLabel' object.public IstiDialogUtil(java.awt.Component parentComp, int popupLength)
parentComp
- the parent component for the generated popups.popupLength
- the preferred-size width (in character columns),
or 0 for a default width.public IstiDialogUtil(java.awt.Component parentComp, boolean useJLabelFlag)
parentComp
- the parent component for the generated popups.useJLabelFlag
- true to use a 'JLabel' object to display
message text; false to use a 'MultiLineJLabel' object.public IstiDialogUtil(java.awt.Component parentComp)
parentComp
- the parent component for the generated popups.Method Detail |
---|
public void setSizeViaNewlinesFlag(boolean flgVal)
flgVal
- if true then when the message text contains newline
characters the width of the dialog will be determined by the width
of the longest "line" in the text.public boolean getSizeViaNewlinesFlag()
public void popupMessage(java.lang.String msgStr, java.lang.String titleStr, int messageType, boolean modalFlag, boolean waitFlag)
msgStr
- the error message text to display.titleStr
- the window title to use.messageType
- message type code.modalFlag
- true for a modal dialog, false for non-modal
(allows other windows to run).waitFlag
- true to have this method block until the dialog is
dismissed (even if non-modal); false to have this method return
immediately (if non-modal).public void popupMessage(java.lang.String msgStr, java.lang.String titleStr, int messageType, boolean modalFlag)
msgStr
- the error message text to display.titleStr
- the window title to use.messageType
- message type code.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).public void popupErrorMessage(LogFile logObj, java.lang.String msgStr, java.lang.String titleStr, boolean modalFlag, boolean normalizeFlag)
logObj
- the log file to which the message text should also
be delivered (with a log level of "warning"), or null for none.msgStr
- the error message text to display.titleStr
- the window title to use.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).normalizeFlag
- true to remove extra whitespace from the
message text before showing it in the dialog; false to leave the
text unchanged.public void popupErrorMessage(LogFile logObj, java.lang.String msgStr, java.lang.String titleStr, boolean modalFlag)
logObj
- the log file to which the message text should also
be delivered (with a log level of "warning"), or null for none.msgStr
- the error message text to display.titleStr
- the window title to use.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).public void popupErrorMessage(java.lang.String msgStr, java.lang.String titleStr, boolean modalFlag, boolean normalizeFlag)
msgStr
- the error message text to display.titleStr
- the window title to use.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).normalizeFlag
- true to remove extra whitespace from the
message text before showing it in the dialog; false to leave the
text unchanged.public void popupErrorMessage(java.lang.String msgStr, java.lang.String titleStr, boolean modalFlag)
msgStr
- the error message text to display.titleStr
- the window title to use.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).public void popupErrorMessage(LogFile logObj, java.lang.String msgStr, java.lang.String titleStr)
logObj
- the log file to which the message text should also
be delivered (with a log level of "warning"), or null for none.msgStr
- the error message text to display.titleStr
- the window title to use.public void popupErrorMessage(java.lang.String msgStr, java.lang.String titleStr)
msgStr
- the error message text to display.titleStr
- the window title to use.public void popupErrorMessage(LogFile logObj, java.lang.String msgStr, boolean modalFlag, boolean normalizeFlag)
logObj
- the log file to which the message text should also
be delivered (with a log level of "warning"), or null for none.msgStr
- the error message text to display.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).normalizeFlag
- true to remove extra whitespace from the
message text before showing it in the dialog; false to leave the
text unchanged.public void popupErrorMessage(LogFile logObj, java.lang.String msgStr, boolean modalFlag)
logObj
- the log file to which the message text should also
be delivered (with a log level of "warning"), or null for none.msgStr
- the error message text to display.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).public void popupErrorMessage(java.lang.String msgStr, boolean modalFlag, boolean normalizeFlag)
msgStr
- the error message text to display.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).normalizeFlag
- true to remove extra whitespace from the
message text before showing it in the dialog; false to leave the
text unchanged.public void popupErrorMessage(java.lang.String msgStr, boolean modalFlag)
msgStr
- the error message text to display.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).public void popupErrorMessage(LogFile logObj, java.lang.String msgStr)
logObj
- the log file to which the message text should also
be delivered (with a log level of "warning"), or null for none.msgStr
- the error message text to display.public void popupErrorMessage(java.lang.String msgStr)
msgStr
- the error message text to display.public void popupInfoMessage(java.lang.String msgStr, boolean modalFlag)
msgStr
- the error message text to display.modalFlag
- true for a modal dialog, false for non-modal (in
which case this method does not wait for the popup window to be
dismissed).public void popupInfoMessage(java.lang.String msgStr)
msgStr
- the error message text to display.public int popupOKConfirmMessage(java.lang.String msgStr, java.lang.String titleStr, int messageType, boolean modalFlag)
msgStr
- the message text to display.titleStr
- the window title to use.messageType
- 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 a modal dialog, false for non-modal.
public int popupOKConfirmMessage(java.lang.String msgStr, java.lang.String titleStr, boolean modalFlag)
msgStr
- the message text to display.titleStr
- the window title to use.modalFlag
- true for a modal dialog, false for non-modal.
public int popupYesNoConfirmMessage(java.lang.String msgStr, java.lang.String titleStr, int messageType, boolean modalFlag)
msgStr
- the message text to display.titleStr
- the window title to use.messageType
- 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 a modal dialog, false for non-modal.
public int popupYesNoConfirmMessage(java.lang.String msgStr, java.lang.String titleStr, boolean modalFlag)
msgStr
- the message text to display.titleStr
- the window title to use.modalFlag
- true for a modal dialog, false for non-modal.
public java.lang.Object createMsgObj(java.lang.String msgStr)
msgStr
- the message string to use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |