Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jplot
Class GraphPars  view GraphPars download GraphPars.java

java.lang.Object
  extended byjplot.DataChangeListener
      extended byjplot.GraphPars

public class GraphPars
extends DataChangeListener

GraphPars contains the parameters which are used to draw the graph such as number of tics, scaling values, offset parameters, axis lengths etc. All these parameters are settable by the GUI, and written to this class. Class Graph reads this class and draws the graph based on these parameters.


Field Summary
 java.awt.Color actualColor
           
private  float[] additioner
           
(package private) static int AUTO
           
private  boolean[] autoRange
           
private  java.awt.Color axesColor
           
private  double axesRatio
           
private  java.awt.Color backgroundColor
           
private  double bottomMargin
           
private  java.awt.Color boxColor
           
private  java.awt.Color boxFillColor
           
private  float boxOffset
           
(package private) static java.awt.Color[] color
           
 int colorIndex
           
private  int colorMode
           
static float[] dashLengths
           
(package private) static int DISABLE
           
(package private) static int ENABLE
           
private  boolean fontChanged
           
private  float[] globalDivider
           
private  float[] globalOffset
           
private  java.awt.Color graphBgColor
           
private  int graphStyle
           
private  int graphType
           
static int GRAPHTYPE_2D
           
static int GRAPHTYPE_MULTI
           
static int GRAPHTYPE_PIPER
           
private  boolean[] grid
           
private  java.awt.Color gridColor
           
(package private) static double INF
           
private  double[] inv
           
private  boolean[] isLogarithmic
           
private  java.awt.Color[] labelColor
           
private  java.util.Vector labels
           
private  double leftMargin
           
private  java.awt.Font legendFont
           
private  double[] legendPos
           
private  double legendSpacing
           
private  java.lang.String lf
           
private  int maxNumberOfTics
           
private  double[] maxValue
           
private  double[] minValue
           
private  boolean[] mirrorTics
           
private  float[] multiplier
           
(package private) static int NAXES
           
(package private) static int NO_LINE
           
(package private) static int NO_SYMBOL
           
private  int[] numberTics
           
private  java.awt.Dimension panelSize
           
private  boolean[] plotAxis
           
private  boolean plotBox
           
private  boolean plotInner
           
private  boolean[] plotMirrorAxis
           
private  boolean[] plotTicLabels
           
private  boolean[] plotTics
           
 int pointIndex
           
private  int pointMode
           
private  double rightMargin
           
private  boolean[] rotateTics
           
private  boolean[] rotTics
           
private  boolean shadow
           
private  float tdsFac
           
private  java.awt.Color[] ticColor
           
private  java.awt.Font[] ticFont
           
private  double[] ticLength
           
private  java.awt.Color titleColor
           
private  boolean toFront
           
private  double topMargin
           
private  java.awt.Color triangleFillColor
           
private  boolean updatePlot
           
private  boolean useLegend
           
private  boolean useLegendPosition
           
private  boolean[] useNumberOfTics
           
private  boolean useRatio
           
private  boolean useTds
           
(package private) static int X_AXIS
           
(package private) static int Y_AXIS
           
(package private) static int Z_AXIS
           
 
Fields inherited from class jplot.DataChangeListener
changed, frame, frameTitle, titleName
 
Constructor Summary
GraphPars(javax.swing.JFrame f)
          Principal constructor.
 
Method Summary
 void addLabel(GraphLabel newgl)
          Add a label or, if already in the list, replaces a label with the current one.
(package private)  boolean drawAxis(int axis)
          Returns whether an axis will be drawn or not.
(package private)  boolean drawGrid(int axis)
          Returns true if the grid should be drawn.
(package private)  boolean drawLegend()
           
(package private)  boolean drawMirrorAxis(int axis)
          Returns whether the mirror of an axis will be drawn or not.
(package private)  boolean drawMirrorTics(int axis)
          Returns whether or not we should draw tics on the mirror axis.
(package private)  boolean drawShadow()
          Returns whether or not a shadow will be drawn at the panel border.
 boolean drawTds()
           
(package private)  boolean drawTicLabels(int axis)
          Returns whether or not to draw tic labels.
(package private)  boolean drawTics(int axis)
          Returns whether or not to draw tics.
(package private)  float getAdditioner(int axis)
           
(package private)  java.awt.Color getAxesColor()
          Returns the actual color of the axes of the graph.
