Package apps.gui3

Class Apps3

Direct Known Subclasses:
DecoderPro3, LccPro, MDI, Paned

public abstract class Apps3 extends AppsBase
Base class for GUI3 JMRI applications.

This is a complete re-implementation of the apps.Apps support for JMRI applications.

Each using application provides its own main() method.

There are a large number of missing features marked with TODO in comments including code from the earlier implementation.

  • Field Details

  • Constructor Details

    • Apps3

      public Apps3(String applicationName, String configFileDef, String[] args)
      Create and initialize the application object.

      Expects initialization from preInit() to already be done.

      Parameters:
      applicationName - application name
      configFileDef - default configuration file name
      args - command line arguments set at application launch
  • Method Details

    • preInit

      public static void preInit(String applicationName)
      Initial actions before frame is created, invoked in the applications main() routine.
      Parameters:
      applicationName - application name
    • wizardLaunchCheck

      protected boolean wizardLaunchCheck()
      To be overridden by applications that need to make additional checks as to whether the first time wizard should be launched.
      Returns:
      true to force the wizard to be launched
    • launchFirstTimeStartupWizard

    • setButtonSpace

      protected static void setButtonSpace()
      For compatability with adding in buttons to the toolbar using the existing createbuttonmodel
    • buttonSpace

      public static JComponent buttonSpace()
      Provide access to a place where applications can expect the configuration code to build run-time buttons.
      Returns:
      null if no such space exists
      See Also:
    • createMainFrame

      protected abstract void createMainFrame()
    • createAndDisplayFrame

      public void createAndDisplayFrame()
    • setFloating

      protected void setFloating(JToolBar toolBar)
      Set a toolbar to be initially floating. This doesn't quite work right.
      Parameters:
      toolBar - the toolbar to float
    • displayMainFrame

      protected void displayMainFrame(Dimension d)
    • start

      protected void start()
      Final actions before releasing control of app to user
      Overrides:
      start in class AppsBase
    • splash

      protected static void splash(boolean show)
    • splash

      protected static void splash(boolean show, boolean debug)
    • splashDebugMsg

      protected static JPanel splashDebugMsg()
    • startupDebug

      protected static void startupDebug()
    • initMacOSXMenus

      protected void initMacOSXMenus()
    • configureProfile

      protected void configureProfile()
      Configure the Profile to use for this application.

      Overrides super() method so dialogs can be displayed.

      Overrides:
      configureProfile in class AppsBase
    • setAndLoadPreferenceFile

      protected void setAndLoadPreferenceFile()
      Description copied from class: AppsBase
      Invoked to load the preferences information, and in the process configure the system. The high-level steps are:
      • Locate the preferences file based through FileUtil.getFile(String)
      • See if the preferences file exists, and handle it if it doesn't
      • Obtain a ConfigureManager from the InstanceManager
      • Ask that ConfigureManager to load the file, in the process loading information into existing and new managers.
      • Do any deferred loads that are needed
      • If needed, migrate older formats
      (There's additional handling for shared configurations)
      Overrides:
      setAndLoadPreferenceFile in class AppsBase