|
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.settings.ObservableSettings
org.LiveGraph.settings.GraphSettings
public class GraphSettings
Encapsulates settings concerned with the data graphs and the plot canvas.
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: GraphSettings.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 | |
---|---|
static class |
GraphSettings.HGridType
Possible types for the horizontal grid. |
static class |
GraphSettings.VGridType
Possible types for the vertical grid. |
static class |
GraphSettings.XAxisType
Possible types for the x-axis. |
Field Summary | |
---|---|
private static java.util.Properties |
defaultValues
Default settings. |
static java.lang.String |
preferredFileExtension
Standard file extension. |
private java.util.Properties |
values
Holds the current graph settings. |
Constructor Summary | |
---|---|
GraphSettings()
Creates a new graph settings object with the default settings. |
|
GraphSettings(java.lang.String fileName)
Creates a new graph settings object and loads the settings from the specified file. |
Method Summary | |
---|---|
private void |
checkDisableHighlightingForOldJava()
If the Java version is too old, data point highlighting is disabled. |
java.awt.Color |
getHGridColour()
Gets the colour for drawing the horizontal grid bars. |
double |
getHGridSize()
Gets the interval between the horizontal grib bars. |
GraphSettings.HGridType |
getHGridType()
Gets the horizontal grid type. |
boolean |
getHighlightDataPoints()
Gets whether the data points in the vicinity of the mouse cursor should be highlighted. |
double |
getMaxX()
Gets the maximum X value for the plot viewport. |
double |
getMaxY()
Gets the maximum Y value for the plot viewport. |
double |
getMinX()
Gets the minimum X value for the plot viewport. |
double |
getMinY()
Gets the minimum Y value for the plot viewport. |
java.awt.Color |
getVGridColour()
Gets the colour to use for drawing the vertical grid bars. |
double |
getVGridSize()
Gets the interval between the vertical grid bars. |
GraphSettings.VGridType |
getVGridType()
Sets the vertical grid type. |
double |
getXAxisScaleValue()
Gets the scale parameter to use with the type XAxis_DataValScaledSet for
scaling of X values. |
int |
getXAxisSeriesIndex()
Gets the index of the data series to use as the x-axis. |
GraphSettings.XAxisType |
getXAxisType()
Gets the type for the x-axis. |
boolean |
load(java.lang.String fileName)
Loads the settings from the specified file. |
boolean |
save(java.lang.String fileName)
Saves the settings to a specified file. |
void |
setHGridColour(java.awt.Color c)
Sets the colour for drawing the horizontal grid bars. |
void |
setHGridSize(double val)
Sets the interval between the horizontal grib bars. |
void |
setHGridType(GraphSettings.HGridType v)
Sets the horizontal grid type. |
void |
setHighlightDataPoints(boolean v)
Gets whether the data points in the vicinity of the mouse cursor should be highlighted. |
void |
setMaxX(double v)
Sets the maximum X value for the plot viewport. |
void |
setMaxY(double v)
Sets the maximum Y value for the plot viewport. |
void |
setMinX(double v)
Sets the minimum X value for the plot viewport. |
void |
setMinY(double v)
Sets the minimum Y value for the plot viewport. |
void |
setVGridColour(java.awt.Color c)
Sets the colour to use for drawing the vertical grid bars. |
void |
setVGridSize(double val)
Sets the interval between the vertical grid bars. |
void |
setVGridType(GraphSettings.VGridType v)
Gets the vertical grid type. |
void |
setXAxisScaleValue(double val)
Sets the scale parameter to use with the type XAxis_DataValScaledSet for
scaling of X values. |
void |
setXAxisSeriesIndex(int val)
Sets the index of the data series to use as the x-axis. |
void |
setXAxisType(GraphSettings.XAxisType v)
Sets the type for the x-axis. |
Methods inherited from class org.LiveGraph.settings.ObservableSettings |
---|
addObserver, countObservers, hasObserver, notifyObservers, notifyObservers, removeObserver |
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 preferredFileExtension
private static final java.util.Properties defaultValues
private java.util.Properties values
Constructor Detail |
---|
public GraphSettings()
public GraphSettings(java.lang.String fileName)
fileName
- File to load the settigs from.Method Detail |
---|
public boolean load(java.lang.String fileName)
fileName
- File to load the settigs from.
true
if the settings were loaded, false
if an exception occured.public boolean save(java.lang.String fileName)
fileName
- The file to save the settings to.
true
if the settings were saved, false
if an exception occured.public double getMinY()
java.lang.Double.NaN
if the current global minimum of all data series
should be used instead.public void setMinY(double v)
v
- The minimum value along the Y axis for the graph view
or java.lang.Double.NaN
if the global minimum of all data series
should be used at all times.public double getMaxY()
java.lang.Double.NaN
if the current global maximum of all data series
should be used instead.public void setMaxY(double v)
v
- The maximum value along the Y axis for the graph view
or java.lang.Double.NaN
if the global maximum of all data series
should be used at all times.public double getMinX()
java.lang.Double.NaN
if the currently smallest X value of all data series
should be used instead.public void setMinX(double v)
v
- The minimum value along the X axis for the graph view
or java.lang.Double.NaN
if the smallest X value of all data series
should be used at all times.public double getMaxX()
java.lang.Double.NaN
if the currently largest X value of all data series
should be used instead.public void setMaxX(double v)
v
- The maximum value along the X axis for the graph view
or java.lang.Double.NaN
if the largest X value of all data series
should be used at all times.public GraphSettings.VGridType getVGridType()
public void setVGridType(GraphSettings.VGridType v)
v
- The vertical grid type.public double getVGridSize()
public void setVGridSize(double val)
val
- The interval between the vertical grid bars.public java.awt.Color getVGridColour()
public void setVGridColour(java.awt.Color c)
c
- The colour to use for drawing the vertical grid bars.public GraphSettings.HGridType getHGridType()
public void setHGridType(GraphSettings.HGridType v)
v
- The horizontal grid type.public double getHGridSize()
public void setHGridSize(double val)
val
- The interval between the horizontal grib bars.public java.awt.Color getHGridColour()
public void setHGridColour(java.awt.Color c)
c
- The colour for drawing the horizontal grid bars.public GraphSettings.XAxisType getXAxisType()
public void setXAxisType(GraphSettings.XAxisType v)
v
- The type for the x-axis.public int getXAxisSeriesIndex()
public void setXAxisSeriesIndex(int val)
val
- The index of the data series to use as the x-axis.public double getXAxisScaleValue()
XAxis_DataValScaledSet
for
scaling of X values.
XAxis_DataValScaledSet
for
scaling of X values.public void setXAxisScaleValue(double val)
XAxis_DataValScaledSet
for
scaling of X values.
val
- scale parameter to use with the type XAxis_DataValScaledSet
for
scaling of X values.public boolean getHighlightDataPoints()
true
if the data points in the vicinity of the mouse cursor should be highlighted,
false
otherwise.public void setHighlightDataPoints(boolean v)
v
- true
if the data points in the vicinity of the mouse cursor are to be highlighted,
false
otherwise.private void checkDisableHighlightingForOldJava()
|
LiveGraph data visualisation and analysis framework |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |