org.openpermis.editor.policy
Class Application

java.lang.Object
  extended by org.jdesktop.application.AbstractBean
      extended by org.jdesktop.application.Application
          extended by org.jdesktop.application.SingleFrameApplication
              extended by org.openpermis.editor.policy.Application

public class Application
extends org.jdesktop.application.SingleFrameApplication

The singleton policy editor application instance.

In addition to the usual Application responsibilities the policy editor application instance manages the persistent application state.

Since:
0.1.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.application.Application
org.jdesktop.application.Application.ExitListener
 
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.
 ApplicationState getApplicationState()
          Returns the application state.
static Application getInstance()
          Returns the singleton policy editor application instance.
protected  void initialize(String[] args)
           
 void quit()
          Action wrapper for the application exit.
protected  void shutdown()
           
protected  void startup()
           
 
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
 

Constructor Detail

Application

public Application()
Method Detail

getInstance

public static Application getInstance()
Returns the singleton policy editor application instance.

Returns:
the singleton policy editor application instance.
Since:
0.1.0

about

@Action
public void about()
Displays the application about box.

Since:
0.1.0

quit

@Action
public void quit()
Action wrapper for the application exit.

Since:
0.1.0

chooseFile

public File chooseFile(int type,
                       boolean addToRecentFiles,
                       PolicyFileFilter filter)
Opens the file chooser and returns the user selection.

The file chooser is displayed as dialog with the application frame as parent and will use the specified file chooser type.

Parameters:
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.
Returns:
the file chosen or null if the user cancelled.
Since:
0.1.0

getApplicationState

public ApplicationState getApplicationState()
Returns the application state.

The state is lazily loaded or initialized on first use.

Returns:
the application state requested.
Since:
0.1.0

initialize

protected void initialize(String[] args)
Overrides:
initialize in class org.jdesktop.application.Application
Since:
0.1.0

shutdown

protected void shutdown()
Overrides:
shutdown in class org.jdesktop.application.SingleFrameApplication
Since:
0.1.0

startup

protected void startup()
Specified by:
startup in class org.jdesktop.application.Application
Since:
0.1.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:11
Copyright (c) 2002-2007 Ergon Informatik AG