Class FWApplication
java.lang.Object
net.simplace.ui.FWApplication
- Direct Known Subclasses:
MainApp
Abstract base-class for applications.
- Author:
- Andreas Enders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyLanguage(String aLocalization) Switches the language of the GUI: sets the default language of theLocaleProviderand reinitialises the Swing look and feel, so that the standard Swing texts follow the new locale.protected voidThis method is a fix for a Webstart bug - see: http://forum.java.sun.com/thread.jspa?forumID=38&threadID=301640static ClassLoaderThis method has to be implemented as a workaround for the known problem with webstart, that the class loader is set to null, if the console is deactivated.static FWMainFrameReturns the main application window.voidperformDefaultMainActions(String aSoftwareType, String aConfigurationLayoutProvider, boolean aStartApplication) Default start-up of the GUI application; has to be called inperformMain()of the implementation.abstract voidmethod that has to be implemented by real application.static voidExits application if user confirms shutdown.static voidshutdown()Exits application.
-
Constructor Details
-
FWApplication
public FWApplication()Creates the instance without any options
-
-
Method Details
-
performMain
public abstract void performMain()method that has to be implemented by real application. This is called while starting application for initializing applicationspecific things. While implementing make shure to call 'performDefaultMainAcions' -
getInstanceClassLoader
This method has to be implemented as a workaround for the known problem with webstart, that the class loader is set to null, if the console is deactivated.- Returns:
- this class' class loader
-
performDefaultMainActions
public void performDefaultMainActions(String aSoftwareType, String aConfigurationLayoutProvider, boolean aStartApplication) Default start-up of the GUI application; has to be called inperformMain()of the implementation. RedirectsSystem.out/System.errto the log, sets the look and feel, reads the layout configurationaConfigurationLayoutProvider.xmlfrom the classpath, creates the main frame and registers a shutdown hook deleting the temporary directories.- Parameters:
aSoftwareType- name of the software, set as system propertySoftwareTypeaConfigurationLayoutProvider- name of the layout configuration file on the classpath (without.xml)aStartApplication-trueto show the main frame and run the autostart function
-
fixWebStartClassLoaderIssue
protected void fixWebStartClassLoaderIssue()This method is a fix for a Webstart bug - see: http://forum.java.sun.com/thread.jspa?forumID=38&threadID=301640 -
applyLanguage
Switches the language of the GUI: sets the default language of theLocaleProviderand reinitialises the Swing look and feel, so that the standard Swing texts follow the new locale.- Parameters:
aLocalization- locale string; only the first two characters (language code) are used, e.g.de_DE
-
requestShutdown
public static void requestShutdown()Exits application if user confirms shutdown. -
shutdown
public static void shutdown()Exits application. -
getMainFrame
-