mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-09 19:00:48 +00:00
Merge branch 'master' of https://git.scc.kit.edu/pse-typinferenz/typicalc
This commit is contained in:
commit
0379cf5db6
@ -76,13 +76,15 @@ public class TypeInferenceView extends VerticalLayout
|
||||
|
||||
@Override
|
||||
public void firstStepButton() {
|
||||
currentStep = currentStep > tree.getStepCount() && tree.getStepCount() > 0 ? tree.getStepCount() - 1 : 0;
|
||||
int treeEnd = treeNumbers.indexOf(tree.getStepCount() - 1);
|
||||
currentStep = currentStep > treeEnd && tree.getStepCount() > 0 ? treeEnd : 0;
|
||||
refreshElements();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lastStepButton() {
|
||||
currentStep = currentStep < tree.getStepCount() - 1 ? tree.getStepCount() - 1 : unification.getStepCount() - 1;
|
||||
int treeEnd = treeNumbers.indexOf(tree.getStepCount() - 1);
|
||||
currentStep = currentStep < treeEnd ? treeEnd : unification.getStepCount() - 1;
|
||||
refreshElements();
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
package edu.kit.typicalc.view.main;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.vaadin.flow.component.button.Button;
|
||||
import com.vaadin.flow.component.dependency.CssImport;
|
||||
import com.vaadin.flow.component.icon.Icon;
|
||||
@ -12,6 +8,9 @@ import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||
import com.vaadin.flow.component.textfield.TextField;
|
||||
import com.vaadin.flow.i18n.LocaleChangeEvent;
|
||||
import com.vaadin.flow.i18n.LocaleChangeObserver;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Represents a single type assumption. Each TypeAssumptionField is displayed in the TypeAssumptionsArea.
|
||||
@ -56,7 +55,7 @@ public class TypeAssumptionField extends HorizontalLayout implements LocaleChang
|
||||
variableInputField.setLabel(getTranslation("root.variable"));
|
||||
typeInputField = new TextField();
|
||||
typeInputField.setLabel(getTranslation("root.type"));
|
||||
Icon minusIcon = new Icon(VaadinIcon.MINUS_CIRCLE);
|
||||
Icon minusIcon = new Icon(VaadinIcon.TRASH);
|
||||
minusIcon.setId(MINUS_ICON_ID);
|
||||
Button deleteButton = new Button(minusIcon, event -> deleteSelf.accept(this));
|
||||
deleteButton.setId(ASS_DELETE_BUTTON_ID);
|
||||
|
Loading…
Reference in New Issue
Block a user