Package apps.gui3

Class Apps3

  • Direct Known Subclasses:
    DecoderPro3, 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.

    • Constructor Detail

      • Apps3

        public Apps3​(java.lang.String applicationName,
                     java.lang.String configFileDef,
                     java.lang.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 Detail

      • preInit

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

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

        public static javax.swing.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:
        CreateButtonModelFactory
      • setFloating

        protected void setFloating​(javax.swing.JToolBar toolBar)
        Set a toolbar to be initially floating. This doesn't quite work right.
        Parameters:
        toolBar - the toolbar to float
      • 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 javax.swing.JPanel splashDebugMsg()
      • 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