mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-09 02:40:42 +00:00
fix that examples are now visualized on click
This commit is contained in:
parent
f1df0fee45
commit
e658060fd1
@ -108,10 +108,14 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
|
|||||||
typeAssumptionsArea = new TypeAssumptionsArea(typeAssumptions);
|
typeAssumptionsArea = new TypeAssumptionsArea(typeAssumptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void setTermAndClickTypeInfer(String term) {
|
||||||
|
setTerm(term);
|
||||||
|
onTypeInferButtonClick();
|
||||||
|
}
|
||||||
|
|
||||||
private void onTypeInferButtonClick() {
|
private void onTypeInferButtonClick() {
|
||||||
String currentInput = inputField.getOptionalValue().orElse(StringUtils.EMPTY);
|
String currentInput = inputField.getOptionalValue().orElse(StringUtils.EMPTY);
|
||||||
inputField.blur();
|
inputField.blur();
|
||||||
|
|
||||||
callback.accept(Pair.of(currentInput, typeAssumptionsArea.getTypeAssumptions()));
|
callback.accept(Pair.of(currentInput, typeAssumptionsArea.getTypeAssumptions()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +124,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onExampleButtonClick() {
|
private void onExampleButtonClick() {
|
||||||
Dialog exampleDialog = new ExampleDialog(this::setTerm);
|
Dialog exampleDialog = new ExampleDialog(this::setTermAndClickTypeInfer);
|
||||||
exampleDialog.open();
|
exampleDialog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user