de.unidu.is.gnuplot
Class FileSource

java.lang.Object
  extended byde.unidu.is.gnuplot.Source
      extended byde.unidu.is.gnuplot.FileSource
Direct Known Subclasses:
DataSource

public class FileSource
extends Source

An class describing a single plot curve, defined by a data file for the gnuplot plot.

Since:
2003-07-26
Version:
$Revision: 1.6 $, $Date: 2005/02/21 17:29:19 $
Author:
Henrik Nottelmann

Field Summary
protected  java.lang.String filename
          The name (absolute or relative) of the data output file.
protected  boolean nosmooth
          Flag indicating if the curve has to be smoothed.
 
Fields inherited from class de.unidu.is.gnuplot.Source
max, min, title
 
Constructor Summary
FileSource(java.lang.String title, java.io.File file)
          Creates a new instance.
FileSource(java.lang.String title, java.lang.String filename)
          Creates a new instance.
 
Method Summary
 java.lang.String getCommand()
          Creates the datafile and returns a gnuplot expression defining the data file for the gnuplot plot command (with smooth unique is set).
 java.lang.String getFilename()
          Returns the name (absolute or relative) of the data output file.
 boolean isSmooth()
          Tests whether the curve has to be smoothed.
 void setFilename(java.lang.String filename)
          Sets the name (absolute or relative) of the data output file.
 void setSmooth(boolean smooth)
          Specifies whether the curve has to be smoothed.
 
Methods inherited from class de.unidu.is.gnuplot.Source
getMax, getMin, getTitle, setMax, setMin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

protected java.lang.String filename
The name (absolute or relative) of the data output file.


nosmooth

protected boolean nosmooth
Flag indicating if the curve has to be smoothed.

Constructor Detail

FileSource

public FileSource(java.lang.String title,
                  java.lang.String filename)
Creates a new instance.

Parameters:
title - title of this curve, or null
filename - name of the corresponding file with data points

FileSource

public FileSource(java.lang.String title,
                  java.io.File file)
Creates a new instance.

Parameters:
title - title of this curve, or null
file - corresponding file with data points
Method Detail

setFilename

public void setFilename(java.lang.String filename)
Sets the name (absolute or relative) of the data output file.

Parameters:
filename - name of the data output file

getFilename

public java.lang.String getFilename()
Returns the name (absolute or relative) of the data output file.

Returns:
name of the data output file

setSmooth

public void setSmooth(boolean smooth)
Specifies whether the curve has to be smoothed.

Parameters:
smooth - if true, the curve will be smoothed

isSmooth

public boolean isSmooth()
Tests whether the curve has to be smoothed.

Returns:
true if the curve has to be smoothed

getCommand

public java.lang.String getCommand()
Creates the datafile and returns a gnuplot expression defining the data file for the gnuplot plot command (with smooth unique is set).

Specified by:
getCommand in class Source
Returns:
gnuplot expression defining the function or data file