public class TLspLabelBoxStyle extends ALspStyle
It defines the following properties:
TLspLabelBoxStyle.Builder.frameThickness(float)
and TLspLabelBoxStyle.Builder.frameColor(java.awt.Color)
. The frame can also have a halo, see TLspLabelBoxStyle.Builder.haloColor(java.awt.Color)
and TLspLabelBoxStyle.Builder.haloThickness(float)
.TLspLabelBoxStyle.Builder.filled(boolean)
and TLspLabelBoxStyle.Builder.fillColor(java.awt.Color)
.TLspLabelBoxStyle.Builder.padding(int)
.Construction of a label box style object is performed through the Builder
design pattern mechanism.
Note that it is possible to use multiple TLspLabelBoxStyles
in a label styler. In that case, the padding
property is always defined relative to the content (text or icon) of the label. Also, the painting order is defined
by the order in which the styles are passed to the styler.
Modifier and Type | Class and Description |
---|---|
static class |
TLspLabelBoxStyle.Builder<B extends TLspLabelBoxStyle.Builder<B>>
Builder for label box styles.
|
Modifier and Type | Method and Description |
---|---|
TLspLabelBoxStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
boolean |
equals(Object o) |
Color |
getFillColor()
Returns the background color of the label.
|
Color |
getFrameColor()
Returns the color the frame should be drawn in.
|
float |
getFrameThickness()
Returns the line width (in pixels) of the frame.
|
Color |
getHaloColor()
Gets the halo color.
|
float |
getHaloThickness()
Gets the halo thickness.
|
int |
getPadding()
Returns the padding (in pixels) between the label content (text or icon) and its frame.
|
int |
hashCode() |
boolean |
isFilled()
Indicates whether the label should have a non-transparent background.
|
boolean |
isTransparent()
Determines whether this style is transparent.
|
static TLspLabelBoxStyle.Builder<?> |
newBuilder()
Creates a new builder with the default values.
|
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
public static TLspLabelBoxStyle.Builder<?> newBuilder()
public TLspLabelBoxStyle.Builder<?> asBuilder()
public int getPadding()
public float getFrameThickness()
Returns 0
if no frame should be drawn.
public Color getFrameColor()
getFrameThickness()
is not 0.public boolean isFilled()
true
if the label should have a non-transparent background, false
otherwise.public Color getFillColor()
isFilled()
is true
.public Color getHaloColor()
getHaloThickness()
public float getHaloThickness()
getHaloColor()
public boolean isTransparent()
ALspStyle
isTransparent
in class ALspStyle