Package jcckit.graphic
Class Text
- java.lang.Object
-
- jcckit.graphic.BasicGraphicalElement
-
- jcckit.graphic.Text
-
- All Implemented Interfaces:
GraphicalElement
public class Text extends BasicGraphicalElement
A single line of text.- Author:
- Franz-Josef Elmer
-
-
Constructor Summary
Constructors Constructor Description Text(GraphPoint position, String text, GraphicAttributes attributes)Creates an instance with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphPointgetPosition()Returns the position.StringgetText()Returns the text string.voidrenderWith(Renderer renderer)Renders this line with the specifiedRenderer.-
Methods inherited from class jcckit.graphic.BasicGraphicalElement
getGraphicAttributes, isClosed
-
-
-
-
Constructor Detail
-
Text
public Text(GraphPoint position, String text, GraphicAttributes attributes)
Creates an instance with the specified parameters.- Parameters:
position- Position of the text.text- Text.attributes- Drawing attributes. Can be null.
-
-
Method Detail
-
getPosition
public GraphPoint getPosition()
Returns the position.
-
getText
public String getText()
Returns the text string.
-
renderWith
public void renderWith(Renderer renderer)
Renders this line with the specifiedRenderer.- Parameters:
renderer- An instance ofTextRenderer.- Throws:
IllegalArgumentException- if renderer is not an instance of TextRenderer.
-
-