|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.objectplanet.chart.ChartDataLoader
public class ChartDataLoader
This is the class that reads and sets all the chart parameters for ChartApplet and ChartServlet.
Field Summary | |
---|---|
protected BarChart |
barChart
The bar charts used. |
protected java.lang.String |
chartType
Chart type. |
protected java.lang.String |
labelDelimiter
Used as the label delimiter for label string "arrays". |
protected java.util.Hashtable |
labels
The IDs of the labels that can be set anywhere in the chart. |
protected java.util.Hashtable |
labelURLs
The URLs for the anywhere labels. |
protected java.util.Hashtable |
labelURLTargets
The list of label URL targets. |
protected LineChart |
lineChart
The line charts used. |
protected PieChart |
pieChart
The pie charts used. |
protected java.util.Hashtable |
targets
The IDs of the target value lines. |
protected Chart |
theChart
Reference to the actual chart displayed. |
Constructor Summary | |
---|---|
ChartDataLoader()
Creates the chart data loader. |
Method Summary | |
---|---|
void |
addChartItemListener(ChartApplet chartApplet)
Adds and item listener to the specified chart. |
protected static java.lang.String |
convertLineBreaks(java.lang.String label)
Converts the characters \ and n to '\n'. |
java.lang.String |
createArrayString(int[] array)
Creates a separated string from the array. |
static java.awt.Color |
createColor(java.lang.String color)
Creates a color based on the string. |
protected GenericChart |
createExtChart(java.lang.String type)
|
java.awt.Font |
createFont(java.lang.String value,
java.lang.String name,
int type,
int size)
Creates a font based on the information in the specified string. |
protected boolean[] |
getBooleanValues(java.lang.String string)
Converts a comma seperated true/false string to a boolean array. |
Chart |
getChart()
Gets the actual chart displayed |
java.lang.String |
getChartType()
Gets the chart type. |
protected java.awt.Color[] |
getColorValues(java.lang.String string)
Converts a comma seperated string to a color array. |
protected static java.lang.Double[] |
getDoubleValues(java.lang.String string)
Convers a string parameter to an array of double values. |
ChartDataLoader |
getOverlayDataLoader(java.lang.String name)
Gets a data loader for specified overlay chart |
protected java.lang.String[] |
getStringValues(java.lang.String string,
java.lang.String delimiter)
Converts a comma seperated string to an array of strings. |
protected int[] |
getStyleValues(java.lang.String string)
Converts a comma seperated string to sample highlight style types. |
void |
init()
This method is called when the servlet is placed into service. |
void |
reset()
Resets the chart data and features. |
java.awt.Component |
setChart(java.awt.Component chart)
Sets the actual chart displayed. |
void |
setChartType(java.lang.String type)
Sets the chart type. |
protected void |
setImage(java.lang.String name,
java.awt.Image image)
Adds an image to the chart and sets it to be used in a right way |
void |
setParameter(java.lang.String name,
java.lang.String value)
Sets a parameter in the chart. |
void |
setParameters(java.util.Hashtable parameters)
Sets the applet parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BarChart barChart
protected java.lang.String chartType
protected java.lang.String labelDelimiter
protected java.util.Hashtable labels
protected java.util.Hashtable labelURLs
protected java.util.Hashtable labelURLTargets
protected LineChart lineChart
protected PieChart pieChart
protected java.util.Hashtable targets
protected Chart theChart
Constructor Detail |
---|
public ChartDataLoader()
Method Detail |
---|
public void addChartItemListener(ChartApplet chartApplet)
protected static java.lang.String convertLineBreaks(java.lang.String label)
label
- The label with the \ and n.public java.lang.String createArrayString(int[] array)
array
- The array to convert.
public static java.awt.Color createColor(java.lang.String color)
protected GenericChart createExtChart(java.lang.String type)
public java.awt.Font createFont(java.lang.String value, java.lang.String name, int type, int size)
value
- The font string value.name
- The name of the default font.type
- The default type (Font.PLAIN, Font.BOLD, Font.ITALIC).size
- The default size.protected boolean[] getBooleanValues(java.lang.String string)
string
- The comma seperated string.
public Chart getChart()
public java.lang.String getChartType()
protected java.awt.Color[] getColorValues(java.lang.String string)
string
- The comma seperated string.
protected static java.lang.Double[] getDoubleValues(java.lang.String string)
string
- The array of string numbers.
public ChartDataLoader getOverlayDataLoader(java.lang.String name)
name
- The name of the overlay chart
protected java.lang.String[] getStringValues(java.lang.String string, java.lang.String delimiter)
string
- The string parameter to return the values from.delimiter
- The field delimiter.
protected int[] getStyleValues(java.lang.String string)
string
- The comma seperated string.
public void init()
public void reset()
public java.awt.Component setChart(java.awt.Component chart)
public void setChartType(java.lang.String type)
type
- Type of the chart.protected void setImage(java.lang.String name, java.awt.Image image)
name
- The name of the imageimage
- The image object itselfpublic void setParameter(java.lang.String name, java.lang.String value)
name
- The name of the parameter.value
- The value of the parameter as a string.public void setParameters(java.util.Hashtable parameters)
parameters
- The parameters to be set.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |