public class SVGRadarChart extends AbstractSVGChart
backgroundBounds, backgroundColor, backgroundFillColor, backgroundFillOpacity, backgroundGradient, backgroundGradientColor, backgroundGradientFactory, backgroundOutlineColor, backgroundStroke, backgroundVisible, box, enableZoomAndPan, foregroundColor, format, gradient, gradientColor, legendFont, legendPosition, legendSize, legendVisible, lowerLimit, max, min, proportions, proportionsOfRange, proportionsOfSum, publishedElements, range, selectedColor, selectedOffset, selectedStroke, shadowOffset, sortComparator, stroke, sum, svgXMLNS, textGap, unit, upperLimit, valueTextCenter, valueTextColor, valueTextFont, valueTextPosition, valueTextVisible, visibleFilters, xGap, yGap
Constructor and Description |
---|
SVGRadarChart() |
SVGRadarChart(TDataBox box) |
SVGRadarChart(TDataBox box,
java.lang.String title,
java.awt.Color backgroundColor) |
SVGRadarChart(TDataBox box,
java.lang.String title,
java.awt.Color backgroundColor,
java.awt.Color foregroundColor) |
Modifier and Type | Method and Description |
---|---|
void |
addAxis(java.lang.Object radarAxis)
Adds a new axis.
|
void |
addAxisText(java.lang.Object itemText)
Adds a new axis.
|
protected void |
calculate() |
java.awt.Color |
getAxisColor()
Gets the color of the axis.
|
int |
getAxisInflexionStyle()
Gets the style of the inflexion in axis.
|
java.util.List |
getAxisList()
Gets the list of the axis.
|
protected int |
getAxisScaleTextPosition(double angle) |
double |
getAxisStartAngle()
Gets the start angle of the axis.
|
java.lang.String |
getAxisStroke()
Gets the stroke of the axis.
|
java.awt.Color |
getAxisTextColor()
Gets the text color of the axis.
|
java.awt.Font |
getAxisTextFont()
Gets the text font of the axis.
|
protected int |
getAxisTextPosition(double angle)
Gets the position of the text of the axis.
|
java.awt.Rectangle |
getDrawBound()
Gets the bound of the draw area.
|
protected java.awt.Rectangle |
getInflexionBounds(Element element,
java.awt.Point point)
Gets the bounds of the inflexion of the element.
|
protected java.awt.Shape |
getInflexionShape(int inflexionStyle,
java.awt.Rectangle bounds)
Gets the shape of the inflexion .
|
protected java.awt.Dimension |
getInflexionSize(Element element,
java.awt.Point point)
Gets the size of the inflexion.
|
int |
getInflexionStyle()
Gets the inflexion style.
|
int |
getInflexionStyle(Element element)
Gets the style of the inflexion.
|
java.awt.Color |
getRadarFillColor()
Gets the fill color of the radar.
|
java.awt.Color |
getRadarFillGradientColor()
Gets the gradient fill color of the radar.
|
int |
getRadarFillGradientFactory()
Gets the gradient factory of the fill color.
|
java.awt.Color |
getRingMajorColor()
Gets the major ring color.
|
java.lang.String |
getRingMajorStroke()
Gets the major ring stroke.
|
java.awt.Color |
getRingMinColor()
Gets the color of the minimum ring.
|
java.lang.String |
getRingMinStroke()
Gets the stroke of the minimum ring.
|
int |
getRingStyle()
Gets the style of the ring.
|
int |
getScaleMajorCount()
Gets the count of the major scale.
|
java.awt.Color |
getScaleMajorTextColor()
Gets the text color of the major scale.
|
java.awt.Font |
getScaleMajorTextFont()
Gets the text font of the major scale.
|
double |
getScaleMaxValue()
Gets the maximal value of the scale.
|
int |
getScaleMinCount()
Gets the count of the minimum scale.
|
double |
getScaleMinValue()
Gets the minimum value of the scale.
|
protected java.lang.String |
getScaleValueText(java.lang.Object obj,
int index)
Gets the scale value text.
|
java.awt.Color |
getShapeFillGradientColor()
Gets the gradient color of the shape.
|
boolean |
isAreaFill()
Gets whether the area is filled.
|
protected boolean |
isAreaFill(Element element) |
boolean |
isAxisInflexionVisible()
Gets whether the inflexion of the axis is visible.
|
boolean |
isAxisTextVisible()
Gets whether the text of the axis is visible.
|
boolean |
isAxisVisible()
Gets whether the axis is visible.
|
boolean |
isInflexionVisible()
Gets whether the inflexion is visible.
|
protected boolean |
isInflexionVisible(Element element) |
boolean |
isLineVisible()
Gets whether the line is visible.
|
protected boolean |
isLineVisible(Element element) |
boolean |
isRadarFill()
Gets whether the radar is filled.
|
boolean |
isRadarFillGradient()
Gets whether the fill color of the radar is gradient.
|
boolean |
isRingMinVisible()
Gets whether the minimum ring is visible.
|
boolean |
isRingVisible()
Gets whether the ring is visible.
|
boolean |
isScaleMajorTextVisible()
Gets whether the text of the major scale is visible.
|
protected boolean |
isScaleVisible(int index) |
boolean |
isShapeFillGradient()
Gets whether the fill color of the shape is gradient.
|
protected void |
paintAxisInflexion(SVGContext context,
java.lang.StringBuffer result,
java.awt.Stroke stroke,
java.awt.Color color,
java.awt.geom.Point2D.Double point,
int index,
java.lang.String item)
Paints the inflexion of the axis.
|
void |
paintChart(SVGContext context,
java.lang.StringBuffer result,
int width,
int height) |
protected void |
paintInflexion(SVGContext context,
java.lang.StringBuffer result,
Element element,
java.awt.Point point,
java.lang.Double value,
int i) |
void |
removeAxisText(int itemIndex)
Remove a axis by the index.
|
void |
removeAxisText(java.lang.Object itemText)
Removes a axis.
|
void |
setAreaFill(boolean areaFill)
Sets whether the area should be filled.
|
void |
setAxisColor(java.awt.Color axisColor)
Sets the new color for the axis.
|
void |
setAxisInflexionStyle(int axisInflexionStyle)
Sets new style for the inflexion in axis.
|
void |
setAxisInflexionVisible(boolean axisInflexionVisible)
Sets whether the inflexion of the axis is visible.
|
void |
setAxisStartAngle(double axisStartAngle)
Sets the start angle for the axis.
|
void |
setAxisStroke(java.lang.String axisStroke)
Sets the stroke for the axis.
|
void |
setAxisTextColor(java.awt.Color axisTextColor)
Sets the new text color for the axis.
|
void |
setAxisTextFont(java.awt.Font axisTextFont)
Sets the text font for the axis.
|
void |
setAxisTextVisible(boolean axisTextVisible)
Sets whether the text of the axis should be visible.
|
void |
setAxisVisible(boolean axisVisible)
Sets whether the axis should be visible.
|
void |
setInflexionStyle(int inflexionStyle)
Sets a new inflexion style for the line chart.
|
void |
setInflexionVisible(boolean inflexionVisible)
Sets whether the inflexion should be visible.
|
void |
setLineVisible(boolean lineVisible)
Sets whether the line should be visible.
|
void |
setRadarFill(boolean radarFill)
Sets whether the radar should be filled.
|
void |
setRadarFillColor(java.awt.Color radarFillColor)
Sets the fill color for the radar.
|
void |
setRadarFillGradient(boolean radarFillGradient)
Sets whether the fill color of the radar should be gradient.
|
void |
setRadarFillGradientColor(java.awt.Color radarFillGradientColor)
Sets the gradient fill color for the radar.
|
void |
setRadarFillGradientFactory(int radarFillGradientFactory)
Sets the gradient factory for the fill color.
|
void |
setRingMajorColor(java.awt.Color ringMajorColor)
Sets the major ring color.
|
void |
setRingMajorStroke(java.lang.String ringMajorStroke)
Sets the major ring stroke.
|
void |
setRingMinColor(java.awt.Color ringMinColor)
Set the color for the minimum ring.
|
void |
setRingMinStroke(java.lang.String ringMinStroke)
Sets the stroke for the minimum ring.
|
void |
setRingMinVisible(boolean ringMinVisible)
Sets whether the minimum ring should be visible.
|
void |
setRingStyle(int ringStyle)
Sets the style for the ring.
|
void |
setRingVisible(boolean ringVisible)
Sets whether the ring should be visible.
|
void |
setScaleMajorCount(int scaleMajorCount)
Sets the count for the major scale.
|
void |
setScaleMajorTextColor(java.awt.Color scaleMajorTextColor)
Sets the text color for the major scale.
|
void |
setScaleMajorTextFont(java.awt.Font scaleMajorTextFont)
Sets the text font for the major scale.
|
void |
setScaleMajorTextVisible(boolean scaleMajorTextVisible)
Sets whether the text of the major scale should be visible.
|
void |
setScaleMaxValue(double scaleMaxValue)
Sets the maximal value for the scale.
|
void |
setScaleMinCount(int scaleMinCount)
Sets the count for the minimum scale.
|
void |
setScaleMinValue(double scaleMinValue)
Sets the minimum value for the scale.
|
void |
setShapeFillGradient(boolean shapeFillGradient)
Sets whether the fill color of the shape should be gradient.
|
void |
setShapeFillGradientColor(java.awt.Color shapeFillGradientColor)
Sets the gradient color for the shape.
|
java.lang.StringBuffer |
toSVGContent(SVGContext context,
int width,
int height) |
addVisibleFilter, appendElementAttributesSVG, appendElementSelectionAttribute, appendSVGBackground, appendSVGPreDefine, getBackgroundBounds, getBackgroundColor, getBackgroundFillColor, getBackgroundFillOpacity, getBackgroundGradientColor, getBackgroundGradientFactory, getBackgroundOutlineColor, getBackgroundStroke, getColor, getDataBox, getForegroundColor, getFormat, getFormat, getFormatedText, getFormatedText, getGradientColor, getGradientColor, getGradientID, getLegendFont, getLegendLabel, getLegendPosition, getLegendSize, getLowerLimit, getMax, getMin, getSelectedColor, getSelectedOffset, getSelectedStroke, getShadowOffset, getSortComparator, getStroke, getStroke, getSVGXMLNS, getTextGap, getType, getUnit, getUpperLimit, getValue, getValues, getValueTextColor, getValueTextFont, getValueTextPosition, getXGap, getYGap, insertSVGHeadBefore, isBackgroundGradient, isBackgroundVisible, isEnableZoomAndPan, isGradient, isLegendVisible, isValueTextCenter, isValueTextVisible, isVisible, paintBackground, paintLegend, publishData, removeVisibleFilter, setBackgroundColor, setBackgroundFillColor, setBackgroundFillOpacity, setBackgroundGradient, setBackgroundGradientColor, setBackgroundGradientFactory, setBackgroundOutlineColor, setBackgroundStroke, setBackgroundVisible, setDataBox, setEnableZoomAndPan, setForegroundColor, setFormat, setGradient, setGradientColor, setLegendFont, setLegendPosition, setLegendSize, setLegendVisible, setLowerLimit, setSelectedOffset, setShadowOffset, setSortComparator, setStroke, setSVGXMLNS, setTextGap, setType, setUnit, setUpperLimit, setValueTextCenter, setValueTextColor, setValueTextFont, setValueTextPosition, setValueTextVisible, setXGap, setYGap, toSVG, updateTViewUI
public SVGRadarChart()
public SVGRadarChart(TDataBox box)
public SVGRadarChart(TDataBox box, java.lang.String title, java.awt.Color backgroundColor)
public SVGRadarChart(TDataBox box, java.lang.String title, java.awt.Color backgroundColor, java.awt.Color foregroundColor)
protected void calculate()
calculate
in class AbstractSVGChart
public java.lang.StringBuffer toSVGContent(SVGContext context, int width, int height)
toSVGContent
in class AbstractSVGChart
public void paintChart(SVGContext context, java.lang.StringBuffer result, int width, int height)
protected int getAxisTextPosition(double angle)
protected int getAxisScaleTextPosition(double angle)
protected void paintAxisInflexion(SVGContext context, java.lang.StringBuffer result, java.awt.Stroke stroke, java.awt.Color color, java.awt.geom.Point2D.Double point, int index, java.lang.String item)
protected java.awt.Shape getInflexionShape(int inflexionStyle, java.awt.Rectangle bounds)
inflexionStyle
- the style of the inflexion.bounds
- the bounds of the inflexion.public int getInflexionStyle(Element element)
element
- protected java.awt.Rectangle getInflexionBounds(Element element, java.awt.Point point)
element
- point
- the point where the inflexion is in.protected java.awt.Dimension getInflexionSize(Element element, java.awt.Point point)
element
- point
- protected boolean isScaleVisible(int index)
protected java.lang.String getScaleValueText(java.lang.Object obj, int index)
index
- the index of the scale.valueRange
- the value range of the scale.scaleMinValue
- the minimal value of the scale.scaleMajorCount
- the major count of the scale.protected boolean isInflexionVisible(Element element)
protected boolean isLineVisible(Element element)
protected boolean isAreaFill(Element element)
protected void paintInflexion(SVGContext context, java.lang.StringBuffer result, Element element, java.awt.Point point, java.lang.Double value, int i)
public void addAxisText(java.lang.Object itemText)
itemText
- a new axis.public void addAxis(java.lang.Object radarAxis)
radarAxis
- a new axis.public void removeAxisText(java.lang.Object itemText)
itemText
- a axis that is needed to be removed.public void removeAxisText(int itemIndex)
itemIndex
- a axis index that is needed to be removed.public java.awt.Font getAxisTextFont()
setAxisTextFont(Font)
public void setAxisTextFont(java.awt.Font axisTextFont)
axisTextFont
- the new text font of the axis.getAxisTextFont()
public java.awt.Color getAxisTextColor()
setAxisTextColor(Color)
public void setAxisTextColor(java.awt.Color axisTextColor)
axisTextColor
- the new text color for the axis.getAxisTextColor()
public java.awt.Color getAxisColor()
#setAxesTextColor()
public void setAxisColor(java.awt.Color axisColor)
axisColor
- the new color for the axis.getAxisColor()
public java.lang.String getAxisStroke()
setAxisStroke(String)
public void setAxisStroke(java.lang.String axisStroke)
axisStroke
- the stroke for the axis.getAxisStroke()
public double getAxisStartAngle()
setAxisStartAngle(double)
public void setAxisStartAngle(double axisStartAngle)
axisStartAngle
- the start angle for the axis.getAxisStartAngle()
public int getRingStyle()
setRingStyle(int)
public void setRingStyle(int ringStyle)
TWaverConst.RADAE_RING_STYLE_LINE
TWaverConst.RADAE_RING_STYLE_ELLIPSE
ringStyle
- the style for the ring.getRingStyle()
public java.awt.Color getRingMajorColor()
setRingMajorColor(Color)
public void setRingMajorColor(java.awt.Color ringMajorColor)
ringMajorColor
- the major ring color.getRingMajorColor()
public java.lang.String getRingMajorStroke()
setRingMajorStroke(String)
public void setRingMajorStroke(java.lang.String ringMajorStroke)
ringMajorStroke
- the major ring stroke.getRingMajorStroke()
public boolean isRingMinVisible()
setRingMinVisible(boolean)
public void setRingMinVisible(boolean ringMinVisible)
ringMinVisible
- if true the minimum ring should be visible, false otherwise.isRingMinVisible()
public java.awt.Color getRingMinColor()
setRingMinColor(Color)
public void setRingMinColor(java.awt.Color ringMinColor)
ringMinColor
- the color for the minimum ring.getRingMinColor()
public java.lang.String getRingMinStroke()
setRingMinStroke(String)
public void setRingMinStroke(java.lang.String ringMinStroke)
ringMinStroke
- the stroke for the minimum ring.getRingMinStroke()
public double getScaleMaxValue()
setScaleMaxValue(double)
public void setScaleMaxValue(double scaleMaxValue)
scaleMaxValue
- the maximal value for the scale.getScaleMaxValue()
public double getScaleMinValue()
setScaleMinValue(double)
public void setScaleMinValue(double scaleMinValue)
scaleMinValue
- the minimum value for the scalegetScaleMinValue()
public boolean isScaleMajorTextVisible()
setScaleMajorTextVisible(boolean)
public void setScaleMajorTextVisible(boolean scaleMajorTextVisible)
scaleMajorTextVisible
- if true the text of the major scale should be visible, false otherwise.isScaleMajorTextVisible().
public java.awt.Font getScaleMajorTextFont()
setScaleMajorTextFont(Font)
public void setScaleMajorTextFont(java.awt.Font scaleMajorTextFont)
scaleMajorTextFont
- the text font for the major scale.getScaleMajorTextFont()
public java.awt.Color getScaleMajorTextColor()
setScaleMajorTextColor(Color)
public void setScaleMajorTextColor(java.awt.Color scaleMajorTextColor)
scaleMajorTextColor
- the text color for the major scale.getScaleMajorTextColor()
public int getScaleMajorCount()
setScaleMajorCount(int)
public void setScaleMajorCount(int scaleMajorCount)
scaleMajorCount
- the count for the major scale.getScaleMajorCount()
public int getScaleMinCount()
setScaleMinCount(int)
public void setScaleMinCount(int scaleMinCount)
scaleMinCount
- the count for the minimum scale.getScaleMinCount()
public java.util.List getAxisList()
public java.awt.Rectangle getDrawBound()
public boolean isRingVisible()
setRingVisible(boolean)
public void setRingVisible(boolean ringVisible)
ringVisible
- if true the ring should be visible, false otherwise.isRingVisible()
public boolean isAxisTextVisible()
setAxisTextVisible(boolean)
public void setAxisTextVisible(boolean axisTextVisible)
axisTextVisible
- if true the text of the axis should be visible,false otherwise.isAxisTextVisible()
public boolean isAxisVisible()
setAxisVisible(boolean)
public void setAxisVisible(boolean axisVisible)
axisVisible
- if true the axis should be visible, false otherwise.isAxisVisible()
public boolean isRadarFill()
setRadarFill(boolean)
public void setRadarFill(boolean radarFill)
radarFill
- If true the radar should be filled, false otherwise.isRadarFill()
public java.awt.Color getRadarFillColor()
setRadarFillColor(Color)
public void setRadarFillColor(java.awt.Color radarFillColor)
radarFillColor
- the fill color for the radar.getRadarFillColor()
public boolean isRadarFillGradient()
setRadarFillGradient(boolean)
public void setRadarFillGradient(boolean radarFillGradient)
radarFillGradient
- if true the fill color of the radar should be gradient, false otherwise.isRadarFillGradient()
public java.awt.Color getRadarFillGradientColor()
setRadarFillGradientColor(Color)
public void setRadarFillGradientColor(java.awt.Color radarFillGradientColor)
radarFillGradientColor
- the gradient fill color for the radar.getRadarFillGradientColor()
public int getRadarFillGradientFactory()
setRadarFillGradientFactory(int)
public void setRadarFillGradientFactory(int radarFillGradientFactory)
radarFillGradientFactory
- the gradient factory for the fill color.getRadarFillGradientFactory()
public boolean isShapeFillGradient()
setShapeFillGradient(boolean)
public void setShapeFillGradient(boolean shapeFillGradient)
shapeFillGradient
- if true the fill color of the shape should be gradient, false otherwise.isShapeFillGradient()
public java.awt.Color getShapeFillGradientColor()
setShapeFillGradientColor(Color)
public void setShapeFillGradientColor(java.awt.Color shapeFillGradientColor)
shapeFillGradientColor
- the gradient color for the shape.getShapeFillGradientColor()
public int getAxisInflexionStyle()
setAxisInflexionStyle(int)
public void setAxisInflexionStyle(int axisInflexionStyle)
TWaverConst.INFLEXION_STYLE_CIRCLE
TWaverConst.INFLEXION_STYLE_DIAMOND
TWaverConst.INFLEXION_STYLE_RECTANGLE
TWaverConst.INFLEXION_STYLE_TRIANGLE
axisInflexionStyle
- new style for the inflexion in axis.getAxisInflexionStyle()
public boolean isAxisInflexionVisible()
setAxisInflexionVisible(boolean)
public void setAxisInflexionVisible(boolean axisInflexionVisible)
axisInflexionVisible
- if true the inflexion of the axis is visible, false otherwise.isAxisInflexionVisible()
public boolean isInflexionVisible()
setInflexionVisible(boolean)
,
isInflexionVisible(Element)
public void setInflexionVisible(boolean inflexionVisible)
inflexionVisible
- if true the inflexion should ve visible, false otherwise.isInflexionVisible()
,
isInflexionVisible(Element)
public boolean isLineVisible()
setLineVisible(boolean)
,
isLineVisible(Element)
public void setLineVisible(boolean lineVisible)
lineVisible
- if true the line should be visible, false otherwise.isLineVisible()
,
isLineVisible(Element)
public boolean isAreaFill()
setAreaFill(boolean)
,
isAreaFill(Element)
public void setAreaFill(boolean areaFill)
areaFill
- if true the area should be filled, false otherwise.isAreaFill()
,
isAreaFill(Element)
public int getInflexionStyle()
public void setInflexionStyle(int inflexionStyle)
inflexionStyle
- a new inflexion style for the line chartCopyright © 2002 - 2010 Serva Software. All Rights Reserved.