|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.text.TextPainter
lt.monarch.chart.text.RotatedLabelPainter
lt.monarch.chart.text.LabelTextPainter
lt.monarch.chart.chart2D.series.PieSliceLabelEntry
public class PieSliceLabelEntry extends LabelTextPainter
Defines label of pie chart slices
| Modifier and Type | Field and Description |
|---|---|
protected double |
explode
|
protected java.awt.FontMetrics |
fmetrics
|
protected double |
halfAngle
|
protected java.awt.Image |
image
|
protected double |
imageMargin
|
protected double |
inner
|
protected Rectangle2D |
labelPosition
|
protected double |
lmargin
|
protected double |
radius
|
protected double |
rotate
|
protected double |
sliceAngle
|
protected double |
startAngle
|
| Fields inherited from class lt.monarch.chart.text.TextPainter |
|---|
boundingBox, hAlignment, text, vAlignment, xMargin, yMargin |
| Constructor and Description |
|---|
PieSliceLabelEntry()
Constructor the PieSliceLabelEntry |
PieSliceLabelEntry(java.lang.String s,
double radius,
double explode,
double inner,
double startAngle,
double sliceAngle,
Point2D center,
java.awt.FontMetrics fm,
double margin)
Constructor the PieSliceLabelEntry |
| Modifier and Type | Method and Description |
|---|---|
double |
getAngle()
Returns outer angle of pie chart segment |
Point2D |
getCenter()
Return pie center point |
double |
getExplodeRadius()
Returns pie slice explode radius. |
java.awt.FontMetrics |
getFontMetrics()
Return font metrics of label |
Area |
getFullArea()
|
java.awt.Dimension |
getFullSize()
Get full size of label (calculates with setted font metrics) |
double |
getHalfAngle()
Return pie slices half angles |
int |
getIndex()
|
double |
getInner()
Returns inner radius |
Rectangle2D |
getLabelPosition()
Return position of label |
Polygon2D |
getLine()
Get straight or elbow lines of slices |
double |
getPieMargin()
Return pie margin |
Rectangle2D |
getPreferredBounds(java.awt.FontMetrics fm)
Preferred bounds are enough to paint full label. |
double |
getRadius()
Returns section radius |
double |
getRotate()
Get rotate angle of label |
ChartElementEntity |
getSliceLabelConnectorEntity(AbstractChartSeries<?,?> series,
Rectangle2D bounds,
PaintStyle<?> paintStyle)
|
ChartElementEntity |
getSliceLabelEntity(AbstractChartSeries<?,?> series,
Rectangle2D bounds,
PaintStyle<?> paintStyle,
TextStyle<?> textStyle)
|
double |
getStartAngle()
Returns slice start angle of pie chart segment |
boolean |
isOutsideLabel()
Returns is outside label or not. |
void |
paint(AbstractGraphics g,
Rectangle2D r)
Paints text (possibly rotated) into specified rectangle using provided graphics context. |
void |
refreshSliceLabelEntry(java.lang.String s,
double radius,
double explode,
double inner,
double startAngle,
double sliceAngle,
Point2D center,
java.awt.FontMetrics fm,
double margin,
java.awt.Image image)
Refreshes the PieSliceLabelEntry values |
void |
setIndex(int index)
|
void |
setLabelPosition(Rectangle2D position)
Set label position |
void |
setLine(Polygon2D line)
Set straight or elbow lines of slices |
void |
setOutsideLabel(boolean outsideLabel)
Sets is outside label or not. |
void |
setRotate(double rotate)
Set rotate angle of label |
| Methods inherited from class lt.monarch.chart.text.LabelTextPainter |
|---|
findBounds, getFullArea, getFullSize, getRelativePosition, getRotationAngle, getRotationPoint, setRelativePosition, setRotationAngle, setRotationPoint, setText |
| Methods inherited from class lt.monarch.chart.text.TextPainter |
|---|
dispose, getBounds, getHorizontalAlignment, getHorizontalMargin, getMarginInPixels, getMinimumHeight, getMinimumSize, getMinimumSize, getText, getVerticalAlignment, getVerticalMargin, getWrappingEnabled, setHorizontalAlignment, setHorizontalMargin, setMargin, setText, setVerticalAlignment, setVerticalMargin, setWrappingEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double radius
protected double explode
protected double inner
protected double startAngle
protected double halfAngle
protected double sliceAngle
protected double rotate
protected Rectangle2D labelPosition
protected java.awt.FontMetrics fmetrics
protected double lmargin
protected java.awt.Image image
protected double imageMargin
| Constructor Detail |
|---|
public PieSliceLabelEntry(java.lang.String s,
double radius,
double explode,
double inner,
double startAngle,
double sliceAngle,
Point2D center,
java.awt.FontMetrics fm,
double margin)
s - text of labelradius - radius of slicesexplode - explode of sliceinner - inner radius of slicestartAngle - start angle of slicesliceAngle - angle of slicecenter - center of piefm - font metrics of labelmargin - margin of labelpublic PieSliceLabelEntry()
| Method Detail |
|---|
public void refreshSliceLabelEntry(java.lang.String s,
double radius,
double explode,
double inner,
double startAngle,
double sliceAngle,
Point2D center,
java.awt.FontMetrics fm,
double margin,
java.awt.Image image)
s - text of labelradius - radius of slicesexplode - explode of sliceinner - inner radius of slicestartAngle - start angle of slicesliceAngle - angle of slicecenter - center of piefm - font metrics of labelmargin - margin of labelimage - image of labelpublic double getHalfAngle()
public double getExplodeRadius()
public double getStartAngle()
public double getRadius()
public double getAngle()
public Point2D getCenter()
public double getInner()
public java.awt.FontMetrics getFontMetrics()
public double getPieMargin()
public Polygon2D getLine()
public void setLine(Polygon2D line)
straight - or elbow polygons of slicespublic double getRotate()
public void setRotate(double rotate)
rotate - the rotate to setpublic void setLabelPosition(Rectangle2D position)
position - label positionpublic Rectangle2D getLabelPosition()
public int getIndex()
public void setIndex(int index)
public ChartElementEntity getSliceLabelEntity(AbstractChartSeries<?,?> series,
Rectangle2D bounds,
PaintStyle<?> paintStyle,
TextStyle<?> textStyle)
public ChartElementEntity getSliceLabelConnectorEntity(AbstractChartSeries<?,?> series,
Rectangle2D bounds,
PaintStyle<?> paintStyle)
public java.awt.Dimension getFullSize()
public Rectangle2D getPreferredBounds(java.awt.FontMetrics fm)
LabelTextPaintergetFullSize method to get size of label.
getPreferredBounds in class LabelTextPainterfm - FontMetricsnull if rotation point is not set
public void paint(AbstractGraphics g,
Rectangle2D r)
LabelTextPainter
paint in interface AbstractTextPainterpaint in class LabelTextPainterg - current graphics contextr - rectangle where text is painted.public void setOutsideLabel(boolean outsideLabel)
outsideLabel - the outsideLabel to setpublic boolean isOutsideLabel()
public Area getFullArea()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||