(package private)  double getAxesRatio()
          Returns the ratio between X- and Y-axes lengths.
(package private)  java.awt.Color getBackgroundColor()
          Returns the actual background color of the graph.
private  boolean getBoolean(java.util.StringTokenizer st)
           
(package private)  double getBottomMargin()
          Returns the distance between the lower panel border and the bottom X-axis.
 java.awt.Color getBoxColor()
           
 java.awt.Color getBoxFillColor()
           
 float getBoxOffset()
           
private  java.awt.Color getColor(java.util.StringTokenizer st)
           
(package private)  int getColorMode()
          Returns the mode used to assign colors to the curves.
(package private)  java.awt.Dimension getDimension()
           
private  java.awt.Dimension getDimension(java.util.StringTokenizer st)
           
private  double getDouble(java.util.StringTokenizer st)
           
private  float getFloat(java.util.StringTokenizer st)
           
private  java.awt.Font getFont(java.util.StringTokenizer st)
           
(package private)  float getGlobalDivider(int axis)
           
(package private)  float getGlobalOffset(int axis)
           
 java.awt.Color getGraphBackgroundColor()
           
(package private)  int getGraphStyle()
          Returns the current line style.
(package private)  int getGraphType()
          Returns the current graph type.
(package private)  java.awt.Color getGridColor()
           
 java.awt.Color getInnerColor()
          Returns the color used to fill the shaded triangles.
private  int getInteger(java.util.StringTokenizer st)
           
private  GraphLabel getLabel(java.util.StringTokenizer t, java.util.StringTokenizer str)
           
 java.util.Vector getLabels()
           
(package private)  double getLeftMargin()
          Returns the distance between the left panel border and the left Y-axis.
(package private)  java.awt.Font getLegendFont()
          Returns the font used by the legend
(package private)  double getLegendPos(int axis)
          Returns the x or y coordinates (defined in pixels, relative to the size of the panel showing the graph) of the legend.
 double getLegendSpacing()
          Returns the vertical spacing, between each line of the legend.
(package private)  int getMaxNumberOfTics()
           
(package private)  double getMaxValue(int axis)
           
(package private)  double getMinValue(int axis)
           
(package private)  float getMultiplier(int axis)
           
(package private)  int getNumberOfTics(int axis)
          Returns the number of tics for the specfied axis.
(package private)  int getPanelHeight()
           
(package private)  int getPanelWidth()
           
(package private)  int getPointMode()
          Returns true if the points should be drawn.
(package private)  double getRightMargin()
          Returns the distance between the right panel border and the right Y-axis.
 java.lang.String getSettings()
          Return the current parameter settings in a string.
private  java.lang.String getString(java.util.StringTokenizer st)
           
 float getTdsFactor()
           
 java.awt.Color getTicColor(int axis)
          Returns the color used by the labels drawn at each tic
 java.awt.Font getTicFont(int axis)
          Returns the font used by the labels drawn at each tic
(package private)  double getTicLength(int axis)
           
(package private)  double getTopMargin()
          Returns the distance between the upper panel border and the top X-axis.
(package private)  boolean gridToFront()
           
private  void parseBoolean(java.util.StringTokenizer st, boolean[] a)
           
private  void parseColor(java.util.StringTokenizer st, java.awt.Color[] a)
           
private  void parseDouble(java.util.StringTokenizer st, double[] a)
           
private  void parseFloat(java.util.StringTokenizer st, float[] a)
           
private  void parseFont(java.util.StringTokenizer st, java.awt.Font[] a)
           
private  void parseInteger(java.util.StringTokenizer st, int[] a)
           
private  void parseString(java.util.StringTokenizer st, java.lang.String[] a)
           
 void reset()
          Resets the class to all the default values.
(package private)  void resetLabels()
          Reset the positions of all the labels.
(package private)  boolean rotateTics(int axis)
          Returns whether or not we should rotate the tics.
(package private)  void setAdditioner(int axis, float val)
          sets the additioner used to rescale all the data arrays.
(package private)  void setAutoRange(int axis, boolean b)
          Sets true or false to use automatic scaling.
(package private)  void setAxesColor(java.awt.Color color)
          Sets the actual color of the axes of the graph.
(package private)  void setAxesRatio(double r)
          Sets the ratio between X- and Y-axes lengths.
(package private)  void setBackgroundColor(java.awt.Color color)
          Sets the actual background color of the graph.
