|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.chart.util.elem.Element
li.netcat.chart.util.elem.TextElement
Immutable, basic text element of a chart. It contains the text, the look of the text, the angle and the coordinates of the paint position.
Field Summary | |
static int |
BASELINE
Equal to ChartConstants.BASELINE |
static int |
BOTTOM
Equal to ChartConstants.BOTTOM |
static int |
CENTER
Equal to ChartConstants.CENTER |
static int |
LEFT
Equal to ChartConstants.LEFT |
static int |
RIGHT
Equal to ChartConstants.RIGHT |
static int |
TOP
Equal to ChartConstants.TOP |
Constructor Summary | |
TextElement(DeviceString text,
TextLook textLook,
float x,
float y,
int hAlign,
int vAlign,
double angle,
java.lang.Object perspective)
Constructs a new text element and initializes its fields to the given values. |
|
TextElement(DeviceString text,
TextLook textLook,
float x,
float y,
int hAlign,
int vAlign,
double angle,
java.lang.Object perspective,
LogicalPoint point)
Constructs a new text element and initializes its fields to the given values. |
Method Summary | |
boolean |
contains(java.awt.Point p)
Returns true if this element contains the given point. |
double |
getAngle()
Returns the angle of the text in radians. 0 refers to horizontal text. |
float |
getBaseX()
Returns the x-coordinate of the baseline point. |
float |
getBaseY()
Returns the y-coordinate of the baseline point. |
java.awt.geom.Rectangle2D.Float |
getBounds(java.awt.geom.Rectangle2D.Float out)
Returns the bounds of this element in float precision. |
DeviceString |
getText()
Returns the text of this element. |
TextLook |
getTextLook()
Returns the look of the text. |
Methods inherited from class li.netcat.chart.util.elem.Element |
getLogicalPoint, getPerspective |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TOP
ChartConstants.TOP
public static final int LEFT
ChartConstants.LEFT
public static final int BOTTOM
ChartConstants.BOTTOM
public static final int RIGHT
ChartConstants.RIGHT
public static final int CENTER
ChartConstants.CENTER
public static final int BASELINE
ChartConstants.BASELINE
Constructor Detail |
public TextElement(DeviceString text, TextLook textLook, float x, float y, int hAlign, int vAlign, double angle, java.lang.Object perspective)
text
- The text to be added, not null
.textLook
- The look of the text, not null
.x
- The x-coordinate of the anchor point.y
- The y-coordinate of the anchor point.hAlign
- The horizontal alignment, specify one of LEFT
, CENTER
or RIGHT
.vAlign
- The vertical alignment, specify one of TOP
, CENTER
, BASELINE
or BOTTOM
..angle
- The angle of the text in radians. 0 refers to horizontal text.perspective
- The perspective position of this element.PerspectivePart
public TextElement(DeviceString text, TextLook textLook, float x, float y, int hAlign, int vAlign, double angle, java.lang.Object perspective, LogicalPoint point)
text
- The text to be added, not null
.textLook
- The look of the text, not null
.x
- The x-coordinate of the anchor point.y
- The y-coordinate of the anchor point.hAlign
- The horizontal alignment, specify one of LEFT
, CENTER
or RIGHT
.vAlign
- The vertical alignment, specify one of TOP
, CENTER
, BASELINE
or BOTTOM
..angle
- The angle of the text in radians. 0 refers to horizontal text.perspective
- The perspective position of this element.point
- The logical point to which this element points to.PerspectivePart
Method Detail |
public DeviceString getText()
null
.public TextLook getTextLook()
null
.public double getAngle()
public float getBaseX()
public float getBaseY()
public java.awt.geom.Rectangle2D.Float getBounds(java.awt.geom.Rectangle2D.Float out)
Element
getBounds
in class Element
out
- The return value, not null
.
public boolean contains(java.awt.Point p)
Element
contains
in class Element
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |