floodsim.view.component.UIComponent
See theUIComponent companion trait
object UIComponent
Factory methods for styled Swing components.
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
UIComponent.type
Members list
Value members
Concrete methods
Creates a styled JButton with the given text and size.
Creates a styled JButton with the given text and size.
Value parameters
- size
-
button preferred size
- text
-
button text
Attributes
- Returns
-
the styled JButton
Creates a styled JLabel with the given text, font, and alignment.
Creates a styled JLabel with the given text, font, and alignment.
Value parameters
- align
-
text alignment (e.g. SwingConstants.LEFT)
- font
-
label font
- text
-
label text
Attributes
- Returns
-
the styled JLabel
Creates a styled JPanel with the application background color.
Creates a styled JPanel with the application background color.
Attributes
- Returns
-
the styled JPanel
Extensions
Extensions
extension (button: JButton)
Registers an action to be performed when the button is clicked.
Registers an action to be performed when the button is clicked.
Value parameters
- action
-
the action to perform
Attributes
- Returns
-
the JButton with the action listener added
In this article