Package com.tonic.vellum.widget
Class LabelSection
- java.lang.Object
-
- com.tonic.vellum.Section
-
- com.tonic.vellum.widget.SingleRowSection
-
- com.tonic.vellum.widget.LabelSection
-
public final class LabelSection extends SingleRowSection
A single line of static or settable text, with optional horizontal alignment.
-
-
Constructor Summary
Constructors Constructor Description LabelSection(java.lang.String text)Creates a label with the given text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelSectionalignment(Alignment alignment)Sets the horizontal alignment.LabelSectionsetText(java.lang.String text)Sets the label text.LabelSectionstyle(Style style)Sets the text style.java.lang.Stringtext()
-
-
-
Method Detail
-
setText
public LabelSection setText(java.lang.String text)
Sets the label text. Anulltext is treated as empty.- Parameters:
text- the new text- Returns:
- this LabelSection for chaining
-
alignment
public LabelSection alignment(Alignment alignment)
Sets the horizontal alignment.- Parameters:
alignment- the alignment- Returns:
- this LabelSection for chaining
-
style
public LabelSection style(Style style)
Sets the text style.- Parameters:
style- the style- Returns:
- this LabelSection for chaining
-
text
public java.lang.String text()
- Returns:
- the current text
-
-