Package com.luciad.gui
Class TLcdBoxIcon.Builder
java.lang.Object
com.luciad.gui.TLcdBoxIcon.Builder
- Enclosing class:
TLcdBoxIcon
Builder for creating a box icon.
The default box has a padding of 2 pixels, a white 1-pixel border and no fill.
- Since:
- 2018.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new box icon.Sets the color that fills the background.filled
(boolean aFilled) Sets whether to paint the content on a filled background.frame
(boolean aFramed) Sets whether or not to surround the content with a frame.frameColor
(Color aFrameColor) Sets the color of the frame.frameLineWidth
(int aLineWidth) Sets the width of the border of the frame.Sets the icon to draw a box around.padding
(int aPadding) Sets the amount of padding around the text, in pixels.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
icon
Sets the icon to draw a box around.- Parameters:
aIcon
- the icon to draw a box around. Never null.
-
frameColor
Sets the color of the frame.- Parameters:
aFrameColor
- the new color to paint the frame, or null if no color should be set- See Also:
-
fillColor
Sets the color that fills the background.- Parameters:
aFillColor
- the color to fill the background, if this behavior isenabled
- See Also:
-
frame
Sets whether or not to surround the content with a frame.- Parameters:
aFramed
- true to paint the content in a frame.- See Also:
-
frameLineWidth
Sets the width of the border of the frame.- Parameters:
aLineWidth
- the width of the border of the frame, in pixels
-
filled
Sets whether to paint the content on a filled background.- Parameters:
aFilled
- true to paint content on a filled background.- See Also:
-
padding
Sets the amount of padding around the text, in pixels. If the frame is painted, it will be painted around this margin.- Parameters:
aPadding
- the new padding size, in pixels. Must be>= 0
.- See Also:
-
build
Creates a new box icon. Requires at least theicon(com.luciad.gui.ILcdIcon)
content to be set.- Returns:
- a new box icon
- Throws:
IllegalStateException
- If any of the mandatory properties has not been set.
-