A Text object is a one-line editable text string.
Common Methods
GUI Text Methods
Edit
Opens an editor for the text properties.
x:
The x position of the text object.
y:
The y position of the text object.
Font Size:
The font size of the text string.
Text:
The text string.
Face:
The font face of the text string. The available choices depend on
which fonts that are available on the particular machine. In order to ensure
portability between different platforms it is recommended to only use
the following face names: Serif, SansSerif, Monospaced,
Dialog, and DialogInput. These are guaranteed to be available in every
Java system. However, they may map to different real fonts depending on
the platform.
Visible:
If checked the text object is visible. (Default: Checked)
Hint: Invisible text objects can still be seen in a Tree View.
Selectable:
If checked it is possible to select the text.
Hint: Not selectable object can still be selected in a Tree View.
(Default: Checked)
Resizable:
If checked it is possible to resize the text object. (Default: Checked)
Draggable:
If checked it is possible to move the text object. (Default: Checked)
2D Scale:
If checked the width and the height can be resized separately and the font size
will depend on both the width and the height, rather than just the height.
(Default: Unchecked)
AutoResize:
If checked the text object width is adjusted when the text string is changed.
Otherwise the font size is adjusted. (Default: Checked)
Clipping:
If checked, only the text within the text object is drawn. Only meaningful
if not resizable. (Default: Unchecked)
Editable:
If checked the text string can be edited. (Default: Checked)
Single Click Edit:
If checked only a single click is required to start editing. Only meaningful
if editable. (Default: Checked)
Bold:
If checked the text is bold. (Default: Checked)
Italic:
If checked the text is italic. (Default: Unchecked)
Underline:
If checked the text is underlined. (Default: Unchecked)
Strike:
If checked the text is strike-throughed. (Default: Unchecked)
Alignment:
Select the text alignment: Left justify, Center, or Right justify.
Only meaningful when not resizable. (Default: Left)
Text Color:
Choose the text color. (Default: Black)
Background:
Choose the background color. Only meaningful when not transparent. (Default: White)
Transparent:
If checked the text background is transparent. (Default: Checked)
Select Background:
If checked the text background is shown when selected.
Only meaningful when transparent and not resizable. (Default: Unchecked)
Name
Opens an edit dialog for the name.