ButtonView

ButtonView is a base implementation providing functionality to draw a button. Inherits BoxView.

┌──────┐
│ text │
└──────┘

You can set a text for a button and action to do when button is selected.

ButtonView view = new ButtonView();
view.setText("text");
view.setAction(() -> {
	// do something when selected
});

Default Bindings

Default key bindigs are:

Table 1. Key
Command Description

Enter

Selects a button

Default mouse bindigs are:

Table 2. Mouse
Command Description

Released | Button1

Selects a button

Events

Table 3. ListView Events
Event Description

ButtonViewSelectEvent

Button is selected.