(package private)  void setBottomMargin(double bm)
          Sets the distance between the lower panel border and the bottom X-axis.
 void setBoxColor(java.awt.Color c)
          Sets the color of the bounding box drawn around a graph.
 void setBoxFillColor(java.awt.Color c)
          Sets the fill color of the bounding box drawn around a graph.
 void setBoxOffset(float f)
          Sets the offset of the bounding box drawn around a graph.
(package private)  void setColorMode(int b)
          Sets the way of defining the colors of the curves.
(package private)  void setDimension(java.awt.Dimension d)
          Sets the dimension of the panel of the graph.
(package private)  void setDrawAxis(int axis, boolean b)
          Sets whether an axis will be drawn or not.
(package private)  void setDrawGrid(int axis, boolean b)
          Sets whether or not using grid lines.
(package private)  void setDrawLegend(boolean b)
          Sets whether or not to draw the legend.
(package private)  void setDrawMirrorAxis(int axis, boolean b)
          Sets whether the mirror of an axis will be drawn or not.
(package private)  void setDrawMirrorTics(int axis, boolean b)
          Sets true or false to draw mirror tics
 void setDrawTds(boolean b)
          Sets whether the tds should be drawn or not.
(package private)  void setDrawTicLabels(boolean b)
          Sets whether all ticlabels will be written or not.
(package private)  void setDrawTicLabels(int axis, boolean b)
          Sets whether X, Y or Z ticlabels will be written or not.
(package private)  void setDrawTics(int axis, boolean b)
          Sets whether ticlabels will be written or not.
(package private)  void setGlobalDivider(int axis, float val)
          Sets a global divider used to rescale all the data arrays.
(package private)  void setGlobalOffset(int axis, float val)
          Sets a global offset used to rescale all the data arrays.
 void setGraphBackgroundColor(java.awt.Color c)
          Sets the background color of the graph.
(package private)  void setGraphStyle(int s)
          Sets the line drawing style for 2D graphs.
(package private)  void setGraphType(int s)
          Sets the graph type.
(package private)  void setGridColor(java.awt.Color c)
          Sets the color used by the grid.
(package private)  void setGridToFront(boolean b)
          sets whether or not to draw the grid at the front.
 void setInnerColor(java.awt.Color c)
          Sets the color used to fill the inner triangles.
 void setLabel(GraphLabel gl)
          Add a label or, if already in the list, replaces a label with the current one.
(package private)  void setLeftMargin(double lm)
          Sets the distance between the left panel border and the left Y-axis.
(package private)  void setLegendFont(java.awt.Font font)
          Sets the actual font of the legend.
(package private)  void setLegendPos(double x, double y)
          Sets the x and y coordinates (defined relative to the actual axes values) of the legend.
(package private)  void setLegendPos(int axis, double c)
          Sets the x or y coordinates (defined relative to the actual axes values) of the legend.
 void setLegendSpacing(double dy)
          Sets the vertical spacing, between each line of the legend.
(package private)  void setLogScale(int axis, boolean b)
          Sets true or false to plot on a log scale.
(package private)  void setMaxNumberOfTics(int n)
          Sets the maximum number of tics allowed.
(package private)  void setMaxValue(int axis, double x)
          Sets the maximum value of the X,Y or Z range.
(package private)  void setMinValue(int axis, double x)
          Sets the start-value of the value range.
(package private)  void setMultiplier(int axis, float val)
          sets the multiplier used to rescale all the data arrays.
(package private)  void setNumberOfTics(int axis, int n)
          Sets the number of tics for the specified axis.
(package private)  void setPointMode(int b)
          Sets whether or not plotting points
(package private)  void setRightMargin(double rm)
          Sets the distance between the right panel border and the right Y-axis.
(package private)  void setRotateTics(int axis, boolean b)
          Sets true or false to rotate tics
(package private)  void setShadow(boolean b)
          Defines whether or not a shadow will be drawn at the panel border.
 void setShowBox(boolean b)
          Sets whether or not to draw the bounding box.
 void setShowInner(boolean b)
          Sets whether or not to draw the filled triangles.
 void setTdsFactor(float f)
          Sets the factor used to plot a TDS circle.
 void setTicColor(int axis, java.awt.Color color)
          Sets the color used by the labels drawn at each tic
 void setTicFont(int axis, java.awt.Font font)
          Sets the font used by the labels drawn at each tic
(package private)  void setTicLength(int axis, double tl)
          Sets the length of the tics.
