public class TextGroupElement extends TextElement
Modifier and Type | Class and Description |
---|---|
class |
TextGroupElement.Child
A string of text that should be shown around the parent.
|
static class |
TextGroupElement.Position
Compass-point positions for text element annotation children.
|
Modifier and Type | Field and Description |
---|---|
List<TextGroupElement.Child> |
children
The child text elements.
|
color, text, xCoord, yCoord
Constructor and Description |
---|
TextGroupElement(double x,
double y,
String text,
Color color)
Make a text group at (x, y) with the text and color given.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(IRenderingVisitor v)
Converts this
TextElement into widget specific objects. |
void |
addChild(String text,
String subscript,
TextGroupElement.Position position)
Add a child text element with a subscript.
|
void |
addChild(String text,
TextGroupElement.Position position)
Add a child text element.
|
public final List<TextGroupElement.Child> children
public TextGroupElement(double x, double y, String text, Color color)
x
- the x-coordinate of the center of the texty
- the y-coordinate of the center of the texttext
- the text to rendercolor
- the color of the textpublic void addChild(String text, TextGroupElement.Position position)
text
- the child text to addposition
- the position of the child relative to this parentpublic void addChild(String text, String subscript, TextGroupElement.Position position)
text
- the child text to addsubscript
- a subscript for the childposition
- the position of the child relative to the parentpublic void accept(IRenderingVisitor v)
TextElement
into widget specific objects.accept
in interface IRenderingElement
accept
in class TextElement
v
- Toolkit specific widget factory.Copyright © 2017. All Rights Reserved.