|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.application.AbstractBean
org.jdesktop.application.Application
org.jdesktop.application.SingleFrameApplication
org.openpermis.editor.policy.Application
public class Application
The singleton policy editor application instance.
In addition to the usual Application
responsibilities
the policy editor application instance manages the persistent application state.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jdesktop.application.Application |
---|
org.jdesktop.application.Application.ExitListener |
Field Summary | |
---|---|
private static String |
APPLICATION_STATE
Name of the file that holds the persistent application state. |
private org.picocontainer.PicoContainer |
container
The dependency injection container of this application. |
private static org.slf4j.Logger |
LOGGER
The logger object of this class. |
private ApplicationState |
state
The persistent state of this application. |
private static String |
VERSION_APPLICATION
The version file module name of the editor. |
private static String |
VERSION_FILE
The classpath location of the version property file. |
Constructor Summary | |
---|---|
Application()
|
Method Summary | |
---|---|
void |
about()
Displays the application about box. |
File |
chooseFile(int type,
boolean addToRecentFiles,
PolicyFileFilter filter)
Opens the file chooser and returns the user selection. |
private org.picocontainer.PicoContainer |
createContainer(Object... components)
Creates and configures the pico container for this application. |
private org.jdesktop.application.ApplicationActionMap |
getActionMap()
Returns the context application action map of this class. |
ApplicationState |
getApplicationState()
Returns the application state. |
static Application |
getInstance()
Returns the singleton policy editor application instance. |
private org.jdesktop.application.ResourceMap |
getResourceMap()
Returns the context resource map of this class. |
protected void |
initialize(String[] args)
|
private ApplicationState |
loadApplicationState()
Loads the persistent application state. |
void |
quit()
Action wrapper for the application exit. |
private String[] |
readVersionProperties()
Reads the version properties of the editor. |
protected void |
shutdown()
|
protected void |
startup()
|
private void |
storeApplicationState(ApplicationState appState)
Stores the application state persistently in the application state file. |
Methods inherited from class org.jdesktop.application.SingleFrameApplication |
---|
configureWindow, getMainFrame, getMainView, setMainFrame, show, show, show, show |
Methods inherited from class org.jdesktop.application.Application |
---|
addExitListener, end, exit, exit, getContext, getExitListeners, getInstance, hide, launch, quit, ready, removeExitListener |
Methods inherited from class org.jdesktop.application.AbstractBean |
---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.slf4j.Logger LOGGER
private static final String APPLICATION_STATE
"state.xml"
private static final String VERSION_FILE
"version.properties"
private static final String VERSION_APPLICATION
This is used to identify the versioning file for the editor.
"openpermis"
private org.picocontainer.PicoContainer container
createContainer(Object...)
private ApplicationState state
getApplicationState()
,
shutdown()
Constructor Detail |
---|
public Application()
Method Detail |
---|
public static Application getInstance()
private org.jdesktop.application.ResourceMap getResourceMap()
private org.jdesktop.application.ApplicationActionMap getActionMap()
private String[] readVersionProperties()
The array returned will contain the master version, the build number and date.
null
if no versioning information is available.@Action public void about()
@Action public void quit()
public File chooseFile(int type, boolean addToRecentFiles, PolicyFileFilter filter)
The file chooser is displayed as dialog with the application frame as parent and will use the specified file chooser type.
type
- the file chooser type, either JFileChooser.OPEN_DIALOG
or
JFileChooser.SAVE_DIALOG
.addToRecentFiles
- wether to add current file to the recent files list.filter
- file filter, possibly null.
null
if the user cancelled.private ApplicationState loadApplicationState()
private void storeApplicationState(ApplicationState appState)
Errors while storing the application state are ignored.
appState
- the state to store.public ApplicationState getApplicationState()
The state is lazily loaded or initialized on first use.
private final org.picocontainer.PicoContainer createContainer(Object... components)
components
- an array of components to add.
protected void initialize(String[] args)
initialize
in class org.jdesktop.application.Application
protected void shutdown()
shutdown
in class org.jdesktop.application.SingleFrameApplication
protected void startup()
startup
in class org.jdesktop.application.Application
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:22
Copyright (c) 2002-2007 Ergon Informatik AG