|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.render.AbstractPieLabelRenderer com.jidesoft.chart.render.SimplePieLabelRenderer
public class SimplePieLabelRenderer
A pie label renderer that displays only the text to render the pie segment. The text may be contained in a box, for which you can specify the background colour and outline colour (if any).
Field Summary | |
---|---|
static String |
PROPERTY_BACKGROUND
|
static String |
PROPERTY_FOREGROUND
|
static String |
PROPERTY_OUTLINE_COLOR
|
static String |
PROPERTY_POINT_LABELER
|
static String |
PROPERTY_RADIUS_PROPORTION
|
Constructor Summary | |
---|---|
SimplePieLabelRenderer()
Default zero-args constructor to create a SimplePieLabelRenderer |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Register interest in property changes |
protected Color |
createBackground(Chart chart,
ChartModel model,
Chartable p)
|
protected Color |
createLabelColor(Chart chart,
ChartModel model,
Chartable p)
|
protected Font |
createLabelFont(Chart chart,
ChartModel model,
Chartable p)
|
protected Color |
createOutlineColor(Chart chart,
ChartModel model,
Chartable p)
|
Color |
getBackground()
|
Color |
getForeground()
Deprecated. Use getLabelColor instead |
Color |
getOutlineColor()
|
Stroke |
getOutlineStroke()
|
PointLabeler |
getPointLabeler()
|
double |
getRadiusProportion()
|
int |
getTickLength()
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
De-register interest in property changes |
void |
renderLabels(Graphics2D g,
Chart chart,
ChartModel model,
Point2D center,
double width,
double height,
float[] angles,
ChartStyle style)
Render the labels to the supplied graphics context |
void |
renderLabels(Graphics g,
Chart chart,
ChartModel model,
Point center,
int width,
int height,
int[] angles,
ChartStyle style)
Render the labels to the supplied graphics context |
void |
setBackground(Color background)
Specify the background color used for the label. |
void |
setForeground(Color foreground)
Deprecated. Use setLabelColor instead |
void |
setOutlineColor(Color outlineColor)
Specify the outline color painted around the text box. |
void |
setOutlineStroke(Stroke outlineStroke)
|
void |
setPointLabeler(PointLabeler pointLabeler)
Set the object responsible for specifying what the labels should say |
void |
setRadiusProportion(double radiusProportion)
Specify the distance of the label from the centre of the pie, as a proportion of the radius. |
void |
setTickLength(int tickLength)
This label renderer does not support a tick length |
Methods inherited from class com.jidesoft.chart.render.AbstractPieLabelRenderer |
---|
getLabelColor, getLabelFont, setLabelColor, setLabelFont |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_RADIUS_PROPORTION
public static final String PROPERTY_POINT_LABELER
public static final String PROPERTY_OUTLINE_COLOR
public static final String PROPERTY_BACKGROUND
public static final String PROPERTY_FOREGROUND
Constructor Detail |
---|
public SimplePieLabelRenderer()
Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener that will receive notificationpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener that will no longer receive notificationpublic double getRadiusProportion()
public void setRadiusProportion(double radiusProportion)
radiusProportion
- the location of the label as a proportion of the radius of the pie.public PointLabeler getPointLabeler()
getPointLabeler
in interface PieLabelRenderer
public Color getBackground()
public void setBackground(Color background)
background
- the new background colorprotected Color createBackground(Chart chart, ChartModel model, Chartable p)
public Color getForeground()
public void setForeground(Color foreground)
foreground
- the new foreground colorprotected Color createLabelColor(Chart chart, ChartModel model, Chartable p)
protected Font createLabelFont(Chart chart, ChartModel model, Chartable p)
public Color getOutlineColor()
public void setOutlineColor(Color outlineColor)
outlineColor
- the outline colorprotected Color createOutlineColor(Chart chart, ChartModel model, Chartable p)
public Stroke getOutlineStroke()
public void setOutlineStroke(Stroke outlineStroke)
public void setPointLabeler(PointLabeler pointLabeler)
setPointLabeler
in interface PieLabelRenderer
public int getTickLength()
getTickLength
in interface PieLabelRenderer
public void setTickLength(int tickLength)
setTickLength
in interface PieLabelRenderer
tickLength
- the length of the ticks in pixelspublic void renderLabels(Graphics g, Chart chart, ChartModel model, Point center, int width, int height, int[] angles, ChartStyle style)
renderLabels
in interface PieLabelRenderer
g
- the graphics contextchart
- the chart to rendermodel
- the model from which the points comecenter
- the center of the piewidth
- the width of the pieheight
- the height of the pieangles
- the angles to use for the segments of the piestyle
- the chart style to use for displaying the segmentspublic void renderLabels(Graphics2D g, Chart chart, ChartModel model, Point2D center, double width, double height, float[] angles, ChartStyle style)
PieLabelRenderer2D
renderLabels
in interface PieLabelRenderer2D
g
- the graphics contextchart
- the chart to rendermodel
- the model from which the points comecenter
- the center of the piewidth
- the width of the pieheight
- the height of the pieangles
- the angles to use for the segments of the piestyle
- the chart style to use for displaying the segments
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |