|
|||||||||
| 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
public class LabelTextPainter extends RotatedLabelPainter
| Modifier and Type | Field and Description |
|---|
| Fields inherited from class lt.monarch.chart.text.TextPainter |
|---|
boundingBox, hAlignment, text, vAlignment, xMargin, yMargin |
| Constructor and Description |
|---|
LabelTextPainter()
Creates default label text painter for specified text string. |
LabelTextPainter(java.lang.String s)
Creates default label text painter for specified text string. |
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
findBounds(AbstractGraphics g,
Rectangle2D r)
This method finds bounds for the label. |
Area |
getFullArea(java.awt.FontMetrics fm)
Returns the area where is label. |
protected java.awt.Dimension |
getFullSize(java.awt.FontMetrics fm)
Returns full not rotated text size. |
Rectangle2D |
getPreferredBounds(java.awt.FontMetrics fm)
Preferred bounds are enough to paint full label. |
float |
getRelativePosition()
Returns relative position for the label |
double |
getRotationAngle()
Returns rotation angle in radians for text. |
Point2D |
getRotationPoint()
Returns rotation point. |
void |
paint(AbstractGraphics g,
Rectangle2D r)
Paints text (possibly rotated) into specified rectangle using provided graphics context. |
void |
setRelativePosition(float pos)
Sets relative (to rotation point) position for not rotated labels. |
void |
setRotationAngle(double angle)
Sets rotation angle in radians for text. |
void |
setRotationPoint(Point2D rotPoint)
Sets rotation point. |
void |
setText(java.lang.String s)
Sets text for text painter. |
| 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 |
| Constructor Detail |
|---|
public LabelTextPainter(java.lang.String s)
s - text string.public LabelTextPainter()
| Method Detail |
|---|
public void setText(java.lang.String s)
setText in interface AbstractTextPaintersetText in class TextPainters - text string.public void setRotationAngle(double angle)
setRotationAngle in class RotatedLabelPainterangle - rotation anglepublic void setRotationPoint(Point2D rotPoint)
setRotationPoint in class RotatedLabelPainterrotPoint - rotation pointpublic void setRelativePosition(float pos)
setRelativePosition in class RotatedLabelPainterpos - relative positionpublic float getRelativePosition()
RotatedLabelPainter
getRelativePosition in class RotatedLabelPainterpublic Point2D getRotationPoint()
getRotationPoint in class RotatedLabelPainterpublic double getRotationAngle()
getRotationAngle in class RotatedLabelPainterprotected java.awt.Dimension getFullSize(java.awt.FontMetrics fm)
getFullSize in class RotatedLabelPainterfm - text font metrics.
public Rectangle2D findBounds(AbstractGraphics g,
Rectangle2D r)
findBounds in interface AbstractTextPainterfindBounds in class TextPainterg - abstract graphicsr - rectangle boundariespublic Rectangle2D getPreferredBounds(java.awt.FontMetrics fm)
getFullSize method to get size of label.
getPreferredBounds in class RotatedLabelPainterfm - FontMetricsfont - font of labelnull if rotation point is not setpublic Area getFullArea(java.awt.FontMetrics fm)
RotatedLabelPainter
getFullArea in class RotatedLabelPainterfm - font metrics
public void paint(AbstractGraphics g,
Rectangle2D r)
paint in interface AbstractTextPainterpaint in class TextPainterg - current graphics contextr - rectangle where text is painted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||