All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.chart.JCChartArea

java.lang.Object
   |
   +----jclass.chart.TrackChange
           |
           +----jclass.chart.ChartRegion
                   |
                   +----jclass.chart.JCChartArea

public class JCChartArea
extends ChartRegion
implements HTMLHandler
JCChartArea controls the charting region in the Chart instance. The JCChartArea handles rendering of the charts by using JCAxis and ChartGroup object instances to determine how data is plotted. A single JCChartArea can plot several ChartGroups against a number of axes.

Properties

Name Description
AngleUnit The AngleUnit property determines the unit of all angle values. Default value is DEGREES.
AxisBoundingBox The AxisBoundingBox property determines whether a box is drawn around the area bound by the inner axes.
Background The Background property determines the background color used to draw inside the chart region. Note that the Background property is inherited from the parent ChartRegion.
BorderType Determines the style of border drawn around the ChartRegion. Valid values come from BWTEnum, and include SHADOW_NONE, SHADOW_ETCHED_IN, SHADOW_ETCHED_OUT, SHADOW_IN, SHADOW_OUT, SHADOW_PLAIN, SHADOW_FRAME_IN, SHADOW_FRAME_OUT. (Note that legend, header, footer and chart area are all ChartRegion instances). Default value is BWTEnum.SHADOW_IN.
BorderWidth The BorderWidth property determines the width of the border drawn around the chart area. (Note that legend, header, footer and chart area are all ChartRegion instances). Default value is 2.
Depth The Depth property controls the apparent depth of a graph. Default value is 0.0.
Elevation The Elevation property controls distance from the x axis. Default value is 0.0.
FastAction The FastAction property determines whether chart actions will use an optimized mode in which it does not bother to display axis annotations or gridlines. Default value is false.
Font The Font property determines what font is used to render text inside the chart region. Note that the Font property is inherited from the parent ChartRegion.
Foreground The Foreground property determines the foreground color used to draw inside the chart region. Note that the Foreground property is inherited from the parent ChartRegion.
Height The Height property determines the height of the ChartRegion. The default value is calculated.
HeightIsDefault The HeightIsDefault property determines whether the height of the chart area is calculated by Chart (true) or taken from the Height property (false). Default value is false.
HorizActionAxis The HorizActionAxis property determines the axis used for actions (zooming, translating) in the horizontal direction. Default value is null.
IsShowing If true, the ChartRegion will appear on the screen. If false, it will not appear on the screen. (Note that legend, header, footer and chart area are all ChartRegion instances). Default value is true.
Left The Left property determines the location of the left of the ChartRegion. The default value is calculated.
LeftIsDefault The LeftIsDefault property determines whether the left position of the chart area is calculated by Chart (true) or taken from the Left property (false). Default value is false.
Markers The Markers property is an indexed property that controls the markers that appear on a particular JCChartArea instance. JCChartArea will pre-allocate an array of JCMarkers. Initially, the markers will have their axis and series properties set to null, so the markers will not appear.
PlotArea The PlotArea property is a ChartRegion object that models the plot area margins around
Rotation The Rotation property controls the position of the eye relative to the y axis. Default value is 0.0.
Top The Top property determines the location of the top of the ChartRegion. The default value is calculated.
TopIsDefault The TopIsDefault property determines whether the top position of the chart area is calculated by Chart (true) or taken from the Top property (false). Default value is false.
VertActionAxis The VertActionAxis property determines the axis used for actions (zooming, translating) in the vertical direction. Default value is null.
Width The Width property determines the width of the ChartRegion. The default value is calculated.
WidthIsDefault The WidthIsDefault property determines whether the width of the chart area is calculated by Chart (true) or taken from the Width property (false). Default value is false.
XAxis The XAxis property is an indexed property that contains all the x axes for the chart area. Default value is one x axis.
YAxis The YAxis property is an indexed property that contains all the y axes for the chart area. Default value is one y axis.


Variable Index

 o axisHashtable

Constructor Index

 o JCChartArea()
Constructs a chart area for the provided chart.

Method Index

 o draw(Graphics)
Responsible for rendering the JCChartArea contents.
 o getAngleUnit()
Gets the value of the AngleUnit property.
 o getAxisBoundingBox()
Gets the value of the AxisBoundingBox property.
 o getChanged()
