JLogView_.datastructs
Class LGPlot

java.lang.Object
  extended by JLogView_.datastructs.LGPlot

public class LGPlot
extends java.lang.Object

LGPlot is a class representing a plot data structure. A plot is a series of x, y coordinates to be drawn and all the information about how to draw them. In our case, it just have a couple of index that tells the parent graph object which column to use for x and which column to use for y.

It has all information for how to draw the plot only as future-proof purpose the old JLogView_ markup has no capabilities of setting drawing information for a particular plot, however it is intended that the new one will.


Constructor Summary
LGPlot(int x, int y)
          This is the default constructor of an LGPlot needing information about its x and y columns.
 
Method Summary
 boolean drawingIsCustomized()
          This method tells wether or not the drawing of this plot has been customized i.e.
 java.awt.Color getColour()
          This method gives the colour to be used to draw this plot
 java.awt.BasicStroke getStroke()
          This method return the linestyle (aka stroke) to be used to draw this plot
 int getSymbolSize()
          This method gives the symbol size in pixel for drawing the data points of this plot
 int getSymbolStyle()
          This method gives the symbol style to use to draw the data points of this plot
 int getXCol()
          This method gives the index of the column to be used for x coordinates
 int getYCol()
          This method gives the index of the column to be used for y coordinates
 boolean isOn()
          This methods tells whether or not this plot is on (i.e.
 void setColour(java.awt.Color col)
          This method sets the colour to be used to draw this plot
 void setCustomizedDrawing(boolean custom)
          This switch the value that tells if the drawing has been customized.
 void setStroke(float[] style, int width)
          This method sets the linestyle (aka stroke) to be used to draw this plot
 void setSymbolSize(int siz)
          This method sets the symbol size in pixel for drawing the data points of this plot
 void setSymbolStyle(int style)
          This method sets the symbol style to use to draw the data points of this plot
 void setXCol(int x)
          This method sets the index of the column to be used for x coordinates
 void setYCol(int y)
          This method sets the index of the column to be used for y coordinates
 void switchOn(boolean ison)
          This is switch this plot on of off (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LGPlot

public LGPlot(int x,
              int y)
This is the default constructor of an LGPlot needing information about its x and y columns.

Parameters:
x - the index of the column to be used for x coordinates
y - the index of the column to be used for y coordinates
Method Detail

isOn

public boolean isOn()
This methods tells whether or not this plot is on (i.e. need to be drawn)

Returns:
a boolean telling whether to draw this plot or not

switchOn

public void switchOn(boolean ison)
This is switch this plot on of off (i.e. need to be drawn or not)

Parameters:
ison - a boolean, true -> draw the plot, false -> do not draw it

getXCol

public int getXCol()
This method gives the index of the column to be used for x coordinates

Returns:
the index of the x column

getYCol

public int getYCol()
This method gives the index of the column to be used for y coordinates

Returns:
the index of the y column

setXCol

public void setXCol(int x)
This method sets the index of the column to be used for x coordinates

Parameters:
x - the index of the x column

setYCol

public void setYCol(int y)
This method sets the index of the column to be used for y coordinates

Parameters:
y - the index of the y column

setColour

public void setColour(java.awt.Color col)
This method sets the colour to be used to draw this plot

Parameters:
col - the Color object representing that colour
See Also:
Color

getColour

public java.awt.Color getColour()
This method gives the colour to be used to draw this plot

Returns:
the Color object representing that colour
See Also:
Color

setStroke

public void setStroke(float[] style,
                      int width)
This method sets the linestyle (aka stroke) to be used to draw this plot

Parameters:
style - an array of float representing the line pattern.
width - the line width in pixels
See Also:
BasicStroke

getStroke

public java.awt.BasicStroke getStroke()
This method return the linestyle (aka stroke) to be used to draw this plot

Returns:
a BasicStroke object representing the line style.
See Also:
BasicStroke

setSymbolStyle

public void setSymbolStyle(int style)
This method sets the symbol style to use to draw the data points of this plot

Parameters:
style - an integer whose value is between 0 and 7.
See Also:
LGDrawingStylesUtils.drawSymbol(Graphics2D, int, int, int, int)

getSymbolStyle

public int getSymbolStyle()
This method gives the symbol style to use to draw the data points of this plot

Returns:
an integer whose value is between 0 and 7.
See Also:
LGDrawingStylesUtils.drawSymbol(Graphics2D, int, int, int, int)

setSymbolSize

public void setSymbolSize(int siz)
This method sets the symbol size in pixel for drawing the data points of this plot

Parameters:
siz - the size in pixels

getSymbolSize

public int getSymbolSize()
This method gives the symbol size in pixel for drawing the data points of this plot

Returns:
the size in pixels

drawingIsCustomized

public boolean drawingIsCustomized()
This method tells wether or not the drawing of this plot has been customized i.e. whether we need to look out for the drawing parameters or not

Returns:
a boolean, true -> drawing is customized, false -> it is not

setCustomizedDrawing

public void setCustomizedDrawing(boolean custom)
This switch the value that tells if the drawing has been customized.

Parameters:
custom - a boolean, true -> drawing is customized, false -> it is not