|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.dialog.ApplicationDialog
org.springframework.richclient.dialog.MessageDialog
public class MessageDialog
Dialog for showing an message to the user. The severity of the message is used to determine the icon.
If the message text contains line feeds ('\n'), the message is split into different parts, and the first part is rendered in bold. This is to mimic the guidelines in http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_6.html#//apple_ref/doc/uid/20000957-20000961-BACFBACB
Field Summary |
---|
Fields inherited from class org.springframework.richclient.dialog.ApplicationDialog |
---|
DEFAULT_CANCEL_COMMAND_ID, DEFAULT_FINISH_COMMAND_ID, DEFAULT_FINISH_SUCCESS_MESSAGE_KEY, DEFAULT_FINISH_SUCCESS_TITLE_KEY, logger, SUCCESS_FINISH_MESSAGE_KEY, SUCCESS_FINISH_TITLE_KEY |
Constructor Summary | |
---|---|
MessageDialog(String title,
Message message)
Constructs a new dialog. |
|
MessageDialog(String title,
String message)
Constructs a new dialog, the message is converted to an information message |
|
MessageDialog(String title,
Window parent,
Message message)
Constructs a new dialog. |
|
MessageDialog(String title,
Window parent,
String message)
Constructs a new dialog, the message is converted to an information message |
Method Summary | |
---|---|
protected JComponent |
createDialogContentPane()
Return the GUI which allows the user to manipulate the business objects related to this dialog. |
protected void |
disposeDialogContentPane()
Cleanup any components/objects that are created during ApplicationDialog.createDialogContentPane() . |
protected String |
getCancelCommandId()
Returns the id for the cancel command. |
protected Object[] |
getCommandGroupMembers()
Template getter method to return the commands to populate the dialog button bar. |
float |
getDialogScaleFactor()
Get the scale factor for the dialog size (as compared to the parent window). |
Message |
getMessage()
Get the message |
int |
getMinimumWidth()
Get the minimum width for the dialog. |
protected void |
onAboutToShow()
Template lifecycle method invoked right before the dialog is to become visible. |
protected boolean |
onFinish()
Request invocation of the action taken when the user hits the OK (finish) button. |
protected void |
registerDefaultCommand()
Register the finish button as the default dialog button. |
void |
setDialogScaleFactor(float dialogScaleFactor)
Set the scale factory for the dialog size. |
void |
setMessage(Message message)
Set the message. |
void |
setMessage(String text)
Set the message text, severity is info. |
void |
setMinimumWidth(int minimumWidth)
Set the minimum width for the dialog. |
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
---|
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageDialog(String title, Message message)
title
- the titlemessage
- the messagepublic MessageDialog(String title, Window parent, Message message)
title
- the titleparent
- the parent windowmessage
- the messagepublic MessageDialog(String title, String message)
title
- the titlemessage
- the message textpublic MessageDialog(String title, Window parent, String message)
title
- the titleparent
- the parent windowmessage
- the message textMethod Detail |
---|
public void setMessage(String text)
text
- the message textpublic void setMessage(Message message)
message
- the messagepublic Message getMessage()
protected String getCancelCommandId()
ApplicationDialog
getCancelCommandId
in class ApplicationDialog
ApplicationDialog.getCancelCommandId()
protected void registerDefaultCommand()
ApplicationDialog
registerDefaultCommand
in class ApplicationDialog
ApplicationDialog.registerDefaultCommand()
protected Object[] getCommandGroupMembers()
ApplicationDialog
getCommandGroupMembers
in class ApplicationDialog
ApplicationDialog.getCommandGroupMembers()
protected JComponent createDialogContentPane()
ApplicationDialog
OK
and Cancel
buttons, in a standard manner.
Any components/objects created at this point need to be disposed in
ApplicationDialog.disposeDialogContentPane()
.
createDialogContentPane
in class ApplicationDialog
ApplicationDialog.createDialogContentPane()
protected void disposeDialogContentPane()
ApplicationDialog
ApplicationDialog.createDialogContentPane()
. This method is called if the
CloseAction
is set to CloseAction.DISPOSE
and the dialog
is being closed. This ensures that when disposing the surrounding dialog,
the content pane can be disposed as well.
disposeDialogContentPane
in class ApplicationDialog
ApplicationDialog.createDialogContentPane()
,
ApplicationDialog.dispose()
protected final boolean onFinish()
ApplicationDialog
OK
(finish) button.
onFinish
in class ApplicationDialog
ApplicationDialog.onFinish()
protected void onAboutToShow()
ApplicationDialog
onAboutToShow
in class ApplicationDialog
ApplicationDialog.onAboutToShow()
public float getDialogScaleFactor()
public void setDialogScaleFactor(float dialogScaleFactor)
dialogScaleFactor
- New dialog scale factorpublic int getMinimumWidth()
setDialogScaleFactor(float)
public void setMinimumWidth(int minimumWidth)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |