class TextItem extends Item
Add text to a cartographic document
| Type | Name and description |
|---|---|
java.awt.Color |
color |
java.awt.Font |
font |
HorizontalAlign |
horizontalAlign |
java.lang.String |
text |
VerticalAlign |
verticalAlign |
| Constructor and description |
|---|
TextItem
(int x, int y, int width, int height)Create text from the top left with the given width and height. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
TextItem |
color(java.awt.Color color)Set the color |
|
TextItem |
font(java.awt.Font font)Set the font |
|
TextItem |
horizontalAlign(HorizontalAlign horizontalAlign)Set the horizontal alignment |
|
TextItem |
text(java.lang.String text)Set the text |
|
java.lang.String |
toString() |
|
TextItem |
verticalAlign(VerticalAlign verticalAlign)Set the vertical alignment |
| Methods inherited from class | Name |
|---|---|
class Item |
getRectangle |
Create text from the top left with the given width and height.
x - The number of pixels from the lefty - The number of pixels from the topwidth - The width in pixelsheight - The height in pixelsSet the color
color - The text colorSet the font
font - The fontSet the horizontal alignment
horizontalAlign - The HorizontalAlignSet the text
text - The textSet the vertical alignment
verticalAlign - The VerticalAlignGroovy Documentation