public abstract class GaugeGlyph extends SpecialGlyph
限定符和类型 | 字段和说明 |
---|---|
protected AttrLabel |
attrLabel |
protected java.awt.geom.Rectangle2D |
bounds |
static int |
CATEGORY_LABEL_GAP |
protected java.lang.String |
cateOrPercentLabelString |
protected java.awt.geom.Point2D |
centerPoint |
protected java.util.List |
colorList |
static int |
DEFAULT_COLOR_NUMBER |
protected java.awt.Color[] |
defaultColors |
protected int |
extent |
protected static int |
GAP |
protected VanChartGaugeAxisGlyph |
gaugeAxisGlyph |
protected GaugeDetailStyle |
gaugeDetailStyle |
protected static double |
PIE |
protected double |
radius |
protected int |
startAngle |
protected java.lang.String |
valueLabelString |
protected java.util.List<java.lang.Number> |
valueList |
构造器和说明 |
---|
GaugeGlyph(java.awt.geom.Rectangle2D bounds,
AttrLabel attrLabel,
GaugeDetailStyle gaugeDetailStyle,
VanChartGaugeAxisGlyph gaugeAxisGlyph) |
限定符和类型 | 方法和说明 |
---|---|
void |
addValue(java.lang.Double value) |
protected void |
calculateRadiusAndCenterPoint(double width,
double height,
double cateLabelHeight) |
void |
doLayout(double cateLabelHeight,
int resolution) |
void |
draw(java.awt.Graphics graphics,
int resolution)
将图像对象画到屏幕上
|
protected void |
drawCateOrPercentageLabel(java.awt.Graphics2D g2d,
int resolution) |
protected abstract void |
drawInfo(java.awt.Graphics2D g2d,
int resolution) |
protected void |
drawPaneBackground(java.awt.Graphics2D g2d) |
protected void |
drawValueLabel(java.awt.Graphics2D g2d,
int resolution) |
protected java.awt.geom.Rectangle2D |
getCateOrPercentLabelBounds(int position,
java.awt.geom.Dimension2D dim) |
java.lang.String |
getCateOrPercentLabelWithDataPoint(DataPoint dataPoint) |
protected java.awt.Color |
getDefaultValueColor(double tickValue,
double minValue,
double maxValue) |
Position |
getPosition() |
java.awt.Shape |
getShape()
返回表示该Glyph的几何形状的对象
|
protected java.awt.Color |
getValueColor(double tickValue,
double minValue,
double maxValue) |
protected java.awt.geom.Rectangle2D |
getValueLabelBounds(int position,
java.awt.geom.Dimension2D dim) |
java.lang.String |
getValueLabelWithDataPoint(DataPoint dataPoint) |
protected void |
initStartAngleAndExtent() |
protected void |
setCateOrPercentLabelAutoFont(TextAttr textAttr) |
void |
setCateOrPercentLabelString(DataPoint dataPoint) |
void |
setColorList(java.util.List colorList) |
void |
setDefaultColors(java.awt.Color[] defaultColors) |
void |
setPosition(Position position) |
void |
setValueLabelString(java.lang.String valueLabelString) |
clone, selectableChildren, toJSONObject
public static final int DEFAULT_COLOR_NUMBER
public static final int CATEGORY_LABEL_GAP
protected static final int GAP
protected static final double PIE
protected java.awt.geom.Rectangle2D bounds
protected java.awt.geom.Point2D centerPoint
protected double radius
protected int startAngle
protected int extent
protected AttrLabel attrLabel
protected GaugeDetailStyle gaugeDetailStyle
protected VanChartGaugeAxisGlyph gaugeAxisGlyph
protected java.awt.Color[] defaultColors
protected java.util.List colorList
protected java.lang.String cateOrPercentLabelString
protected java.lang.String valueLabelString
protected java.util.List<java.lang.Number> valueList
public GaugeGlyph(java.awt.geom.Rectangle2D bounds, AttrLabel attrLabel, GaugeDetailStyle gaugeDetailStyle, VanChartGaugeAxisGlyph gaugeAxisGlyph)
public void setPosition(Position position)
public Position getPosition()
public void setDefaultColors(java.awt.Color[] defaultColors)
public void setColorList(java.util.List colorList)
public void setCateOrPercentLabelString(DataPoint dataPoint)
public void setValueLabelString(java.lang.String valueLabelString)
public void addValue(java.lang.Double value)
public void doLayout(double cateLabelHeight, int resolution)
protected void initStartAngleAndExtent()
protected void calculateRadiusAndCenterPoint(double width, double height, double cateLabelHeight)
public void draw(java.awt.Graphics graphics, int resolution)
Glyph
graphics
- 画图对象resolution
- 屏幕分辨率protected abstract void drawInfo(java.awt.Graphics2D g2d, int resolution)
protected void drawPaneBackground(java.awt.Graphics2D g2d)
protected void drawCateOrPercentageLabel(java.awt.Graphics2D g2d, int resolution)
protected void setCateOrPercentLabelAutoFont(TextAttr textAttr)
protected java.awt.geom.Rectangle2D getCateOrPercentLabelBounds(int position, java.awt.geom.Dimension2D dim)
protected void drawValueLabel(java.awt.Graphics2D g2d, int resolution)
protected java.awt.geom.Rectangle2D getValueLabelBounds(int position, java.awt.geom.Dimension2D dim)
protected java.awt.Color getValueColor(double tickValue, double minValue, double maxValue)
protected java.awt.Color getDefaultValueColor(double tickValue, double minValue, double maxValue)
public java.lang.String getCateOrPercentLabelWithDataPoint(DataPoint dataPoint)
public java.lang.String getValueLabelWithDataPoint(DataPoint dataPoint)
public java.awt.Shape getShape()
Glyph