|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.view.WizardDialog
org.openpermis.editor.policy.view.MessageDialog
public class MessageDialog
Dialog to display messages to the user, similar to the Swing option pane.
Nested Class Summary | |
---|---|
static class |
MessageDialog.Style
The dialog style enumeration. |
Nested classes/interfaces inherited from class org.openpermis.editor.policy.view.WizardDialog |
---|
WizardDialog.ContentStyle |
Field Summary |
---|
Fields inherited from class org.openpermis.editor.policy.view.WizardDialog |
---|
CHOOSER_TEXT, NEXT_FOCUS, TEXT_AREA_ROWS, TEXT_FIELD_COLUMNS |
Constructor Summary | |
---|---|
MessageDialog(ApplicationContext context)
Creates a message dialog for the specified application context. |
Method Summary | |
---|---|
void |
cancel()
The default abort action. |
protected void |
configureButton(JButton button,
Action action)
Configures a button that has the specified action. |
protected JComponent |
createButtonPane(ControlFactory controlFactory)
Creates the button pane of this dialog. |
protected JComponent |
createContentPane(ControlFactory factory)
Creates the content pane of this dialog. |
protected JComponent |
createHeaderPane(ControlFactory controlFactory)
Creates the header pane of this dialog. |
void |
details()
The show/hide details action. |
void |
execute()
The default execute action. |
protected List<Action> |
getButtonActions()
Returns a list of actions to use for buttons at the bottom of the dialog. |
protected String |
getDialogTitle()
Returns the title used by the wizard dialog. |
protected HeaderPane |
getHeaderPane()
Returns the lazily created header pane. |
protected JLabel |
getMessageLabel()
Returns the lazily created message label. |
protected boolean |
initialize(Component parent)
Initialize some wizard specific fields. |
void |
setCancelEnabled(boolean cancelEnabled)
Sets if the cancel button is enabled or not. |
void |
setDetails(Object details)
Sets the dialog details. |
void |
setHeader(String headerKey,
String descriptionKey)
Sets the texts used by the header. |
void |
setMessage(String messagekey,
Object... args)
Sets the message displayed in the message dialog. |
void |
setStyle(MessageDialog.Style style)
Sets the dialog style. |
void |
setTitle(String titleKey,
Object... args)
Sets the title of the dialog. |
boolean |
show()
Shows the dialog using the main frame of the application context as parent. |
static void |
showError(ApplicationContext context,
org.jdesktop.application.ResourceMap resourceMap,
String keyPrefix,
Object details,
Object... args)
Shows an error dialog. |
static boolean |
showErrorQuestion(ApplicationContext context,
org.jdesktop.application.ResourceMap resourceMap,
String keyPrefix,
Object details,
Object... args)
Shows an error dialog with an ok and cancel button. |
static void |
showInformation(ApplicationContext context,
org.jdesktop.application.ResourceMap resourceMap,
String keyPrefix,
Object details,
Object... args)
Shows an information dialog. |
static boolean |
showQuestion(ApplicationContext context,
org.jdesktop.application.ResourceMap resourceMap,
String keyPrefix,
Object details,
Object... args)
Shows a question dialog with an ok and cancel button. |
protected void |
updateActions()
Updates the actions according to the values in the wizard fields. |
Methods inherited from class org.openpermis.editor.policy.view.WizardDialog |
---|
chooseFile, close, configure, createChooser, createDialogContent, createDisplayTextField, createFormBuilder, createLabel, createPasswordField, focusNextComponent, getAction, getActionMap, getApplicationContext, getCancelAction, getContentStyle, getDefaultButton, getDialog, getExecuteAction, getResourceMap, getTitleDescriptionKey, getTitleIconKey, getTitleTextKey, sameAction, setNextFocusComponent, show, showErrorDialog, showErrorDialog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageDialog(ApplicationContext context)
context
- the application context to create the message dialog for.Method Detail |
---|
public static void showError(ApplicationContext context, org.jdesktop.application.ResourceMap resourceMap, String keyPrefix, Object details, Object... args)
The following translation strings are used:
context
- the application context to use.keyPrefix
- translation key prefix used to retrieve the various translation strings.details
- the error details, may be null
.args
- additional arguments passed to the translator.public static boolean showErrorQuestion(ApplicationContext context, org.jdesktop.application.ResourceMap resourceMap, String keyPrefix, Object details, Object... args)
The following translation strings are used:
context
- the application context to use.keyPrefix
- translation key prefix used to retrieve the various translation strings.details
- the error details, may be null
.args
- additional arguments passed to the translator.
true
if the ok button was pressed, false
otherwise.public static boolean showQuestion(ApplicationContext context, org.jdesktop.application.ResourceMap resourceMap, String keyPrefix, Object details, Object... args)
The following translation strings are used:
context
- the application context to use.keyPrefix
- translation key prefix used to retrieve the various translation strings.details
- the error details, may be null
.args
- additional arguments passed to the translator.
true
if the ok button was pressed, false
otherwise.public static void showInformation(ApplicationContext context, org.jdesktop.application.ResourceMap resourceMap, String keyPrefix, Object details, Object... args)
The following translation strings are used:
context
- the application context to use.keyPrefix
- translation key prefix used to retrieve the various translation strings.details
- the error details, may be null
.args
- additional arguments passed to the translator.public void setTitle(String titleKey, Object... args)
titleKey
- the translation key of the title.args
- additional arguments for the translation.public void setStyle(MessageDialog.Style style)
style
- the dialog style.public void setHeader(String headerKey, String descriptionKey)
headerKey
- the translation key of the header title.descriptionKey
- the translation key of the header description.protected HeaderPane getHeaderPane()
public void setMessage(String messagekey, Object... args)
messagekey
- the translation key of the message to display.args
- additional arguments for the translation.public void setCancelEnabled(boolean cancelEnabled)
cancelEnabled
- true
to enable the cancel button.public void setDetails(Object details)
If the details specified denote a Throwable
its stack trace is used as details.
Otherwise the string representation of the details will be used.
details
- the details to set, may be null
.protected JLabel getMessageLabel()
@Action public void cancel()
@Action public void execute()
@Action public void details()
public boolean show()
true
if the ok button was used to close the dialog, false
otherwise.protected List<Action> getButtonActions()
WizardDialog
The default value returned is a list containing the name of the
WizardDialog.getCancelAction()
and WizardDialog.getExecuteAction()
.
getButtonActions
in class WizardDialog
protected String getDialogTitle()
WizardDialog
getDialogTitle
in class WizardDialog
protected JComponent createHeaderPane(ControlFactory controlFactory)
WizardDialog
The default implementation creates a HeaderPane
with the dialog
icon
, title
and
description
.
createHeaderPane
in class WizardDialog
controlFactory
- the control factory to use for creating controls.
protected JComponent createContentPane(ControlFactory factory)
WizardDialog
createContentPane
in class WizardDialog
factory
- the control factory to use for creating controls.
protected void configureButton(JButton button, Action action)
WizardDialog
configureButton
in class WizardDialog
button
- the button to configure.action
- the action of the button.protected JComponent createButtonPane(ControlFactory controlFactory)
WizardDialog
The default implementation creates a panel with buttons for all the
WizardDialog.getButtonActions()
.
Sets the default button according to the default action.
createButtonPane
in class WizardDialog
controlFactory
- the control factory to use for creating controls.
protected boolean initialize(Component parent)
WizardDialog
initialize
in class WizardDialog
parent
- the parent component of the dialog.
protected void updateActions()
WizardDialog
updateActions
in class WizardDialog
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG