From fff1b3a23f9ce019ff74d681ba11ee25b306a003 Mon Sep 17 00:00:00 2001 From: ucrhh Date: Thu, 11 Feb 2021 14:43:51 +0100 Subject: [PATCH] remove not needed localeChange(null) calls --- src/main/java/edu/kit/typicalc/view/main/DrawerContent.java | 2 -- src/main/java/edu/kit/typicalc/view/main/ExampleDialog.java | 2 -- src/main/java/edu/kit/typicalc/view/main/HelpDialog.java | 6 ++---- src/main/java/edu/kit/typicalc/view/main/InputBar.java | 2 -- src/main/java/edu/kit/typicalc/view/main/NotFoundView.java | 2 -- .../edu/kit/typicalc/view/main/TypeAssumptionField.java | 2 -- .../edu/kit/typicalc/view/main/TypeAssumptionsArea.java | 2 -- src/main/java/edu/kit/typicalc/view/main/UpperBar.java | 2 -- 8 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/main/java/edu/kit/typicalc/view/main/DrawerContent.java b/src/main/java/edu/kit/typicalc/view/main/DrawerContent.java index 4d0d0f0..1d4a812 100644 --- a/src/main/java/edu/kit/typicalc/view/main/DrawerContent.java +++ b/src/main/java/edu/kit/typicalc/view/main/DrawerContent.java @@ -32,8 +32,6 @@ public class DrawerContent extends VerticalLayout implements LocaleChangeObserve ruleContainer.setId(RULE_CONTAINER_ID); add(heading, ruleContainer); setId(DRAWER_CONTENT_ID); - - localeChange(null); } @Override diff --git a/src/main/java/edu/kit/typicalc/view/main/ExampleDialog.java b/src/main/java/edu/kit/typicalc/view/main/ExampleDialog.java index dd306e3..cb872c4 100644 --- a/src/main/java/edu/kit/typicalc/view/main/ExampleDialog.java +++ b/src/main/java/edu/kit/typicalc/view/main/ExampleDialog.java @@ -47,8 +47,6 @@ public class ExampleDialog extends Dialog implements LocaleChangeObserver { } add(layout); setId(EXAMPLE_DIALOG_ID); - - localeChange(null); // initialize text content } @Override diff --git a/src/main/java/edu/kit/typicalc/view/main/HelpDialog.java b/src/main/java/edu/kit/typicalc/view/main/HelpDialog.java index 704e7e9..aa92b91 100644 --- a/src/main/java/edu/kit/typicalc/view/main/HelpDialog.java +++ b/src/main/java/edu/kit/typicalc/view/main/HelpDialog.java @@ -1,7 +1,5 @@ package edu.kit.typicalc.view.main; -import java.util.Locale; - import com.vaadin.flow.component.ItemLabelGenerator; import com.vaadin.flow.component.UI; import com.vaadin.flow.component.dependency.CssImport; @@ -14,6 +12,8 @@ import com.vaadin.flow.component.select.Select; import com.vaadin.flow.i18n.LocaleChangeEvent; import com.vaadin.flow.i18n.LocaleChangeObserver; +import java.util.Locale; + /** * Contains information on how to use the application. */ @@ -54,8 +54,6 @@ public class HelpDialog extends Dialog implements LocaleChangeObserver { contentLayout.setId(CONTENT_LAYOUT_ID); contentLayout.add(inputSyntax); add(headingLayout, contentLayout); - - localeChange(null); } @Override diff --git a/src/main/java/edu/kit/typicalc/view/main/InputBar.java b/src/main/java/edu/kit/typicalc/view/main/InputBar.java index 40c8ba8..426acc2 100644 --- a/src/main/java/edu/kit/typicalc/view/main/InputBar.java +++ b/src/main/java/edu/kit/typicalc/view/main/InputBar.java @@ -85,8 +85,6 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver { add(infoIcon, typeAssumptions, lambdaButton, inputField, exampleButton, inferTypeButton); setId(INPUT_BAR_ID); - - localeChange(null); } /** diff --git a/src/main/java/edu/kit/typicalc/view/main/NotFoundView.java b/src/main/java/edu/kit/typicalc/view/main/NotFoundView.java index 2a80cb4..5f0d825 100644 --- a/src/main/java/edu/kit/typicalc/view/main/NotFoundView.java +++ b/src/main/java/edu/kit/typicalc/view/main/NotFoundView.java @@ -23,8 +23,6 @@ public class NotFoundView extends VerticalLayout implements LocaleChangeObserver suggestion = new H2(); add(error404, suggestion); // todo make beautiful setAlignItems(Alignment.CENTER); - - localeChange(null); } @Override diff --git a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java index a3bde1e..333c3c8 100644 --- a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java +++ b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java @@ -60,8 +60,6 @@ public class TypeAssumptionField extends HorizontalLayout implements LocaleChang deleteButton.setId(ASS_DELETE_BUTTON_ID); add(variableInputField, typeInputField, deleteButton); setId(ASSUMPTIONS_FIELD_ID); - - localeChange(null); } /** diff --git a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java index dbf24fa..565250b 100644 --- a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java +++ b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java @@ -78,8 +78,6 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver layout.add(heading, buttons, assumptionContainer); layout.setPadding(false); add(layout); - - localeChange(null); } /** diff --git a/src/main/java/edu/kit/typicalc/view/main/UpperBar.java b/src/main/java/edu/kit/typicalc/view/main/UpperBar.java index 034517b..925e100 100644 --- a/src/main/java/edu/kit/typicalc/view/main/UpperBar.java +++ b/src/main/java/edu/kit/typicalc/view/main/UpperBar.java @@ -70,8 +70,6 @@ public class UpperBar extends HorizontalLayout implements LocaleChangeObserver { setId(UPPER_BAR_ID); getThemeList().set("dark", true); //TODO remove magic string setSpacing(false); - - localeChange(null); } /**