(package private)  void setTopMargin(double tm)
          Sets the distance between the upper panel border and the top X-axis.
(package private)  void setUpdateGraph(boolean b)
          Sets true or false to update the graph.
(package private)  void setUseAxesRatio(boolean b)
          Sets whether or not to use a fixed ratio between X- and Y-axes lengths.
(package private)  void setUseLegendPos(boolean b)
          Sets whether or not to set the legend position in X,Y coordinates as defined by the graph.
(package private)  void setUseNumberOfTics(int axis, boolean b)
          Sets wether the user defines the number of tics.
 boolean showBox()
           
 boolean showInner()
           
(package private)  boolean updateGraph()
          Returns whether or not we should update the graph.
 void updateSettings(java.lang.String settings)
          Update the current settings from some script.
(package private)  boolean useAutoRange(int axis)
          Returns whether or not we should use automatic scaling.
(package private)  boolean useAxesRatio()
          Returns the whether or not to use a fixed ratio between X- and Y-axes lengths.
(package private)  boolean useLegendPos()
           
(package private)  boolean useLogScale(int axis)
          Returns whether or not to plot using a logarithmic scale.
(package private)  boolean useNumberOfTics(int axis)
          Returns whether or not to use a user-defined number of tics.
 
Methods inherited from class jplot.DataChangeListener
dataChanged, getFrame, setDataChanged, setFrame, setTitleName, setTitleString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISABLE

static final int DISABLE
See Also:
Constant Field Values

ENABLE

static final int ENABLE
See Also:
Constant Field Values

AUTO

static final int AUTO
See Also:
Constant Field Values

color

static final java.awt.Color[] color

dashLengths

public static final float[] dashLengths

INF

static final double INF
See Also:
Constant Field Values

NAXES

static final int NAXES
See Also:
Constant Field Values

X_AXIS

static final int X_AXIS
See Also:
Constant Field Values

Y_AXIS

static final int Y_AXIS
See Also:
Constant Field Values

Z_AXIS

static final int Z_AXIS
See Also:
Constant Field Values

GRAPHTYPE_2D

public static final int GRAPHTYPE_2D
See Also:
Constant Field Values

GRAPHTYPE_PIPER

public static final int GRAPHTYPE_PIPER
See Also:
Constant Field Values

GRAPHTYPE_MULTI

public static final int GRAPHTYPE_MULTI
See Also:
Constant Field Values

NO_SYMBOL

static final int NO_SYMBOL
See Also:
Constant Field Values

NO_LINE

static final int NO_LINE
See Also:
Constant Field Values

colorIndex

public int colorIndex

pointIndex

public int pointIndex

actualColor

public java.awt.Color actualColor

panelSize

private java.awt.Dimension panelSize

leftMargin

private double leftMargin

rightMargin

private double rightMargin

bottomMargin

private double bottomMargin

topMargin

private double topMargin

ticLength

private double[] ticLength

maxNumberOfTics

private int maxNumberOfTics

numberTics

private int[] numberTics

useNumberOfTics

private boolean[] useNumberOfTics

plotTics

private boolean[] plotTics

rotateTics

private boolean[] rotateTics

mirrorTics

private boolean[] mirrorTics

plotTicLabels

private boolean[] plotTicLabels

labels

private java.util.Vector labels

axesRatio

private double axesRatio

plotAxis

private boolean[] plotAxis

plotMirrorAxis

private boolean[] plotMirrorAxis

rotTics

private boolean[] rotTics

inv

private double[] inv

backgroundColor

private java.awt.Color backgroundColor

axesColor

private java.awt.Color axesColor

labelColor

private java.awt.Color[] labelColor

titleColor

private java.awt.Color titleColor

legendFont

private java.awt.Font legendFont

useLegend

private boolean useLegend

useLegendPosition

private boolean useLegendPosition

legendPos

private double[] legendPos

legendSpacing

private double legendSpacing

isLogarithmic

private boolean[] isLogarithmic

autoRange

private boolean[] autoRange

minValue

private double[] minValue

maxValue

private double[] maxValue

multiplier

private float[] multiplier

additioner

private float[] additioner

globalDivider

private float[] globalDivider

globalOffset

private float[] globalOffset

ticFont

private java.awt.Font[] ticFont

ticColor

private java.awt.Color[] ticColor

grid

private boolean[] grid

gridColor

private java.awt.Color gridColor

toFront

private boolean toFront

shadow

private boolean shadow

useRatio

private boolean useRatio

triangleFillColor

private java.awt.Color triangleFillColor

plotInner

private boolean plotInner

plotBox

private boolean plotBox

boxOffset

private float boxOffset

graphBgColor

private java.awt.Color graphBgColor

boxFillColor

private java.awt.Color boxFillColor

boxColor

private java.awt.Color boxColor

updatePlot

private boolean updatePlot

fontChanged

private boolean fontChanged

pointMode

private int pointMode

colorMode

private int colorMode

graphType

private int graphType

graphStyle

private int graphStyle

tdsFac

private float tdsFac

useTds

private boolean useTds

lf

private final java.lang.String lf
Constructor Detail

GraphPars

public GraphPars(javax.swing.JFrame f)
Principal constructor. Builds the object with defaults values.

Method Detail

getDimension

java.awt.Dimension getDimension()

setDimension

void setDimension(java.awt.Dimension d)
Sets the dimension of the panel of the graph.


getPanelWidth

int getPanelWidth()

getPanelHeight

int getPanelHeight()

getLeftMargin

double getLeftMargin()
Returns the distance between the left panel border and the left Y-axis.


setLeftMargin

void setLeftMargin(double lm)
Sets the distance between the left panel border and the left Y-axis.


getRightMargin

double getRightMargin()
Returns the distance between the right panel border and the right Y-axis.


setRightMargin

void setRightMargin(double rm)
Sets the distance between the right panel border and the right Y-axis.


getBottomMargin

double getBottomMargin()
Returns the distance between the lower panel border and the bottom X-axis.


setBottomMargin

void setBottomMargin(double bm)
Sets the distance between the lower panel border and the bottom X-axis.


getTopMargin

double getTopMargin()
Returns the distance between the upper panel border and the top X-axis.


setTopMargin

void setTopMargin(double tm)
Sets the distance between the upper panel border and the top X-axis.


getTicLength

double getTicLength(int axis)

setTicLength

void setTicLength(int axis,
                  double tl)
Sets the length of the tics. In fact, the actual tic length is the value you set here multiplied by the axis length. By default, the tic-length is about 0.01 times the axis length.


setUseAxesRatio

void setUseAxesRatio(boolean b)
Sets whether or not to use a fixed ratio between X- and Y-axes lengths.


useAxesRatio

boolean useAxesRatio()
Returns the whether or not to use a fixed ratio between X- and Y-axes lengths.


getAxesRatio

double getAxesRatio()
Returns the ratio between X- and Y-axes lengths.


setAxesRatio

void setAxesRatio(double r)
Sets the ratio between X- and Y-axes lengths. This ratio must be greater than 0.0, a value of 0.0 means that the ratio will be calculated automatically as a function of the size of the panel, used to plot the graph.


setUseNumberOfTics

void setUseNumberOfTics(int axis,
                        boolean b)
Sets wether the user defines the number of tics. X- and Y-axes lengths.


useNumberOfTics

boolean useNumberOfTics(int axis)
Returns whether or not to use a user-defined number of tics.


getNumberOfTics

int getNumberOfTics(int axis)
Returns the number of tics for the specfied axis.


setNumberOfTics

void setNumberOfTics(int axis,
                     int n)
Sets the number of tics for the specified axis.


getMaxNumberOfTics

int getMaxNumberOfTics()

setMaxNumberOfTics

void setMaxNumberOfTics(int n)
Sets the maximum number of tics allowed. Setting this parameter may change the number of tics, but the exact number of tics is a function of the start- and end values of the data.


setMultiplier

void setMultiplier(int axis,
                   float val)
sets the multiplier used to rescale all the data arrays.


getMultiplier

float getMultiplier(int axis)

setGlobalDivider

void setGlobalDivider(int axis,
                      float val)
Sets a global divider used to rescale all the data arrays.


getGlobalDivider

float getGlobalDivider(int axis)

setGlobalOffset

void setGlobalOffset(int axis,
                     float val)
Sets a global offset used to rescale all the data arrays.


getGlobalOffset

float getGlobalOffset(int axis)

setAdditioner

void setAdditioner(int axis,
                   float val)
sets the additioner used to rescale all the data arrays.


getAdditioner

float getAdditioner(int axis)

getMinValue

double getMinValue(int axis)

setMinValue

void setMinValue(int axis,
                 double x)
Sets the start-value of the value range.


getMaxValue

double getMaxValue(int axis)

setMaxValue

void setMaxValue(int axis,
                 double x)
Sets the maximum value of the X,Y or Z range.


drawAxis

boolean drawAxis(int axis)
Returns whether an axis will be drawn or not.


setDrawAxis

void setDrawAxis(int axis,
                 boolean b)
Sets whether an axis will be drawn or not.


drawMirrorAxis

boolean drawMirrorAxis(int axis)
Returns whether the mirror of an axis will be drawn or not.


setDrawMirrorAxis

void setDrawMirrorAxis(int axis,
                       boolean b)
Sets whether the mirror of an axis will be drawn or not.


drawTicLabels

boolean drawTicLabels(int axis)
Returns whether or not to draw tic labels.


setDrawTicLabels

void setDrawTicLabels(boolean b)
Sets whether all ticlabels will be written or not.


setDrawTicLabels

void setDrawTicLabels(int axis,
                      boolean b)
Sets whether X, Y or Z ticlabels will be written or not.


drawTics

boolean drawTics(int axis)
Returns whether or not to draw tics.


setDrawTics

void setDrawTics(int axis,
                 boolean b)
Sets whether ticlabels will be written or not. You know, these little lines indicating the dimensions of your plot.


getBackgroundColor

java.awt.Color getBackgroundColor()
Returns the actual background color of the graph.


setBackgroundColor

void setBackgroundColor(java.awt.Color color)
Sets the actual background color of the graph.


getAxesColor

java.awt.Color getAxesColor()
Returns the actual color of the axes of the graph.


setAxesColor

void setAxesColor(java.awt.Color color)
Sets the actual color of the axes of the graph.


getLabels

public java.util.Vector getLabels()

addLabel

public void addLabel(GraphLabel newgl)
Add a label or, if already in the list, replaces a label with the current one.


setLabel

public void setLabel(GraphLabel gl)
Add a label or, if already in the list, replaces a label with the current one.


getTicFont

public java.awt.Font getTicFont(int axis)
Returns the font used by the labels drawn at each tic


setTicFont

public void setTicFont(int axis,
                       java.awt.Font font)
Sets the font used by the labels drawn at each tic


getTicColor

public java.awt.Color getTicColor(int axis)
Returns the color used by the labels drawn at each tic


setTicColor

public void setTicColor(int axis,
                        java.awt.Color color)
Sets the color used by the labels drawn at each tic


getLegendFont

java.awt.Font getLegendFont()
Returns the font used by the legend


setLegendFont

void setLegendFont(java.awt.Font font)
Sets the actual font of the legend.


drawLegend

boolean drawLegend()

setDrawLegend

void setDrawLegend(boolean b)
Sets whether or not to draw the legend.


getLegendPos

double getLegendPos(int axis)
Returns the x or y coordinates (defined in pixels, relative to the size of the panel showing the graph) of the legend.


setLegendPos

void setLegendPos(int axis,
                  double c)
Sets the x or y coordinates (defined relative to the actual axes values) of the legend.


setLegendPos

void setLegendPos(double x,
                  double y)
Sets the x and y coordinates (defined relative to the actual axes values) of the legend.


useLegendPos

boolean useLegendPos()

setUseLegendPos

void setUseLegendPos(boolean b)
Sets whether or not to set the legend position in X,Y coordinates as defined by the graph.


getLegendSpacing

public double getLegendSpacing()
Returns the vertical spacing, between each line of the legend.


setLegendSpacing

public void setLegendSpacing(double dy)
Sets the vertical spacing, between each line of the legend.


resetLabels

void resetLabels()
Reset the positions of all the labels.


useLogScale

boolean useLogScale(int axis)
Returns whether or not to plot using a logarithmic scale.


setLogScale

void setLogScale(int axis,
                 boolean b)
Sets true or false to plot on a log scale.


useAutoRange

boolean useAutoRange(int axis)
Returns whether or not we should use automatic scaling.


setAutoRange

void setAutoRange(int axis,
                  boolean b)
Sets true or false to use automatic scaling.


drawMirrorTics

boolean drawMirrorTics(int axis)
Returns whether or not we should draw tics on the mirror axis.


setDrawMirrorTics

void setDrawMirrorTics(int axis,
                       boolean b)
Sets true or false to draw mirror tics


setRotateTics

void setRotateTics(int axis,
                   boolean b)
Sets true or false to rotate tics


rotateTics

