Package com.tonic.vellum.widget
Class BorderSection
- java.lang.Object
-
- com.tonic.vellum.Section
-
- com.tonic.vellum.widget.BorderSection
-
public final class BorderSection extends Section
A border with an optional title around a single child, insetting the child's bounds by one cell. The frame is drawn in the focused style while the child is on the focus path.
-
-
Constructor Summary
Constructors Constructor Description BorderSection(Section child)Creates a border around the given child.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BorderSectionaround(Section child)Wraps a section in a border.static BorderSectionaround(Section child, java.lang.String title)Wraps a section in a titled border.StylefocusedStyle()BorderSectionfocusedStyle(Style style)Sets the frame style used when the child is on the focus path.BorderSectiontitle(java.lang.String title)Sets the border title drawn into the top edge.StyleunfocusedStyle()BorderSectionunfocusedStyle(Style style)Sets the frame style used when the child is not on the focus path.
-
-
-
Constructor Detail
-
BorderSection
public BorderSection(Section child)
Creates a border around the given child.- Parameters:
child- the wrapped child section
-
-
Method Detail
-
around
public static BorderSection around(Section child)
Wraps a section in a border.- Parameters:
child- the wrapped child section- Returns:
- a new border around the child
-
around
public static BorderSection around(Section child, java.lang.String title)
Wraps a section in a titled border.- Parameters:
child- the wrapped child sectiontitle- the border title- Returns:
- a new titled border around the child
-
title
public BorderSection title(java.lang.String title)
Sets the border title drawn into the top edge.- Parameters:
title- the title text- Returns:
- this BorderSection for chaining
-
focusedStyle
public BorderSection focusedStyle(Style style)
Sets the frame style used when the child is on the focus path.- Parameters:
style- the focused frame style- Returns:
- this BorderSection for chaining
-
unfocusedStyle
public BorderSection unfocusedStyle(Style style)
Sets the frame style used when the child is not on the focus path.- Parameters:
style- the unfocused frame style- Returns:
- this BorderSection for chaining
-
focusedStyle
public Style focusedStyle()
- Returns:
- the frame style used when the child is on the focus path
-
unfocusedStyle
public Style unfocusedStyle()
- Returns:
- the frame style used when the child is not on the focus path
-
-