All Packages Class Hierarchy This Package Previous Next Index
Class com.objectplanet.chart.ChartApplet
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----com.objectplanet.chart.ChartApplet
- public class ChartApplet
- extends Applet
- Author:
- Bjorn J. Kvande.
-
ChartApplet()
-
-
createColor(String)
- Creates a color based on the string.
-
readDefaultParameters(Chart)
- Reads the default parameters from the html page, and creates the chart.
-
readSampleLabels(String)
- Reads the sample label argument and returns an array with the labels.
-
readSamples(Chart)
- Reads the sample values and labels from the html page.
-
readSampleValues(String)
- Reads the sample value argument and returns an array with the values.
ChartApplet
public ChartApplet()
readDefaultParameters
protected void readDefaultParameters(Chart chart)
- Reads the default parameters from the html page, and creates the chart.
The default parameters that are read and set are:
- title = "title"
- titleOn = "true/false"
- legendOn = "true/false"
- legendPosition = "top/bottom/left/right"
- valueLabelsOn = "true/false"
- 3DModeOn = "true/false"
- background = "color"
- foreground = "color"
- chartBackground = "color"
- chartForeground = "color"
- frameOn = "true/false"
- Parameters:
- chart - The chart to set parameters for.
createColor
protected Color createColor(String color)
- Creates a color based on the string. The string can either be
the name of a java defined color, a comma seperated RGB string
(255,255,255), or a 6-digit hex-string (#af10cd).
- Returns:
- The color object, or null if string is invalid.
readSamples
protected void readSamples(Chart chart)
- Reads the sample values and labels from the html page. The number of
samples read are either the number of param statements in the html page,
or the number of samples defined for the chart, whichever one is smallest.
The parameters has the following form.
- param name=sampleValues value="10,20,30,40,50"
- param name=sampleLabels value="label 1, label 2, label 3, label 4, label 5"
- Parameters:
- chart - The chart to set the samples for.
readSampleValues
protected double[] readSampleValues(String name)
- Reads the sample value argument and returns an array with the values.
- Parameters:
- name - The name of the parameter.
- Returns:
- An array with the values, or null if no values were specified.
readSampleLabels
protected String[] readSampleLabels(String name)
- Reads the sample label argument and returns an array with the labels.
- Parameters:
- The - name of the parameter.
- Returns:
- An array with the labels, or null if no labels were read.
All Packages Class Hierarchy This Package Previous Next Index