public class SVGBubbleChart extends AbstractSVGXYScaleChart
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 |
---|
SVGBubbleChart()
Creates a new
BubbleChart object |
SVGBubbleChart(TDataBox box)
Creates a new
BubbleChart object initialized an explicit data box |
SVGBubbleChart(TDataBox box,
java.lang.String title,
java.awt.Color backgroundColor)
Creates a new
SVGBubbleChart object initialized with an explicit
data box,a title and a background color. |
SVGBubbleChart(TDataBox box,
java.lang.String title,
java.awt.Color backgroundColor,
java.awt.Color foregroundColor)
Creates a new
SVGBubbleChart object initialized with an explicit
data box,a title , a background color and a foreground color. |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateYAxisRange()
Calculate the scale range, max scale,minimal scale of the y axis.
|
protected java.awt.Color |
getAreaColor(Element element)
Gets the area color of the element when the line type is area.
|
float |
getBubbleAlpha()
Gets the alpha of the bubble.
|
java.awt.Color |
getBubbleGradientColor()
Gets the gradient color of the bubble.
|
int |
getBubbleGradientFactory()
Gets the gradient factory of the bubble.
|
protected java.util.List |
getBubbleList(Element element,
java.util.List list)
User can rewrite this method to sort the bubble list.
|
int |
getBubbleStyle()
Gets the style of the bubble.
|
int |
getInflexionStyle()
Gets the style of the inflexion.
|
protected java.awt.Color |
getLineColor(Element element,
Bubble startBubble,
Bubble endBubble)
Gets the color of the line.
|
int |
getLineType()
Gets the type of the line.
|
protected java.awt.Color |
getSelectedLineColor(Element element,
Bubble startBubble,
Bubble endBubble)
Gets the color of the selected line.
|
protected java.awt.geom.Rectangle2D.Double |
getShapeBounds(Element element,
java.awt.geom.Point2D.Double point,
Bubble bubble,
int index)
Gets the bounds of the inflexion
|
protected boolean |
getShapeBubbleVisible(Element element,
Bubble bubble,
int index)
Gets whether the bubble shape is visible.
|
protected java.awt.Color |
getShapeColor(Element element,
Bubble bubble,
int index)
Gets the color of the shape.
|
protected boolean |
getShapeLineVisible(Element element)
Gets whether the line is visible.
|
protected double |
getShapeSize(Element element,
Bubble bubble,
int index)
Gets the size of the shape bounds of the inflexion or bubble.
|
protected int |
getShapeStyle(Element element,
Bubble bubble,
int index)
Gets the style of the bubble.
|
int |
getValueSpanCount()
Gets the span count of the value.
|
protected java.lang.String |
getValueText(Element element,
Bubble bubble,
int index)
Gets the value text of bubble of the element.
|
protected java.awt.Color |
getValueTextColor(Element element,
Bubble bubble,
int index)
Gets the color of the value text,
|
protected int |
getValueTextPosition(Element element,
Bubble bubble,
int index)
Gets the position of the value text of the element.
|
boolean |
isAreaSelectable()
Gets whether the area can be selected when the line type is TWaverConst.LINE_TYPE_AREA.
|
boolean |
isBubbleGradient()
Gets whether the bubble is gradient.
|
boolean |
isInflexionVisible()
Determines whether the inflexion is visible.
|
boolean |
isShapeBubbleVisible()
Gets whether the bubble is visible when the bubble value >0 .
|
boolean |
isShapeLineVisible()
Gets whether the line is visible.
|
protected void |
paintContent(SVGContext context,
java.lang.StringBuffer result,
int width,
int height)
Paints the bubbles in the value list of all the element.
|
protected java.awt.Shape |
paintLine(SVGContext context,
java.lang.StringBuffer result,
java.awt.geom.Line2D.Double line,
Element element,
java.awt.Stroke stroke,
Bubble startBubble,
Bubble endBubble) |
protected void |
paintShape(SVGContext context,
java.lang.StringBuffer result,
Element element,
java.awt.geom.Point2D.Double point,
Bubble bubble,
int index)
Paints the inflexion and bubble shape.
|
void |
removeHead(int count)
Removes the count value from the value list of all elements.
|
void |
setAreaSelectable(boolean areaSelectable)
Sets whether the area can be selected when the line type is TWaverConst.LINE_TYPE_AREA.
|
void |
setBubbleAlpha(float bubbleAlpha)
Sets the alpha for the bubble.
|
void |
setBubbleGradient(boolean bubbleGradient)
Sets whether the bubble is gradient.
|
void |
setBubbleGradientColor(java.awt.Color bubbleGradientColor)
Sets the gradient color of the bubble.
|
void |
setBubbleGradientFactory(int bubbleGradientFactory)
Sets the gradient factory for the bubble
Legal Values are: TWaverConst.GRADIENT_***
|
void |
setBubbleStyle(int bubbleStyle)
Sets new default style for the bubble.
|
void |
setInflexionStyle(int inflexionStyle)
Sets the style for the inflexion.
|
void |
setInflexionVisible(boolean inflexionVisible)
Sets whether the inflexion should be visible.
|
void |
setLineType(int lineType)
Sets new type for the line.
|
void |
setShapeBubbleVisible(boolean bubbleVisible)
Sets whether the bubble is visible when the bubble value >0 .
|
void |
setShapeLineVisible(boolean lineVisible)
Sets whether the line is visible.
|
void |
setValueSpanCount(int valueSpanCount)
Sets a new span count of the value.
|
addXScaleText, calculate, calculateXScaleTextHeight, calculateYScaleValueGap, getDrawBound, getFormatedXScaleText, getFormatedYScaleText, getXAxisExtraGap, getXAxisFillColor, getXAxisOutlineColor, getXAxisStartPosition, getXAxisStroke, getXAxisText, getXAxisTextColor, getXAxisTextFont, getXAxisUnit, getXAxisUnitColor, getXAxisUnitFont, getXScaleActualValueGap, getXScaleHideValueIndex, getXScaleLineColor, getXScaleLineStroke, getXScaleMaxValue, getXScaleMinValue, getXScalePixelGap, getXScaleTextColor, getXScaleTextFont, getXScaleTextFormat, getXScaleTextFromScaleList, getXScaleTextList, getXScaleTextOrientation, getXScaleValueGap, getYAxisFillColor, getYAxisOutlineColor, getYAxisStartPosition, getYAxisStroke, getYAxisText, getYAxisTextColor, getYAxisTextFont, getYAxisUnit, getYAxisUnitColor, getYAxisUnitFont, getYScaleActualValueGap, getYScaleHideValueIndex, getYScaleLineColor, getYScaleLineStroke, getYScaleMaxValue, getYScaleMinValue, getYScalePixelGap, getYScaleTextColor, getYScaleTextFont, getYScaleTextFormat, getYScaleValueGap, isXAxisUnitVisible, isXAxisVisible, isXScaleLineVisible, isXScaleTextOnTop, isXScaleTextVisible, isYAxisUnitVisible, isYAxisVisible, isYScaleLineVisible, isYScaleTextInside, isYScaleTextVisible, isYScaleValueGapAutoCalculate, paintChart, setXAxisFillColor, setXAxisOutlineColor, setXAxisStartPosition, setXAxisStroke, setXAxisText, setXAxisTextColor, setXAxisTextFont, setXAxisUnit, setXAxisUnitColor, setXAxisUnitFont, setXAxisUnitVisible, setXAxisVisible, setXScaleHideValueIndex, setXScaleLineColor, setXScaleLineStroke, setXScaleLineVisible, setXScaleMaxValue, setXScaleMinValue, setXScalePixelGap, setXScaleTextColor, setXScaleTextFont, setXScaleTextFormat, setXScaleTextList, setXScaleTextOnTop, setXScaleTextOrientation, setXScaleTextVisible, setXScaleValueGap, setYAxisFillColor, setYAxisOutlineColor, setYAxisStartPosition, setYAxisStroke, setYAxisText, setYAxisTextColor, setYAxisTextFont, setYAxisUnit, setYAxisUnitColor, setYAxisUnitFont, setYAxisUnitVisible, setYAxisVisible, setYScaleHideValueIndex, setYScaleLineColor, setYScaleLineStroke, setYScaleLineVisible, setYScaleMaxValue, setYScaleMinValue, setYScalePixelGap, setYScaleTextColor, setYScaleTextFont, setYScaleTextFormat, setYScaleTextInside, setYScaleTextVisible, setYScaleValueGap, setYScaleValueGapAutoCalculate, toSVGContent
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 SVGBubbleChart()
BubbleChart
objectpublic SVGBubbleChart(TDataBox box)
BubbleChart
object initialized an explicit data boxbox
- an explicit data boxpublic SVGBubbleChart(TDataBox box, java.lang.String title, java.awt.Color backgroundColor)
SVGBubbleChart
object initialized with an explicit
data box,a title and a background color.box
- an explicit data box object.title
- a String
titlebackgroundColor
- a background Color
objectpublic SVGBubbleChart(TDataBox box, java.lang.String title, java.awt.Color backgroundColor, java.awt.Color foregroundColor)
SVGBubbleChart
object initialized with an explicit
data box,a title , a background color and a foreground color.box
- an explicit data box object.title
- a String
titlebackgroundColor
- a background Color
objectforegroundColor
- a foreground Color
objectprotected void calculateYAxisRange()
calculateYAxisRange
in class AbstractSVGXYScaleChart
protected void paintContent(SVGContext context, java.lang.StringBuffer result, int width, int height)
paintContent
in class AbstractSVGXYScaleChart
protected java.util.List getBubbleList(Element element, java.util.List list)
element
- list
- the primal listprotected boolean getShapeLineVisible(Element element)
element
- protected boolean getShapeBubbleVisible(Element element, Bubble bubble, int index)
element
- bubble
- index
- protected java.awt.Shape paintLine(SVGContext context, java.lang.StringBuffer result, java.awt.geom.Line2D.Double line, Element element, java.awt.Stroke stroke, Bubble startBubble, Bubble endBubble)
protected java.awt.Color getLineColor(Element element, Bubble startBubble, Bubble endBubble)
protected java.awt.Color getSelectedLineColor(Element element, Bubble startBubble, Bubble endBubble)
protected void paintShape(SVGContext context, java.lang.StringBuffer result, Element element, java.awt.geom.Point2D.Double point, Bubble bubble, int index)
g2d
- element
- the Element instance which contains the bubblepoint
- the point where the shape is painted.bubble
- the Bubble instanceindex
- protected java.awt.Color getAreaColor(Element element)
element
- protected int getValueTextPosition(Element element, Bubble bubble, int index)
element
- bubble
- protected java.awt.Color getValueTextColor(Element element, Bubble bubble, int index)
element
- bubble
- index
- protected java.lang.String getValueText(Element element, Bubble bubble, int index)
element
- bubble
- index
- protected java.awt.Color getShapeColor(Element element, Bubble bubble, int index)
protected int getShapeStyle(Element element, Bubble bubble, int index)
protected java.awt.geom.Rectangle2D.Double getShapeBounds(Element element, java.awt.geom.Point2D.Double point, Bubble bubble, int index)
protected double getShapeSize(Element element, Bubble bubble, int index)
public void removeHead(int count)
count
- the number that needs to be removed.public boolean isInflexionVisible()
public void setInflexionVisible(boolean inflexionVisible)
inflexionVisible
- if true the inflexion should be visible, false otherwise.public int getInflexionStyle()
setInflexionStyle(int)
public void setInflexionStyle(int inflexionStyle)
TWaverConst.INFLEXION_STYLE_CIRCLE
TWaverConst.INFLEXION_STYLE_DIAMOND
TWaverConst.INFLEXION_STYLE_RECTANGLE
TWaverConst.INFLEXION_STYLE_TRIANGLE
inflexionStyle
- the style for the inflexion.getInflexionStyle()
public int getLineType()
setLineType(int)
public void setLineType(int lineType)
lineType
- new type for the line.getLineType()
public boolean isAreaSelectable()
setAreaSelectable(boolean)
public void setAreaSelectable(boolean areaSelectable)
areaSelectable
- if true the area can be selected, false otherwise.isAreaSelectable()
public boolean isShapeLineVisible()
#setLineVisible(boolean)
public void setShapeLineVisible(boolean lineVisible)
lineVisible
- if true the line will be visible, false otherwise.#isLineVisible()
public boolean isShapeBubbleVisible()
#setBubbleVisible(boolean)
public void setShapeBubbleVisible(boolean bubbleVisible)
bubbleVisible
- if true the bubble will be visible when the bubble value >0, false otherwise.#isBubbleVisible()
public float getBubbleAlpha()
setBubbleAlpha(float)
public void setBubbleAlpha(float bubbleAlpha)
bubbleAlpha
must be a floating point number in the inclusive range [0.0, 1.0].bubbleAlpha
- the alpha for the bubble.getBubbleAlpha()
public int getBubbleGradientFactory()
setBubbleGradientFactory(int)
public void setBubbleGradientFactory(int bubbleGradientFactory)
bubbleGradientFactory
- the gradient factory for the bubble.getBubbleGradientFactory()
public boolean isBubbleGradient()
setBubbleGradient(boolean)
public void setBubbleGradient(boolean bubbleGradient)
bubbleGradient
- if true the bubble will be gradient, false otherwise.isBubbleGradient()
public int getBubbleStyle()
setBubbleStyle(int)
public void setBubbleStyle(int bubbleStyle)
bubbleStyle
- new default style for the bubble.getBubbleStyle()
public java.awt.Color getBubbleGradientColor()
setBubbleGradientColor(Color)
public void setBubbleGradientColor(java.awt.Color bubbleGradientColor)
bubbleGradientColor
- the gradient color of the bubble.getBubbleGradientColor()
public int getValueSpanCount()
public void setValueSpanCount(int valueSpanCount)
valueSpanCount
- a new span count of the valueCopyright © 2002 - 2010 Serva Software. All Rights Reserved.