|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdrawing.graphics.GraphicsElement
org.jdrawing.graphics.GraphicsOperation
org.jdrawing.graphics.DrawString
Graphics element which corresponds to
Graphics.drawString(String, int, int)
| Field Summary |
| Fields inherited from class org.jdrawing.graphics.GraphicsElement |
BACKGROUND, COLOR, COMPOSITE, FONT, PAINT, parent, position, STROKE, TRANSFORM |
| Constructor Summary | |
DrawString(java.lang.String text,
float x,
float y)
Returns DrawString for specified text at specified location. |
|
| Method Summary | |
boolean |
contains(java.awt.geom.Point2D point)
Tests if the element containes given point. |
java.awt.Rectangle |
getBounds()
Returns bounding box of the element. |
java.awt.geom.Rectangle2D |
getBounds2D()
Returns high precision bounding box of the element. |
java.lang.String |
getText()
Returns the text to be drawn. |
float |
getX()
Returns the X coordinate of the text. |
float |
getY()
Returns the Y coordinate of the text. |
boolean |
intersects(java.awt.geom.Rectangle2D rectangle)
Tests if the element intersects with the given rectangle. |
void |
paintOperation(java.awt.Graphics2D graphics)
Performs grawing operation. |
void |
setText(java.lang.String text)
Sets the text to be drawn. |
void |
setX(float x)
Sets the X coordinate of the text. |
void |
setY(float y)
Sets the Y coordinate of the text. |
| Methods inherited from class org.jdrawing.graphics.GraphicsOperation |
paint, update |
| Methods inherited from class org.jdrawing.graphics.GraphicsElement |
addStyle, getParent, getStyle, getStyles, getTransform |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DrawString(java.lang.String text,
float x,
float y)
text - text to be drownx - the x coordinate of the stringy - the y coordinate of the string| Method Detail |
public void setText(java.lang.String text)
text - text to be drownpublic java.lang.String getText()
public void setX(float x)
x - the x coordinatepublic float getX()
public void setY(float y)
y - the y coordinatepublic float getY()
public void paintOperation(java.awt.Graphics2D graphics)
graphics.drawString ().
paintOperation in class GraphicsOperationgraphics - graphics context to use for paintingpublic java.awt.Rectangle getBounds()
public java.awt.geom.Rectangle2D getBounds2D()
public boolean intersects(java.awt.geom.Rectangle2D rectangle)
rectangle - rectangle to be cheched for intersection
public boolean contains(java.awt.geom.Point2D point)
point - to be checked
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||