ButtonView
ButtonView is a base implementation providing functionality to draw a button. ButtonView inherits from 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 bindings are:
| Command | Description |
|---|---|
Enter |
Selects a button |
Default mouse bindings are:
| Command | Description |
|---|---|
Released | Button1 |
Selects a button |