com.jgoodies.uifextras.convenience
Class DefaultUIFApplication

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.jgoodies.uif.application.Application
          extended by com.jgoodies.uif.application.AbstractUIFApplication
              extended by com.jgoodies.uifextras.convenience.DefaultUIFApplication
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, Serializable

public abstract class DefaultUIFApplication
extends com.jgoodies.uif.application.AbstractUIFApplication

This class is used during the startup process and extends the more generic superclass behavior of the AbstractUIFApplication.

Since:
1.8
Version:
$Revision: 1.15 $
Author:
Karsten Lentzsch
See Also:
Splash, HelpBroker, Serialized Form

Constructor Summary
DefaultUIFApplication()
           
 
Method Summary
protected  void addMessageHandler()
           
protected  void checkSetup()
          Checks whether a setup is necessary.
protected  void configureHelp()
          Configures the application wide help.
protected  void configureLogging()
          Configure logging to write a console.log file.
protected  void configureLogging2()
          Configures the logging.
protected  void configureSetupManager()
          Configures the SetupManager.
protected  void configureSplash()
          Configures the splash component: reads the splash image, then opens an ImageSplash.
protected  void configureUI()
          Configures all UI related properties: look&feel, system properties, etc.
protected abstract  com.jgoodies.uif.AbstractFrame createMainFrame()
          Creates and returns the main frame.
protected  String getDefaultLogFilePattern()
          Returns the default log file pattern.
protected  String getDefaultLogFilePrefix()
          Computes and returns a pattern for the log file directory.
protected abstract  void initializeActions()
          Initializes the application's actions.
protected  void launchApplication()
          Brings up the application, it therefore initializes the main frame, checks the setup process, initializes all actions, then builds the main frame, and finally opens it.
 
Methods inherited from class com.jgoodies.uif.application.AbstractUIFApplication
addLogFileHandler, configureLoggingFromProperties, disposeFramesAndWindows, ensureParentDirectoryExists, exitSystem, getApplicationDataDirectory, getAppResourceMap, load, lookupApplicationDataBaseDirectory, lookupApplicationDataDirectory, shutdown, startup
 
Methods inherited from class com.jgoodies.uif.application.Application
addExitListener, clearActionMap, end, exit, exit, exitAllowed, fireApplicationExiting, getAction, getActionMap, getApplicationExitOnWindowClosingHandler, getResourceMap, launch, removeExitListener
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUIFApplication

public DefaultUIFApplication()
Method Detail

configureLogging

protected void configureLogging()
Configure logging to write a console.log file.

Specified by:
configureLogging in class com.jgoodies.uif.application.AbstractUIFApplication

configureLogging2

protected void configureLogging2()
Configures the logging.

This will become the default logging behavior in the next major UIF version.. For now it resides as an optional default behavior and must be invoked manually from the #configureLogging method. This default implementation reads the logging configuration from a file resources/logging.<LOGGING TYPE>.properties. The <LOGGING TYPE> is read from the system property logging.type, and is default by default. Hence, the default logging configuration file is resources/logging.default.properties. If for example you set the logging type to debug, the logging configuration file will be resources/logging.debug.properties.

Also adds a FileHandler that logs to <applicationDataDirectory>/console%u.log.

Subclasses may override this implementation.

Since:
1.9.1
See Also:
AbstractUIFApplication.getApplicationDataDirectory()

getDefaultLogFilePattern

protected String getDefaultLogFilePattern()
Returns the default log file pattern. This implementation uses the application configuration's app filename as directory name under the user home directory. The log file name is console.log.

Returns:
the default log file pattern
See Also:
getDefaultLogFilePrefix()

getDefaultLogFilePrefix

protected String getDefaultLogFilePrefix()
Computes and returns a pattern for the log file directory. This default implementation uses the absolute path of the application data directory.

Returns:
the absolute path of the application data directory
Since:
1.8
See Also:
AbstractUIFApplication.getApplicationDataDirectory()

configureSplash

protected void configureSplash()
Configures the splash component: reads the splash image, then opens an ImageSplash.

Specified by:
configureSplash in class com.jgoodies.uif.application.AbstractUIFApplication

addMessageHandler

protected void addMessageHandler()

configureHelp

protected void configureHelp()
Configures the application wide help.

Specified by:
configureHelp in class com.jgoodies.uif.application.AbstractUIFApplication

launchApplication

protected void launchApplication()
Brings up the application, it therefore initializes the main frame, checks the setup process, initializes all actions, then builds the main frame, and finally opens it.

Specified by:
launchApplication in class com.jgoodies.uif.application.AbstractUIFApplication

createMainFrame

protected abstract com.jgoodies.uif.AbstractFrame createMainFrame()
Creates and returns the main frame.

Returns:
the created main frame

initializeActions

protected abstract void initializeActions()
Initializes the application's actions.


configureUI

protected void configureUI()
Configures all UI related properties: look&feel, system properties, etc. By default we set the Swing class loader to class LookUtils of the JGoodies L&F library. Also the menu bar is moved to the screen in Aqua look&feel.

Subclasses that override this method are encouraged to invoke this super behavior.

Specified by:
configureUI in class com.jgoodies.uif.application.AbstractUIFApplication

checkSetup

protected void checkSetup()
Checks whether a setup is necessary. For example, one can check whether the user has accepted the license agreement.


configureSetupManager

protected void configureSetupManager()
Configures the SetupManager. The default does nothing. Subclasses can, for example modify the welcome panel.



Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.