Package com.luciad.gui
Class TLcdTextIcon.Builder
java.lang.Object
com.luciad.gui.TLcdTextIcon.Builder
- Enclosing class:
TLcdTextIcon
Builder for creating a text icon.
- Since:
- 2018.1
-
Method Summary
Modifier and TypeMethodDescriptionantiAliased
(boolean aAntiAliased) Enable or disable anti-aliasing.build()
Creates a new text icon.Creates a new text icon, using the givenGraphics
instance to calculate the dimensions.Sets the font for drawing the text.foreground
(Color aForegroundColor) Sets the color of the text.horizontalAlignment
(ELcdHorizontalAlignment aAlignment) Sets the alignment of the lines in the icon.Sets a single line to display.Sets the content to display.verticalSpacing
(int aVerticalSpacing) Sets the vertical distance in between the text's lines.
-
Method Details
-
build
Creates a new text icon. Requires at least the text content to be set usinglines(java.util.List<java.lang.String>)
orline(java.lang.String)
.- Returns:
- a new text icon
- Throws:
IllegalStateException
- If any of the mandatory properties has not been set.
-
build
Creates a new text icon, using the givenGraphics
instance to calculate the dimensions. This method is typically faster than the method withoutGraphics
instance. Requires at least the text content to be set usinglines(java.util.List<java.lang.String>)
orline(java.lang.String)
.- Parameters:
aGraphics
- the graphics used to calculate the icon's dimensions.- Returns:
- a new text icon
- Throws:
IllegalStateException
- If any of the mandatory properties has not been set.
-
line
Sets a single line to display. The line can contain HTML commands if its content is surrounded by an<html>
tag.- Parameters:
aLine
- the line to display. Can be empty, but nevernull
.
-
lines
Sets the content to display. A line can contain HTML commands if its content is surrounded by an<html>
tag.- Parameters:
aLines
- the list of lines to display. Can be empty, but nevernull
.
-
horizontalAlignment
Sets the alignment of the lines in the icon.- Parameters:
aAlignment
- the alignment of the lines in the icon- See Also:
-
font
Sets the font for drawing the text.- Parameters:
aFont
- the font to use to paint the text.- See Also:
-
foreground
Sets the color of the text.- Parameters:
aForegroundColor
- the new color to paint the foreground (text), or null if no color should be set- See Also:
-
verticalSpacing
Sets the vertical distance in between the text's lines. More specifically, the distance between the tops of two successive lines is this value + the standard height of a line of text in the set font. Negative values are allowed.- Parameters:
aVerticalSpacing
- the vertical distance to be used between the lines of the icon, in pixels.- See Also:
-
antiAliased
Enable or disable anti-aliasing. By default, anti-aliasing is enabled.
See also
ILcdGXYView.isAntiAliased()
.- Parameters:
aAntiAliased
- true to enable anti-aliasing- See Also:
-