|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.ApplicationContext
public class ApplicationContext
Customized application context for the policy editor.
Even though this context shares the name with the context of the Swing Application Framework, the policy editor has to maintain its own application context since the one of the Swing Application Framework is not extensible.
This application context will and should replace all functionality covered by the original Swing Application Framework context and is suitable for injecting into views and presenters.
Nested Class Summary | |
---|---|
static class |
ApplicationContext.FileChooserType
Type object for file chooser types. |
Constructor Summary | |
---|---|
ApplicationContext(Application application)
Creates a new application context for the specified Swing Application Framework context. |
Method Summary | |
---|---|
File |
chooseFile(ApplicationContext.FileChooserType chooserType,
FileType fileType)
Opens the file chooser and returns the user selection. |
org.jdesktop.application.ApplicationActionMap |
getActionMap(Object target)
Returns the action map of the specified target. |
ApplicationState |
getApplicationState()
Returns the application state. |
JFrame |
getMainFrame()
Returns the main application frame. |
org.jdesktop.application.ResourceMap |
getResourceMap(Object target)
Returns the resource map of the specified target. |
void |
store()
Stores all persistent application context state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApplicationContext(Application application)
application
- the owner application of this context.Method Detail |
---|
public org.jdesktop.application.ResourceMap getResourceMap(Object target)
Uses the type of the target (i.e. Object.getClass()
to make a lookup in
the underlying Swing Application Framework context using
ApplicationContext.getResourceMap(Class)
).
target
- the target object for which to retrieve the resource map.
ApplicationContext.getResourceMap(Class)
public org.jdesktop.application.ApplicationActionMap getActionMap(Object target)
Uses the type of the target (i.e. Object.getClass()
to make a lookup in
the underlying Swing Application Framework context using
ApplicationContext.getActionMap(Class, Object)
).
target
- the target object for which to retrieve the action map.
ApplicationContext.getActionMap(Class, Object)
public JFrame getMainFrame()
public File chooseFile(ApplicationContext.FileChooserType chooserType, FileType fileType)
The file chooser is displayed as dialog with the application frame as parent and will use the specified file chooser type.
chooserType
- the file chooser type, either JFileChooser.OPEN_DIALOG
or
JFileChooser.SAVE_DIALOG
.fileType
- file type to choose, may be null
.
null
if the user cancelled.public ApplicationState getApplicationState()
The state is lazily loaded or initialized on first use.
public void store()
Note: Errors while storing the application state will only be logged but not forwarded to the caller since there is nothing we can do about I/O errors when storing the state.
|
![]() |
||||||||
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