Introduction

The FreeHEP application framework provides a set of framework classes for building applications. The framework is organized into 4 layers, each building on the layer below.

  1. Application - A framework for general purpose GUI applications.
  2. MDIApplication - extends Application to provide support for "MDI style" applications.
  3. Studio - Extends MDIApplication to provide support for plugins, which can be dynamically loaded and extend the functionality of the application.
  4. Data Studio - Extends the functionality of studio to provide support for data analysis specific functionality, including Data Interface Modules's.

The entire package is still under development and should not be considered stable.

Application

The Application package (org.freehep.application) provides the following capabilities. In many cases the individual functions are provided by other parts of the freehep library, but the application package brings these capabilities all together in one place. The application package makes some assumptions about the application design, but provides many ways in which it can be customized.

  • Setting of properties via an "application properties" file
  • Maintenance of user preferences between sessions using a "user properties" file.
  • A services package which provides for writing applications which can run as standalone applications, trusted JNLP applications, or untrusted JNLP applications.
  • Use of XML to define menus and toolbars
  • Use of a command manager for dispatching commands to command targets.
  • Command line parsing
  • About dialog
  • Print Preview capabilities
  • Recent File menu(s) maintained between sessions
  • Reporting of errors to the user.
  • JDK compatibility testing.
  • Dynamic Look and Feel switching and persistency between sessions
  • Window size and position maintained between sessions
  • Splash Screen
  • Status bar with message area and progress meter - including support for canceling time consuming operations.
  • Help system using JavaHelp

As an alternative to customization by overriding methods, much of the application functionality can be controlled using the application property file.

Application Properties
PropertyPurposeDefaultUser overideLegal values
versionVersion #1.0no
fullVersionVersion descriptiontitle versionno
confirmQuitAsk before quit?maybeyesnever | maybe | always
confirmQuitMessageConfirm quit messageDo youreally wantto quit?yes
confirmQuitTitleTitle for confirm quit dialogConfirm Quityes
showSplashShould splash screen appear at startuptrueyestrue | false
splashTitleTitle for splash screentitleyes
splashImageImage for splash screenaboutImageyes
numberOfInitializationStagesAutomatically set after first application invokation10yes
lookAndFeelLook and FeelSystemyesSystem | Java | name
titleApplication titleappNameyes
iconApplication iconnullyes
topLevelToolBarName of default tool bar in XML filenullyes
topLevelMenuBarName of default menu bar in XML filenullyes
topLevelPopupMenuName of default popup menu in XML filenullyes
showToolBarIs tool bar visibletrueyestrue | false
showStatusBarIs status bar visibletrueyestrue | false
windowPosition/size of top level windowyes
SAXParserClass for XML parserorg.apache.xerces.parsers.SAXParseryes
menuXMLName of XML file which defines menusappName.menusyes

For a demonstration of the application framework see the IconBrowser demo.

MDI Application

The MDI application package (org.freehep.application.mdi) provides support for:

  • pages, control(s) and console(s) areas.
  • dynamic switching of page managers to allow pages to be organized as tabbed panes, or as movable windows on a desktop. * multiple toolbars.

Studio

While MDI applications are typically customized by subclassing, Studio applications are typically extended by the use of one or more plugins.