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.
|
-
axisHashtable
-
-
JCChartArea()
- Constructs a chart area for the provided chart.
-
draw(Graphics)
- Responsible for rendering the JCChartArea contents.
-
getAngleUnit()
- Gets the value of the AngleUnit property.
-
getAxisBoundingBox()
- Gets the value of the AxisBoundingBox property.
-
getChanged()
- Gets the value of the Changed property.
-
getDepth()
- Gets the Depth property, which controls the apparent depth of a
graph.
-
getElevation()
- Gets the Elevation property, which controls distance from
the x axis.
-
getFastAction()
- Gets the value of the FastAction property.
-
getHorizActionAxis()
- Gets the value of the HorizActionAxis property.
-
getMarker(int)
- Gets a single value from the Markers property.
-
getMarkers()
- Gets the value of the Markers property.
-
getPlotArea()
- Gets the value of the PlotArea property.
-
getReentrance()
-
-
getRotation()
- Gets the Rotation property, which controls the position of
the eye relative to the y axis.
-
getVertActionAxis()
- Gets the value of the VertActionAxis property.
-
getXAxis()
- Gets the value of the XAxis property.
-
getXAxis(int)
- Gets the value of the XAxis property at a specified
index.
-
getYAxis()
- Gets the value of the YAxis property.
-
getYAxis(int)
- Gets the value of the YAxis property at a specified
index.
-
isDirty()
- Determines if the data is "dirty" (ie the data has changed
since the last redisplay).
-
layoutChartArea()
- Positions axes and calculates the true plot area size based on
the position of the axes.
-
loadParams(String, JCChart)
- Load JCChart parameters from HTML file
-
minimumSize()
- Returns the minimum size for the chart area.
-
preferredSize()
- Returns the preferred size for the chart area.
-
recalc()
- If necessary, forces recalculation of the chart area.
-
repaint()
- Need to avoid repaint if super.reshape() called.
-
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.
-
saveParams(String, JCChart)
- Save JCChart parameters as HTML tags
-
setAngleUnit(int)
- Sets the value of the AngleUnit property.
-
setAxisBoundingBox(boolean)
- Sets the value of the AxisBoundingBox property.
-
setChanged(boolean, int)
- Sets the value of the Changed property.
-
setDepth(int)
- Sets the Depth property, which controls the apparent depth of a
graph.
-
setElevation(int)
- Sets the Elevation property, which controls distance from
the x axis.
-
setFastAction(boolean)
- Sets the value of the FastAction property.
-
setHorizActionAxis(JCAxis)
- Sets the value of the HorizActionAxis property.
-
setParent(JCChart)
- Connects the chart region to a JCChart.
-
setReentrance(boolean)
-
-
setRotation(int)
- Sets the Rotation property, which controls the position of
the eye relative to the y axis.
-
setVertActionAxis(JCAxis)
- Sets the value of the VertActionAxis property.
-
setXAxis(int, JCAxis)
- Sets the value of the XAxis property at a specified
index.
-
setXAxis(JCAxis[])
- Sets the value of the XAxis property.
-
setYAxis(int, JCAxis)
- Sets the value of the YAxis property at a specified
index.
-
setYAxis(JCAxis[])
- Sets the value of the YAxis property.
axisHashtable
public transient Hashtable axisHashtable
JCChartArea
public JCChartArea()
- Constructs a chart area for the provided chart.
setParent
public void setParent(JCChart p)
- Connects the chart region to a JCChart.
- Overrides:
- setParent in class ChartRegion
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.
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.
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
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
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
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
getElevation
public int getElevation()
- Gets the Elevation property, which controls distance from
the x axis.
- Returns:
- the number of degrees above the X axis
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
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
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
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
setReentrance
public void setReentrance(boolean nv)
getReentrance
public boolean getReentrance()
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
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
draw
public void draw(Graphics gc)
- Responsible for rendering the JCChartArea contents.
- Parameters:
- gc - graphics context used for drawing
- Overrides:
- draw in class ChartRegion
preferredSize
public Dimension preferredSize()
- Returns the preferred size for the chart area.
- Overrides:
- preferredSize in class ChartRegion
minimumSize
public Dimension minimumSize()
- Returns the minimum size for the chart area.
recalc
public void recalc()
- If necessary, forces recalculation of the chart area.
- Overrides:
- recalc in class ChartRegion
layoutChartArea
public void layoutChartArea()
- Positions axes and calculates the true plot area size based on
the position of the axes.
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.
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
repaint
public void repaint()
- Need to avoid repaint if super.reshape() called.
- Overrides:
- repaint in class ChartRegion
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
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