|
LiveGraph data visualisation and analysis framework |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LiveGraph.LiveGraph
public class LiveGraph
This is the main executable class of the LiveGraph plotter application. An instance of this class represents the application itself. The tasks of this class is to interpret the command line parameters, to set-up and to start-up the GUI and the back-end of the application, and to provide some functions which are used by different modules of the application to communicate with each other and to access global data, such as settings.
This product includes software developed by the
LiveGraph project and its contributors.
(http://www.live-graph.org)
Copyright (c) 2007 G. Paperin.
All rights reserved.
File: LiveGraph.java
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following terms and conditions are met:
1. Redistributions of source code must retain the above
acknowledgement of the LiveGraph project and its web-site, the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above acknowledgement of the
LiveGraph project and its web-site, the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with
the distribution.
3. All advertising materials mentioning features or use of this software or any derived
software must display the following acknowledgement:
This product includes software developed by the LiveGraph project and its
contributors.
(http://www.live-graph.org)
4. All advertising materials distributed in form of HTML pages or any other technology
permitting active hyper-links that mention features or use of this software or any
derived software must display the acknowledgment specified in condition 3 of this
agreement, and in addition, include a visible and working hyper-link to the LiveGraph
homepage (http://www.live-graph.org).
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Nested Class Summary | |
---|---|
private class |
LiveGraph.UncaughtExceptionHandler
|
Field Summary | |
---|---|
private static LiveGraph |
app
Singleton application instance. |
private DataFileSettings |
dataFileSettings
Holds the data file settings for the application. |
private DataFileSettingsWindow |
dataFileSettingsWindow
GUI window for data file settings. |
private GraphExporter |
graphExporter
Holds the graph exporter. |
private GraphSettings |
graphSettings
Holds the graph settings for the application. |
private GraphSettingsWindow |
graphSettingsWindow
GUI window for graph settings. |
private MainWindow |
mainWindow
Main GUI window of the application. |
private PlotWindow |
plotWindow
GUI window for the actual graph plot. |
private DataSeriesSettings |
seriesSettings
Holds the data series settings for the application. |
private SeriesSettingsWindow |
seriesSettingsWindow
GUI window for data series settings. |
private UpdateInvoker |
updateInvoker
Application's data update invoker. |
static java.lang.String |
version
LiveGraph software version. |
Constructor Summary | |
---|---|
LiveGraph()
|
Method Summary | |
---|---|
static LiveGraph |
application()
Singleton application access method. |
void |
disposeGUIAndExit()
This method is called by the main window when it is closed. |
void |
exec(java.lang.String[] args)
Main program method. |
DataFileSettings |
getDataFileSettings()
Gets the application's global data file settings. |
DataSeriesSettings |
getDataSeriesSettings()
Gets the application's global data series settings. |
GraphExporter |
getGraphExporter()
|
GraphSettings |
getGraphSettings()
Gets the application's global graph settings. |
private java.lang.String |
getInitialSettingsFiles(java.lang.String[] args,
java.util.Map<java.lang.String,java.lang.String> startupFiles)
Parses the command line arguments for file names for initial settings and combines the results with default settings file names. |
private java.lang.String |
getInitialSettingsFromCommandLine(java.lang.String[] args,
java.util.Map<java.lang.String,java.lang.String> startupFiles)
Parses the command line arguments for file names for initial settings. |
java.lang.String |
getJavaSpecificationVersion()
Determines the current Java specification version. |
void |
initiateDataUpdate()
Causes the next data update. |
private void |
installUncaughtExceptionHandler()
|
void |
logErrorLn(java.lang.Object o)
Prints an error message to the main window message area. |
void |
logInfoLn(java.lang.Object o)
Prints an info message to the main window message area. |
void |
logSuccessLn(java.lang.Object o)
Prints an success message to the main window message area. |
static void |
main(java.lang.String[] args)
Program entry point. |
boolean |
runsCorrectJavaVersion()
Determines whether the currect Java version is appropriate. |
private void |
setDefaultInitialSettingsFiles(java.util.Map<java.lang.String,java.lang.String> startupFiles)
If some settings were not specified to be loaded from a file via the command line, this method is used to specify default files for loading the settings, provided the defualt files exist. |
void |
setDisplayDataFileSettingsWindow(boolean state)
Displays or hides the data file settings window. |
void |
setDisplayGraphSettingsWindow(boolean state)
Displays or hides the graph settings window. |
void |
setDisplayPlotWindow(boolean state)
Displays or hides plot window. |
void |
setDisplaySeriesSettingsWindow(boolean state)
Displays or hides the data series settings window. |
private java.lang.String |
tryParseCommandLineArgument(java.lang.String flag,
java.lang.String filename,
java.util.Map<java.lang.String,java.lang.String> startupFiles)
Processes two consecutive command line parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String version
private static LiveGraph app
private UpdateInvoker updateInvoker
private MainWindow mainWindow
private DataFileSettingsWindow dataFileSettingsWindow
private GraphSettingsWindow graphSettingsWindow
private SeriesSettingsWindow seriesSettingsWindow
private PlotWindow plotWindow
private DataFileSettings dataFileSettings
private GraphSettings graphSettings
private DataSeriesSettings seriesSettings
private GraphExporter graphExporter
Constructor Detail |
---|
public LiveGraph()
Method Detail |
---|
public static LiveGraph application()
public static void main(java.lang.String[] args)
exec(String[])
method.
args
- Command line parameters.public void exec(java.lang.String[] args)
args
- Command line arguments.public java.lang.String getJavaSpecificationVersion()
"unknown"
if it could not be obtained.public boolean runsCorrectJavaVersion()
java.specification.version
. Java version 1.6
or higher is considered ok.
private java.lang.String getInitialSettingsFiles(java.lang.String[] args, java.util.Map<java.lang.String,java.lang.String> startupFiles)
args
- Command line arguments.startupFiles
- A table to hold the results.
null
if no error occured or the error message if there was an error (e.g. incorrect
command line arguments).private java.lang.String getInitialSettingsFromCommandLine(java.lang.String[] args, java.util.Map<java.lang.String,java.lang.String> startupFiles)
args
- Command line arguments.startupFiles
- A table to hold the results.
null
if no error occured or the error message if there was an error (e.g. incorrect
command line arguments).private java.lang.String tryParseCommandLineArgument(java.lang.String flag, java.lang.String filename, java.util.Map<java.lang.String,java.lang.String> startupFiles)
flag
- Flag specifier command line parameter.filename
- Filename specifier command line parameter.startupFiles
- A table to hold the results.
null
if no error occured or the error message if there was an error (e.g. incorrect
command line arguments).private void setDefaultInitialSettingsFiles(java.util.Map<java.lang.String,java.lang.String> startupFiles)
startupFiles
- A table to hold the results.public void logInfoLn(java.lang.Object o)
o
- The message.public void logErrorLn(java.lang.Object o)
o
- The message.public void logSuccessLn(java.lang.Object o)
o
- The message.public void setDisplayDataFileSettingsWindow(boolean state)
state
- Whether to display (true
) or to hide (false
).public void setDisplayGraphSettingsWindow(boolean state)
state
- Whether to display (true
) or to hide (false
).public void setDisplaySeriesSettingsWindow(boolean state)
state
- Whether to display (true
) or to hide (false
).public void setDisplayPlotWindow(boolean state)
state
- Whether to display (true
) or to hide (false
).public void disposeGUIAndExit()
public DataFileSettings getDataFileSettings()
public GraphSettings getGraphSettings()
public DataSeriesSettings getDataSeriesSettings()
public GraphExporter getGraphExporter()
public void initiateDataUpdate()
private void installUncaughtExceptionHandler()
|
LiveGraph data visualisation and analysis framework |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |