All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class WBMPcreator.WBMPChart

java.lang.Object
    |
    +----WBMPcreator.WBMPfile
            |
            +----WBMPcreator.WBMPChart

public class WBMPChart
extends WBMPfile

Variable Index

 o CHART_PLAIN
Chart with points connected with lines.
 o CHART_PLAIN_FILLED
Chart with points connected with lines.
 o CHART_POINT
Chart with points NOT connected with lines.
 o CHART_POINT_FILLED
Chart with points NOT connected with lines.

Constructor Index

 o WBMPChart(int, int)
This constructor creates WBMPChart instance with the given resolution.
 o WBMPChart(WBMPDimension)
This constructor creates WBMPChart instance with the given dimensions.
 o WBMPChart(WBMPfile)
This constructor creates WBMPChart instance from WBMPfile instance.

Method Index

 o drawChart(int)
Method to draw a desired chart.
 o getXData()
 
 o getYData()
 
 o setXData(Vector)

This method set the X axis data to be represented.

 o setYData(Vector)

This method set the Y axis data to be represented.

Field Detail

 o CHART_PLAIN
public static final int CHART_PLAIN
          Chart with points connected with lines.
 o CHART_POINT
public static final int CHART_POINT
          Chart with points NOT connected with lines.
 o CHART_PLAIN_FILLED
public static final int CHART_PLAIN_FILLED
          Chart with points connected with lines.
 o CHART_POINT_FILLED
public static final int CHART_POINT_FILLED
          Chart with points NOT connected with lines.

Constructor Detail

 o WBMPChart
public WBMPChart(int xSize,
                 int ySize)
          This constructor creates WBMPChart instance with the given resolution.
Parameters:
xSize - the X axis size in points
ySize - the Y axis size in points
 o WBMPChart
public WBMPChart(WBMPDimension imageDim)
          This constructor creates WBMPChart instance with the given dimensions.
Parameters:
imageDim - dimensions of the resulting images
 o WBMPChart
public WBMPChart(WBMPfile wbmpFile)
          This constructor creates WBMPChart instance from WBMPfile instance.
Parameters:
wbmpFile - the WBMPfile instance

Method Detail

 o drawChart
public WBMPfile drawChart(int chartMode)
          Method to draw a desired chart. Note that it requires the xData and yData vectors to be filled with data, else the chart will be empty.

NOTE The free version of this class includes the copyright string in the right down corner. To remove this string contact the author.

Parameters:
chartMode - one of chart types, e.g. PLAIN, PLAIN_FILLED, etc.
 o setXData
public void setXData(java.util.Vector newXData)
          

This method set the X axis data to be represented.

NOTE that the data should be prepared as follows:

...

WBMPchart wc=new WBMPChart(96,44);

java.util.Vector xData=new java.util.Vector(4);

xData.addElement("10");

xData.addElement("30");

xData.addElement("20");

xData.addElement("40");

wc.setXData(xData);

...

NOTE If you want X axis dimensions to start with 0 or any other number but not the minimum between given numbers, you should add the following string first:

xData.addElement("0");

 o getXData
public java.util.Vector getXData()
 o setYData
public void setYData(java.util.Vector newYData)
          

This method set the Y axis data to be represented.

NOTE that the data should be prepared as follows:

...

WBMPchart wc=new WBMPChart(96,44);

java.util.Vector xData=new java.util.Vector(4);

...

yData.addElement("7");

yData.addElement("5");

yData.addElement("4");

yData.addElement("11");

wc.setYData(yData);

...

NOTE If you want Y axis dimensions to start with 0 or any other number but not the minimum between given numbers, you should add the following string first:

yData.addElement("0");

 o getYData
public java.util.Vector getYData()

All Packages  Class Hierarchy  This Package  Previous  Next  Index