Gets the value of the Changed property.
 o getDepth()
Gets the Depth property, which controls the apparent depth of a graph.
 o getElevation()
Gets the Elevation property, which controls distance from the x axis.
 o getFastAction()
Gets the value of the FastAction property.
 o getHorizActionAxis()
Gets the value of the HorizActionAxis property.
 o getMarker(int)
Gets a single value from the Markers property.
 o getMarkers()
Gets the value of the Markers property.
 o getPlotArea()
Gets the value of the PlotArea property.
 o getReentrance()
 o getRotation()
Gets the Rotation property, which controls the position of the eye relative to the y axis.
 o getVertActionAxis()
Gets the value of the VertActionAxis property.
 o getXAxis()
Gets the value of the XAxis property.
 o getXAxis(int)
Gets the value of the XAxis property at a specified index.
 o getYAxis()
Gets the value of the YAxis property.
 o getYAxis(int)
Gets the value of the YAxis property at a specified index.
 o isDirty()
Determines if the data is "dirty" (ie the data has changed since the last redisplay).
 o layoutChartArea()
Positions axes and calculates the true plot area size based on the position of the axes.
 o loadParams(String, JCChart)
Load JCChart parameters from HTML file
 o minimumSize()
Returns the minimum size for the chart area.
 o preferredSize()
Returns the preferred size for the chart area.
 o recalc()
If necessary, forces recalculation of the chart area.
 o repaint()
Need to avoid repaint if super.reshape() called.
 o reshape(int, int, int, int)
An overridden reshape() method, which makes sure that the Changed property is set and that a recalc occurs as a result of the reshape.
 o saveParams(String, JCChart)
Save JCChart parameters as HTML tags
 o setAngleUnit(int)
Sets the value of the AngleUnit property.
 o setAxisBoundingBox(boolean)
Sets the value of the AxisBoundingBox property.
 o setChanged(boolean, int)
Sets the value of the Changed property.
 o setDepth(int)
Sets the Depth property, which controls the apparent depth of a graph.
 o setElevation(int)
Sets the Elevation property, which controls distance from the x axis.
 o setFastAction(boolean)
Sets the value of the FastAction property.
 o setHorizActionAxis(JCAxis)
Sets the value of the HorizActionAxis property.
 o setParent(JCChart)
Connects the chart region to a JCChart.
 o setReentrance(boolean)
 o setRotation(int)
Sets the Rotation property, which controls the position of the eye relative to the y axis.
 o setVertActionAxis(JCAxis)
Sets the value of the VertActionAxis property.
 o setXAxis(int, JCAxis)
Sets the value of the XAxis property at a specified index.
 o setXAxis(JCAxis[])
Sets the value of the XAxis property.
 o setYAxis(int, JCAxis)
Sets the value of the YAxis property at a specified index.
 o setYAxis(JCAxis[])
Sets the value of the YAxis property.

Variables

 o axisHashtable
 public transient Hashtable axisHashtable

Constructors

 o JCChartArea
 public JCChartArea()
Constructs a chart area for the provided chart.

Methods

 o setParent
 public void setParent(JCChart p)
Connects the chart region to a JCChart.

Overrides:
setParent in class ChartRegion
 o getAngleUnit
 public int getAngleUnit()
Gets the value of the AngleUnit property. The AngleUnit property determines the unit of all angle values in this chart area. One of DEGREES, RADIANS or GRADS.

 o setAngleUnit
 public void setAngleUnit(int unit)
Sets the value of the AngleUnit property. The AngleUnit property determines the unit of all angle values in this chart area. One of DEGREES, RADIANS or GRADS.

Parameters:
unit - unit value
Throws: IllegalArgumentException
If the unit isn't one of DEGREES, RADIANS or GRADS.
 o getMarkers
 public JCMarker[] getMarkers()
Gets the value of the Markers property. The Markers property is an indexed property that controls the markers that appear on a particular JCChartArea instance. JCChartArea will pre-allocate an array of JCMarkers. Initially, the markers will have their axis and series properties set to null, so the markers will not appear.

Returns:
array of JCMarker instances
 o getMarker
 public JCMarker getMarker(int index)
