Package-level declarations

Functions

Link copied to clipboard
@Composable
fun Button(text: @Nls String, actionListener: ActionListener, modifier: SwingModifier = SwingModifier)

A Button driven by a raw ActionListener instead of an onClick lambda.

@Composable
fun Button(text: @Nls String, onClick: () -> Unit, modifier: SwingModifier = SwingModifier)

A JButton push button labeled text, which calls onClick each time the button is activated. Activation is an event and nothing more: the button carries no value for the caller to hold.

Link copied to clipboard
@Composable
fun CheckBox(text: @Nls String, checked: Boolean, actionListener: ActionListener, modifier: SwingModifier = SwingModifier)

A CheckBox driven by a raw ActionListener instead of an onCheckedChange lambda. The actionListener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn.

@Composable
fun CheckBox(text: @Nls String, checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: SwingModifier = SwingModifier)

A JCheckBox, a labeled box the user turns on and off. The box shows whatever checked holds, and every toggle the user makes is reported through onCheckedChange. Boxes are independent of one another, so any number of them can be checked at once.

Link copied to clipboard
@Composable
fun RadioButton(text: @Nls String, selected: Boolean, actionListener: ActionListener, modifier: SwingModifier = SwingModifier)

A RadioButton driven by a raw ActionListener instead of an onSelectedChange lambda. The actionListener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn.

@Composable
fun RadioButton(text: @Nls String, selected: Boolean, onSelectedChange: (Boolean) -> Unit, modifier: SwingModifier = SwingModifier)

A JRadioButton, a labeled button showing whether it is chosen. The button shows whatever selected holds, and every activation the user makes is reported through onSelectedChange. Standing alone it clears itself on a second click; making several buttons one choice takes a ButtonGroup. buttonGroup enrolls a button in one, and RadioGroup declares a whole choice.

Link copied to clipboard
@Composable
fun ToggleButton(text: @Nls String, selected: Boolean, actionListener: ActionListener, modifier: SwingModifier = SwingModifier)

A ToggleButton driven by a raw ActionListener instead of an onSelectedChange lambda. The listener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn.

@Composable
fun ToggleButton(text: @Nls String, selected: Boolean, onSelectedChange: (Boolean) -> Unit, modifier: SwingModifier = SwingModifier)

A JToggleButton, a two-state button that stays in until clicked again.