|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.text.AxisLabel
public class AxisLabel extends java.lang.Object implements AbstractAxisLabel
Axis label class
| Modifier and Type | Field and Description |
|---|---|
protected Area |
area
Label bounding polygon |
protected Orientation |
axisOrientation
Axis orientation |
protected Rectangle2D |
bounds
Rectangle inside which label text should be painted |
protected java.awt.FontMetrics |
fm
Font metrics |
protected boolean |
keyLabel
Is key label |
protected Rectangle2D |
wrappedBounds
Rectangle inside which word wrapped label text should be painted |
| Constructor and Description |
|---|
AxisLabel(int level,
Rectangle2D r,
java.awt.Font font,
java.lang.String text,
RotatedLabelPainter painter,
java.awt.FontMetrics fm,
Orientation axisOrientation,
int index,
boolean isKeyLabel)
Axis label class constructor |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawText(AbstractGraphics g,
Rectangle2D r,
AbstractTextPainter painter)
Draws the text using specified painter |
double |
endPos()
Returns the end position of the label. |
double |
endPosOtherAxis()
|
Orientation |
getAxisOrientation()
Return axis on which is label orientation |
Rectangle2D |
getBounds()
Gets label bounds |
int |
getIndex()
Gets the index value of this label |
Area |
getLabelArea()
Gets label bounding area |
RotatedLabelPainter |
getPainter()
Return label text painter |
java.lang.String |
getText()
Gets label text |
boolean |
isKeyLabel()
Indicates that label is key label |
int |
level()
Returns a level of the label. |
void |
move(double deltax,
double deltay)
Moves the label the specified x and y offset. |
void |
moveToX(double posX)
Moves the label to the specified X position. |
void |
moveToY(double posY)
Moves the label to the specified Y position. |
void |
paint(AbstractGraphics g)
Renders lebel on the Graphics context. |
double |
position()
Returns a label position. |
double |
startPos()
Returns the start position of the label. |
double |
startPosOtherAxis()
|
java.lang.String |
toString()
|
void |
wrap(double wrapWidth)
Attempt to word wrap text to specified width |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Rectangle2D wrappedBounds
protected Rectangle2D bounds
protected java.awt.FontMetrics fm
protected Area area
protected Orientation axisOrientation
protected boolean keyLabel
| Constructor Detail |
|---|
public AxisLabel(int level,
Rectangle2D r,
java.awt.Font font,
java.lang.String text,
RotatedLabelPainter painter,
java.awt.FontMetrics fm,
Orientation axisOrientation,
int index,
boolean isKeyLabel)
level - label levelr - bounding rectanglefont - label fonttext - label textpainter - text painterfm - font metricsaxisOrientation - axis orientationindex - index of the label in the axisisKeyLabel - is key label| Method Detail |
|---|
public java.lang.String getText()
getText in interface AbstractAxisLabel
protected void drawText(AbstractGraphics g,
Rectangle2D r,
AbstractTextPainter painter)
g - graphics contextr - rectangle boundspainter - text painterpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getIndex()
AbstractAxisLabel
getIndex in interface AbstractAxisLabelpublic void wrap(double wrapWidth)
wrapWidth - width of wrapping areapublic Rectangle2D getBounds()
getBounds in interface AbstractAxisLabel
public void move(double deltax,
double deltay)
AbstractAxisLabel
move in interface AbstractAxisLabeldeltax - x offsetdeltay - y offsetpublic void paint(AbstractGraphics g)
AbstractAxisLabel
paint in interface AbstractAxisLabelg - graphics contextpublic int level()
AbstractAxisLabel
level in interface AbstractAxisLabelpublic double position()
AbstractAxisLabel
position in interface AbstractAxisLabelpublic double startPos()
AbstractAxisLabel
startPos in interface AbstractAxisLabelpublic double startPosOtherAxis()
public double endPos()
AbstractAxisLabel
endPos in interface AbstractAxisLabelpublic double endPosOtherAxis()
public void moveToY(double posY)
AbstractAxisLabel
moveToY in interface AbstractAxisLabelposY - the Y position to move label topublic void moveToX(double posX)
AbstractAxisLabel
moveToX in interface AbstractAxisLabelposX - the X position to move label topublic Area getLabelArea()
AbstractAxisLabel
getLabelArea in interface AbstractAxisLabelpublic boolean isKeyLabel()
AbstractAxisLabel
isKeyLabel in interface AbstractAxisLabelpublic RotatedLabelPainter getPainter()
public Orientation getAxisOrientation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||