mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-09 10:50:42 +00:00
Limit scope of close shortcut in type assumptions
This commit is contained in:
parent
002f402691
commit
caeb2fca84
@ -66,15 +66,15 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
|
||||
VerticalLayout layout = new VerticalLayout();
|
||||
layout.setId(ASS_LAYOUT_ID);
|
||||
|
||||
assumptionContainer = new VerticalLayout();
|
||||
assumptionContainer.setId(ASS_CONTAINER_ID);
|
||||
|
||||
addAssumption = new Button("", new Icon(VaadinIcon.PLUS_CIRCLE));
|
||||
deleteAll = new Button("", new Icon(VaadinIcon.TRASH));
|
||||
saveAssumptions = new Button(getTranslation("root.save"), event -> closeAction());
|
||||
HorizontalLayout buttons = makeButtons();
|
||||
buttons.setId(ASS_BUTTONS_ID);
|
||||
|
||||
assumptionContainer = new VerticalLayout();
|
||||
assumptionContainer.setId(ASS_CONTAINER_ID);
|
||||
|
||||
hintLabel = new Label("");
|
||||
hintLabel.setId(HINT_ID);
|
||||
|
||||
@ -134,10 +134,11 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
|
||||
deleteAll.setIconAfterText(true);
|
||||
deleteAll.addThemeVariants(ButtonVariant.LUMO_ERROR);
|
||||
saveAssumptions.addThemeVariants(ButtonVariant.LUMO_SUCCESS);
|
||||
saveAssumptions.addClickShortcut(Key.ENTER);
|
||||
saveAssumptions.addClickShortcut(Key.ENTER).listenOn(assumptionContainer);
|
||||
buttons.add(addAssumption, deleteAll, saveAssumptions);
|
||||
return buttons;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new empty TypeAssumptionsArea.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user