Package apps.gui3
Class Apps3
java.lang.Object
apps.AppsBase
apps.gui3.Apps3
- Direct Known Subclasses:
DecoderPro3,LccPro,MDI,Paned
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 Summary
FieldsModifier and TypeFieldDescription(package private) static JComponent(package private) static boolean(package private) static AWTEventListener(package private) static booleanprotected JmriJFrame(package private) static SplashWindowFields inherited from class apps.AppsBase
configDeferredLoadOK, configOK, preferenceFileExists -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JComponentProvide access to a place where applications can expect the configuration code to build run-time buttons.protected voidConfigure theProfileto use for this application.voidprotected abstract voidprotected voidprotected voidvoidstatic voidInitial actions before frame is created, invoked in the applications main() routine.protected voidInvoked to load the preferences information, and in the process configure the system.protected static voidFor compatability with adding in buttons to the toolbar using the existing createbuttonmodelprotected voidsetFloating(JToolBar toolBar) Set a toolbar to be initially floating.protected static voidsplash(boolean show) protected static voidsplash(boolean show, boolean debug) protected static JPanelprotected voidstart()Final actions before releasing control of app to userprotected static voidprotected booleanTo be overridden by applications that need to make additional checks as to whether the first time wizard should be launched.Methods inherited from class apps.AppsBase
getConfigFileName, handleQuit, handleRestart, installConfigurationManager, installManagers, setConfigFilename, setJmriSystemProperty
-
Field Details
-
_buttonSpace
-
mainFrame
-
sp
-
debugListener
-
debugFired
-
debugmsg
-
-
Constructor Details
-
Apps3
Create and initialize the application object.Expects initialization from preInit() to already be done.
- Parameters:
applicationName- application nameconfigFileDef- default configuration file nameargs- command line arguments set at application launch
-
-
Method Details
-
preInit
Initial actions before frame is created, invoked in the applications main() routine.- Operations from
AppsBase.preInit(String) - Initialize the console support
- Parameters:
applicationName- application name
- Operations from
-
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
For compatability with adding in buttons to the toolbar using the existing createbuttonmodel -
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
-
createAndDisplayFrame
-
setFloating
Set a toolbar to be initially floating. This doesn't quite work right.- Parameters:
toolBar- the toolbar to float
-
displayMainFrame
-
start
Final actions before releasing control of app to user -
splash
-
splash
-
splashDebugMsg
-
startupDebug
-
initMacOSXMenus
-
configureProfile
Configure theProfileto use for this application.Overrides super() method so dialogs can be displayed.
- Overrides:
configureProfilein classAppsBase
-
setAndLoadPreferenceFile
Description copied from class:AppsBaseInvoked 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
ConfigureManagerfrom theInstanceManager - 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
- Overrides:
setAndLoadPreferenceFilein classAppsBase
- Locate the preferences file based through
-