Gets a single value from the Markers property. The Markers property is an indexed property that controls the markers that appear on a particular JCChartArea instance. JCChartArea will pre-allocate an array of JCMarkers. Initially, the markers will have their axis and series properties set to null, so the markers will not appear.

Parameters:
index - index of JCMarker instance
Returns:
JCMarker instance
 o getXAxis
 public JCAxis getXAxis(int index)
Gets the value of the XAxis property at a specified index. The XAxis property is an indexed property, and contains all the x axes for the chart area.

Parameters:
index - index of the JCAxis object
Returns:
JCAxis object at the specified index
 o setXAxis
 public void setXAxis(int index,
                      JCAxis ax)
Sets the value of the XAxis property at a specified index. The XAxis property is an indexed property, and contains all the x axes for the chart area.

Parameters:
index - index of the JCAxis object
ax - JCAxis object to place at the specified index
Throws: IllegalArgumentException
If the index does not address a valid x axis object.
 o setXAxis
 public void setXAxis(JCAxis ax[])
Sets the value of the XAxis property. The XAxis property is an indexed property, and contains all the x axes for the chart area.

Parameters:
ax - Array of JCAxis objects to be used for the x axies.
 o getXAxis
 public synchronized JCAxis[] getXAxis()
Gets the value of the XAxis property. The XAxis property is an indexed property, and contains all the x axes for the chart area.

Returns:
Array of JCAxis objects to be used for the x axies.
 o getYAxis
 public JCAxis getYAxis(int index)
Gets the value of the YAxis property at a specified index. The YAxis property is an indexed property, and contains all the y axes for the chart area.

Parameters:
index - index of the JCAxis object
Returns:
JCAxis object at the specified index
 o setYAxis
 public void setYAxis(int index,
                      JCAxis ax)
Sets the value of the YAxis property at a specified index. The YAxis property is an indexed property, and contains all the y axes for the chart area.

Parameters:
index - index of the JCAxis object
ax - JCAxis object to place at the specified index
Throws: IllegalArgumentException
If the index does not address a valid y axis object.
 o setYAxis
 public void setYAxis(JCAxis ax[])
Sets the value of the YAxis property. The YAxis property is an indexed property, and contains all the y axes for the chart area.

Parameters:
ax - Array of JCAxis objects to be used for the y axes.
 o getYAxis
 public synchronized JCAxis[] getYAxis()
Gets the value of the YAxis property. The YAxis property is an indexed property, and contains all the y axes for the chart area.

Returns:
Array of JCAxis objects to be used for the y axes.
 o setHorizActionAxis
 public void setHorizActionAxis(JCAxis ax)
Sets the value of the HorizActionAxis property. The HorizActionAxis property determines the axis used for actions (zooming, translating) in the horizontal direction.

Parameters:
ax - JCAxis object to use for chart actions in the horizontal direction.
Throws: IllegalArgumentException
If the provided axis is vertical or if it isn't in the list of x or y axes.
 o getHorizActionAxis
 public JCAxis getHorizActionAxis()
Gets the value of the HorizActionAxis property. The HorizActionAxis property determines the axis used for actions (zooming, translating) in the horizontal direction.

Returns:
JCAxis object to use for chart actions in the horizontal direction.
 o setVertActionAxis
 public void setVertActionAxis(JCAxis ax)
Sets the value of the VertActionAxis property. The VertActionAxis property determines the axis used for actions (zooming, translating) in the vertical direction.

Parameters:
ax - JCAxis object to use for chart actions in the vertical direction.
Throws: IllegalArgumentException
If the provided axis is horizontal or if it isn't in the list of x or y axes.
 o getVertActionAxis
 public JCAxis getVertActionAxis()
Gets the value of the VertActionAxis property. The VertActionAxis property determines the axis used for actions (zooming, translating) in the horizontal direction.

Returns:
JCAxis object to use for chart actions in the vertical direction.
 o setAxisBoundingBox
 public void setAxisBoundingBox(boolean bb)
Sets the value of the AxisBoundingBox property. The AxisBoundingBox property determines whether a box is drawn around the area bound by the inner axes.

Parameters:
bb - If true, bounding box is drawn. Otherwise, box is not drawn.
 o getAxisBoundingBox
 public boolean getAxisBoundingBox()
