|
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.DataFileSettings
public class DataFileSettings
Encapsulates the settings concerned with reading the data file, the update frequency and the caching method.
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: DataFileSettings.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.
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 settings. |
Constructor Summary | |
---|---|
DataFileSettings()
Creates a new data file settings object with the default settings values. |
|
DataFileSettings(java.lang.String fileName)
Creates a new data file settings object and loads the settings values from the specified file. |
Method Summary | |
---|---|
java.lang.String |
getDataFile()
Gets the data file. |
boolean |
getDoNotCacheData()
Gets whether the data stream should not be cached in memory. |
boolean |
getShowOnlyTailData()
Gets whether to plot only tail data. |
long |
getUpdateFrequency()
Gets the interval between automatic graph updates. |
boolean |
load(java.lang.String fileName)
Loads the settings from a specified file. |
boolean |
save(java.lang.String fileName)
Saves the settings to a specified file. |
void |
setDataFile(java.lang.String fn)
Sets the data file. |
void |
setDoNotCacheData(boolean v)
Sets whether the data stream should not be cached in memory. |
void |
setShowOnlyTailData(boolean v)
Setts whether to plot only tail data. |
void |
setUpdateFrequency(long f)
Sets the interval between automatic graph updates. |
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 DataFileSettings()
public DataFileSettings(java.lang.String fileName)
fileName
- File to load the settings from.Method Detail |
---|
public boolean load(java.lang.String fileName)
fileName
- The file to load the settings 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 java.lang.String getDataFile()
public void setDataFile(java.lang.String fn)
fn
- Name of the data stream to plot.public boolean getShowOnlyTailData()
true
if only the datasets at the end of the data setream should be plotted,
false
if data sets should be sampled from the complete data stream.public void setShowOnlyTailData(boolean v)
v
- true
if only the datasets at the end of the data setream should be plotted,
false
if data sets should be sampled from the complete data stream.public boolean getDoNotCacheData()
true
if the data stream should be read from the start each time the graph is updated,
false
if data should be cached in memory and only the new data sets should be read on each update.public void setDoNotCacheData(boolean v)
v
- true
if the data stream should be read from the start each time the graph is updated,
false
if data should be cached in memory and only the new data sets should be read on each update.public long getUpdateFrequency()
< 1
no automatic update should be initiated.public void setUpdateFrequency(long f)
f
- The number of milliseconds to wait between trying to read from the data stream next time.
Pass a value f < 1
to indicate that no automatic update should be initiated.
|
LiveGraph data visualisation and analysis framework |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |