public class ApplicationStarter extends SwingWorker<Void,Void> implements IApplicationStarter
ApplicationStarter is responsible for initializing the
configuration, constructing the GUI elements and starting off various
background tasks, while the main thread is displaying the startup splash
screen.SwingWorker.StateValue| Modifier and Type | Field and Description |
|---|---|
protected ConfigManager |
configManager |
private static org.apache.log4j.Logger |
logger |
protected String |
versionNumber |
protected WelcomeDialog |
welcomeDialog |
| Constructor and Description |
|---|
ApplicationStarter(String versionNumber,
boolean isCore)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Void |
doInBackground()
Constructs the GUI elements and initializes the configuration.
|
protected void |
done()
Run the garbage collector at the end of construction.
|
ConfigManager |
getConfigManager() |
String |
getVersionNumber() |
WelcomeDialog |
getWelcomeDialog() |
protected void |
initApplication()
This method initializes global application properties and sets globally
available variables.
|
protected void |
initConfiguration()
Check configuration before initial startup.
|
protected void |
loadPlugins() |
protected void |
runCleanerTaskThread()
This method starts the background thread for the customized garbage
collector.
|
void |
setConfigManager(ConfigManager configManager) |
protected void |
setJAIDefaultOptions()
This method sets the default JAI Tile calculation properties
|
void |
setVersionNumber(String versionNumber) |
void |
setWelcomeDialog(WelcomeDialog welcomeDialog) |
protected void |
startMemoryMonitorThread() |
void |
updateDynamicWelcomeText(String text)
Sets a text to the dynamic label in
WelcomeDialog. |
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgressprivate static final org.apache.log4j.Logger logger
protected String versionNumber
protected ConfigManager configManager
protected WelcomeDialog welcomeDialog
public ApplicationStarter(String versionNumber, boolean isCore)
versionNumber - - the running number of IQMisCore - - core = true, extended = falseprotected Void doInBackground() throws Exception
doInBackground in class SwingWorker<Void,Void>ExceptionSwingWorker.doInBackground()protected void startMemoryMonitorThread()
protected void done()
done in class SwingWorker<Void,Void>SwingWorker.done()protected void initApplication()
throws Exception
version - Exceptionprotected void setJAIDefaultOptions()
protected void initConfiguration()
protected void runCleanerTaskThread()
public void updateDynamicWelcomeText(String text)
WelcomeDialog.updateDynamicWelcomeText in interface IApplicationStartertext - public String getVersionNumber()
public ConfigManager getConfigManager()
public void setVersionNumber(String versionNumber)
versionNumber - the versionNumber to setpublic void setConfigManager(ConfigManager configManager)
configManager - the configManager to setpublic WelcomeDialog getWelcomeDialog()
public void setWelcomeDialog(WelcomeDialog welcomeDialog)
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.