Gets the value of the AxisBoundingBox property. The AxisBoundingBox property determines whether a box is drawn around the area bound by the inner axes.

Returns:
If true, bounding box is drawn. Otherwise, box is not drawn.
 o getFastAction
 public boolean getFastAction()
Gets the value of the FastAction property. The FastAction property determines whether chart actions will use an optimized mode in which it does not bother to display axis annotations or gridlines.

Returns:
true if grid lines and axis annotations will be absent during the action, false otherwise.
 o setFastAction
 public void setFastAction(boolean fr)
Sets the value of the FastAction property. The FastAction property determines whether chart actions will use an optimized mode in which it does not bother to display axis annotations or gridlines.

Parameters:
fr - true if grid lines and axis annotations will be absent during the action, false otherwise.
 o getDepth
 public int getDepth()
Gets the Depth property, which controls the apparent depth of a graph.

Returns:
the depth as a percentage of the width
 o setDepth
 public void setDepth(int newDepth)
Sets the Depth property, which controls the apparent depth of a graph.

Parameters:
NewDepth - the depth as a percentage of the width
 o getElevation
 public int getElevation()
Gets the Elevation property, which controls distance from the x axis.

Returns:
the number of degrees above the X axis
 o setElevation
 public void setElevation(int newElevation)
Sets the Elevation property, which controls distance from the x axis.

Parameters:
NewElevation - the number of degrees above the X axis
 o getRotation
 public int getRotation()
Gets the Rotation property, which controls the position of the eye relative to the y axis.

Returns:
the number of degrees to the right of the y axis
 o setRotation
 public void setRotation(int newRotation)
Sets the Rotation property, which controls the position of the eye relative to the y axis.

Parameters:
NewRotation - the number of degrees to the right of the y axis
 o getChanged
 public boolean getChanged()
Gets the value of the Changed property. The Changed property determines whether the chart area requires a recalculation.

Overrides:
getChanged in class TrackChange
 o setReentrance
 public void setReentrance(boolean nv)
 o getReentrance
 public boolean getReentrance()
 o setChanged
 public void setChanged(boolean n,
                        int cf)
Sets the value of the Changed property. The Changed property determines whether the chart area requires a recalculation.

Overrides:
setChanged in class ChartRegion
 o getPlotArea
 public PlotArea getPlotArea()
Gets the value of the PlotArea property. The PlotArea property is a ChartRegion object that models the plot area margins around

 o draw
 public void draw(Graphics gc)
Responsible for rendering the JCChartArea contents.

Parameters:
gc - graphics context used for drawing
Overrides:
draw in class ChartRegion
 o preferredSize
 public Dimension preferredSize()
Returns the preferred size for the chart area.

Overrides:
preferredSize in class ChartRegion
 o minimumSize
 public Dimension minimumSize()
Returns the minimum size for the chart area.

 o recalc
 public void recalc()
If necessary, forces recalculation of the chart area.

Overrides:
recalc in class ChartRegion
 o layoutChartArea
 public void layoutChartArea()
Positions axes and calculates the true plot area size based on the position of the axes.

 o isDirty
 public boolean isDirty()
Determines if the data is "dirty" (ie the data has changed since the last redisplay).

Returns:
if true, the data has changed. If false, the data has not changed. Takes all ChartDataView objects into account.
 o reshape
 public void reshape(int x,
                     int y,
                     int w,
                     int h)
An overridden reshape() method, which makes sure that the Changed property is set and that a recalc occurs as a result of the reshape. This overridden reshape doesn't do a repaint(); it's up to the caller to make a proper repaint call so that all of the chart children get redrawn in the correct order.

Overrides:
reshape in class ChartRegion
 o repaint
 public void repaint()
Need to avoid repaint if super.reshape() called.

Overrides:
repaint in class ChartRegion
 o saveParams
 public void saveParams(String name,
                        JCChart comp)
Save JCChart parameters as HTML tags

Parameters:
name - the PARAM NAME
chart - the JCChart component
Overrides:
saveParams in class ChartRegion
 o loadParams
 public void loadParams(String name,
                        JCChart comp)
Load JCChart parameters from HTML file

Parameters:
name - the PARAM NAME
chart - the JCChart component
Overrides:
loadParams in class ChartRegion

All Packages  Class Hierarchy  This Package  Previous  Next  Index