Class Ui
java.lang.Object
wiiuu.ui.Ui
Small Swing app toolkit. Create and use on the Swing event thread. Factory controls retain
Swing models/listeners, layout managers, clipboard, keyboard navigation and accessibility.
A Ui instance owns a theme, not a global look-and-feel; retheme each host root explicitly.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTheme(Component root) Apply this instance's current theme to toolkit controls in a tree, including late additions.button(String text, ActionListener action) card(LayoutManager layout) Rounded content container with 16px padding; accepts any Swing layout.Vertical stack with a fixed gap, aligned to the leading edge.<T> JComboBox<T> comboBox(T[] items) Uses the Swing combo-box model and popup behavior; items may have a host-supplied renderer.label(String text, JComponent control) Label a form control and give it an accessible name when it has none.mutedLabel(String text) page(LayoutManager layout) Gradient page container.panel(LayoutManager layout) Theme-coloured plain panel, useful with any Swing layout manager.primaryButton(String text) primaryButton(String text, ActionListener action) progressBar(int minimum, int maximum) scrollPane(Component view) voidChange future controls and restyle existing toolkit controls under root, preserving their state.theme()Selected and unselected states use the same rounded painter as buttons.
-
Constructor Details
-
Ui
public Ui() -
Ui
-
-
Method Details
-
theme
-
setTheme
-
applyTheme
Apply this instance's current theme to toolkit controls in a tree, including late additions. -
button
-
button
-
-
primaryButton
-
toggle
Selected and unselected states use the same rounded painter as buttons. -
checkBox
-
label
-
label
Label a form control and give it an accessible name when it has none. -
mutedLabel
-
heading
-
textField
-
textArea
-
comboBox
Uses the Swing combo-box model and popup behavior; items may have a host-supplied renderer. -
progressBar
-
panel
Theme-coloured plain panel, useful with any Swing layout manager. -
card
Rounded content container with 16px padding; accepts any Swing layout. -
page
Gradient page container. The background cache is invalidated on resize/theme changes. -
scrollPane
-
row
-
column
-