ButtonView

ButtonView is a base implementation providing functionality to draw a button. Inherits BoxView.spring-doc.cn

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

You can set a text for a button and action to do when button is selected.spring-doc.cn

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

Default Bindings

Default key bindigs are:spring-doc.cn

Table 1. Key
Command Description

Enterspring-doc.cn

Selects a buttonspring-doc.cn

Default mouse bindigs are:spring-doc.cn

Table 2. Mouse
Command Description

Released | Button1spring-doc.cn

Selects a buttonspring-doc.cn

Events

Table 3. ListView Events
Event Description

ButtonViewSelectEventspring-doc.cn

Button is selected.spring-doc.cn