Package apps.gui3
Class Apps3
- java.lang.Object
-
- apps.AppsBase
-
- apps.gui3.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.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static javax.swing.JComponent
_buttonSpace
(package private) static boolean
debugFired
(package private) static java.awt.event.AWTEventListener
debugListener
(package private) static boolean
debugmsg
protected JmriJFrame
mainFrame
(package private) static SplashWindow
sp
-
Fields inherited from class apps.AppsBase
configDeferredLoadOK, configOK, preferenceFileExists
-
-
Constructor Summary
Constructors Constructor Description Apps3(java.lang.String applicationName, java.lang.String configFileDef, java.lang.String[] args)
Create and initialize the application object.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static javax.swing.JComponent
buttonSpace()
Provide access to a place where applications can expect the configuration code to build run-time buttons.protected void
configureProfile()
Configure theProfile
to use for this application.void
createAndDisplayFrame()
protected abstract void
createMainFrame()
protected void
displayMainFrame(java.awt.Dimension d)
protected void
initMacOSXMenus()
static void
preInit(java.lang.String applicationName)
Initial actions before frame is created, invoked in the applications main() routine.protected void
setAndLoadPreferenceFile()
Invoked to load the preferences information, and in the process configure the system.protected static void
setButtonSpace()
For compatability with adding in buttons to the toolbar using the existing createbuttonmodelprotected void
setFloating(javax.swing.JToolBar toolBar)
Set a toolbar to be initially floating.protected static void
splash(boolean show)
protected static void
splash(boolean show, boolean debug)
protected static javax.swing.JPanel
splashDebugMsg()
protected void
start()
Final actions before releasing control of app to userprotected static void
startupDebug()
-
Methods inherited from class apps.AppsBase
getConfigFileName, handleQuit, handleRestart, installConfigurationManager, installManagers, setConfigFilename, setJmriSystemProperty
-
-
-
-
Field Detail
-
_buttonSpace
static javax.swing.JComponent _buttonSpace
-
mainFrame
protected JmriJFrame mainFrame
-
sp
static SplashWindow sp
-
debugListener
static java.awt.event.AWTEventListener debugListener
-
debugFired
static boolean debugFired
-
debugmsg
static boolean debugmsg
-
-
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 nameconfigFileDef
- default configuration file nameargs
- 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.- Operations from
AppsBase.preInit(String)
- Initialize the console support
- Parameters:
applicationName
- application name
- Operations from
-
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
-
createMainFrame
protected abstract void createMainFrame()
-
createAndDisplayFrame
public void createAndDisplayFrame()
-
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
-
displayMainFrame
protected void displayMainFrame(java.awt.Dimension d)
-
start
protected void start()
Final actions before releasing control of app to user
-
splash
protected static void splash(boolean show)
-
splash
protected static void splash(boolean show, boolean debug)
-
splashDebugMsg
protected static javax.swing.JPanel splashDebugMsg()
-
startupDebug
protected static void startupDebug()
-
initMacOSXMenus
protected void initMacOSXMenus()
-
configureProfile
protected void configureProfile()
Configure theProfile
to use for this application.Overrides super() method so dialogs can be displayed.
- Overrides:
configureProfile
in classAppsBase
-
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 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:
setAndLoadPreferenceFile
in classAppsBase
- Locate the preferences file based through
-
-