public class Text extends BasicGraphicalElement
Constructor and Description |
---|
Text(GraphPoint position,
java.lang.String text,
GraphicAttributes attributes)
Creates an instance with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
GraphPoint |
getPosition()
Returns the position.
|
java.lang.String |
getText()
Returns the text string.
|
void |
renderWith(Renderer renderer)
Renders this line with the specified
Renderer . |
getGraphicAttributes, isClosed
public Text(GraphPoint position, java.lang.String text, GraphicAttributes attributes)
position
- Position of the text.text
- Text.attributes
- Drawing attributes. Can be null.public GraphPoint getPosition()
public java.lang.String getText()
public void renderWith(Renderer renderer)
Renderer
.renderer
- An instance of TextRenderer
.java.lang.IllegalArgumentException
- if renderer is not
an instance of TextRenderer.Copyright © 2020. All Rights Reserved.