boolean rotateTics(int axis)
Returns whether or not we should rotate the tics. Rotated tics are drawn at the outer-side of the axes.


updateGraph

boolean updateGraph()
Returns whether or not we should update the graph.


setUpdateGraph

void setUpdateGraph(boolean b)
Sets true or false to update the graph.


drawShadow

boolean drawShadow()
Returns whether or not a shadow will be drawn at the panel border.


setShadow

void setShadow(boolean b)
Defines whether or not a shadow will be drawn at the panel border.


setDrawGrid

void setDrawGrid(int axis,
                 boolean b)
Sets whether or not using grid lines.


drawGrid

boolean drawGrid(int axis)
Returns true if the grid should be drawn.


setPointMode

void setPointMode(int b)
Sets whether or not plotting points


getPointMode

int getPointMode()
Returns true if the points should be drawn.


setColorMode

void setColorMode(int b)
Sets the way of defining the colors of the curves. By default, the program takes, for each data-array, the colors from the pre-defined color swatches. If there are more lines than colors, than the first colors are re-used. This is the auto-mode (flag = AUTO), which is the default. By seting the flag to HIDE, no lines are drawn.


getColorMode

int getColorMode()
Returns the mode used to assign colors to the curves.


setGridColor

void setGridColor(java.awt.Color c)
Sets the color used by the grid. As is common use, the same color applies to horizontal and vertical, for the moment.


getGridColor

java.awt.Color getGridColor()

gridToFront

boolean gridToFront()

setGridToFront

void setGridToFront(boolean b)
sets whether or not to draw the grid at the front.


setGraphType

void setGraphType(int s)
Sets the graph type. The integer is an symbolic constant, must be one of the constants defined in class Data (GRAPHTYPE_2D, GRAPHTYPE_PIPER, etc.).


getGraphType

int getGraphType()
Returns the current graph type.


setGraphStyle

void setGraphStyle(int s)
Sets the line drawing style for 2D graphs. The integer is an symbolic constant, must be one of the constants defined in class LinePars (LinePars.LINES, LinePars.HISTO, etc.).


getGraphStyle

int getGraphStyle()
Returns the current line style.


getInnerColor

public java.awt.Color getInnerColor()
Returns the color used to fill the shaded triangles.


setInnerColor

public void setInnerColor(java.awt.Color c)
Sets the color used to fill the inner triangles.


setShowInner

public void setShowInner(boolean b)
Sets whether or not to draw the filled triangles.


showInner

public boolean showInner()

setShowBox

public void setShowBox(boolean b)
Sets whether or not to draw the bounding box.


showBox

public boolean showBox()

setBoxOffset

public void setBoxOffset(float f)
Sets the offset of the bounding box drawn around a graph.


getBoxOffset

public float getBoxOffset()

setBoxFillColor

public void setBoxFillColor(java.awt.Color c)
Sets the fill color of the bounding box drawn around a graph.


getBoxFillColor

public java.awt.Color getBoxFillColor()

setBoxColor

public void setBoxColor(java.awt.Color c)
Sets the color of the bounding box drawn around a graph.


getBoxColor

public java.awt.Color getBoxColor()

setGraphBackgroundColor

public void setGraphBackgroundColor(java.awt.Color c)
Sets the background color of the graph.


getGraphBackgroundColor

public java.awt.Color getGraphBackgroundColor()

setTdsFactor

public void setTdsFactor(float f)
Sets the factor used to plot a TDS circle. The size of the circle is proportional to the TDS but scaled by some factor 100 or so. This factor is set by the user with this method.


getTdsFactor

public float getTdsFactor()

setDrawTds

public void setDrawTds(boolean b)
Sets whether the tds should be drawn or not.


drawTds

public boolean drawTds()

reset

public void reset()
Resets the class to all the default values.


getSettings

public java.lang.String getSettings()
Return the current parameter settings in a string. This string is generally used to save the graph settings. All settings are returned in some kind of keyword-based format, i.e. keyword1 = value1 (separated by a newline).


parseDouble

private void parseDouble(java.util.StringTokenizer st,
                         double[] a)

parseFloat

private void parseFloat(java.util.StringTokenizer st,
                        float[] a)

parseBoolean

private void parseBoolean(java.util.StringTokenizer st,
                          boolean[] a)

parseInteger

private void parseInteger(java.util.StringTokenizer st,
                          int[] a)

parseString

private void parseString(java.util.StringTokenizer st,
                         java.lang.String[] a)