|
JIDE 3.3.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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 |
Color |
getBackground()
|
Color |
getForeground()
Deprecated. Use getLabelColor instead |
Color |
getOutlineColor()
|
Stroke |
getOutlineStroke()
|
PointLabeler |
getPointLabeler()
|
double |
getRadiusProportion()
|
int |
getTickLength()
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Deregister 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 PieLabelRendererpublic Color getBackground()
public void setBackground(Color background)
background - the new background colorpublic Color getForeground()
public void setForeground(Color foreground)
foreground - the new foreground colorpublic Color getOutlineColor()
public void setOutlineColor(Color outlineColor)
outlineColor - the outline colorpublic Stroke getOutlineStroke()
public void setOutlineStroke(Stroke outlineStroke)
public void setPointLabeler(PointLabeler pointLabeler)
setPointLabeler in interface PieLabelRendererpublic int getTickLength()
getTickLength in interface PieLabelRendererpublic void setTickLength(int tickLength)
setTickLength in interface PieLabelRenderertickLength - the length of the ticks in pixels
public void renderLabels(Graphics g,
Chart chart,
ChartModel model,
Point center,
int width,
int height,
int[] angles,
ChartStyle style)
renderLabels in interface PieLabelRendererg - 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
public void renderLabels(Graphics2D g,
Chart chart,
ChartModel model,
Point2D center,
double width,
double height,
float[] angles,
ChartStyle style)
PieLabelRenderer2D
renderLabels in interface PieLabelRenderer2Dg - 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.3.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||