remove not needed localeChange(null) calls

This commit is contained in:
ucrhh 2021-02-11 14:43:51 +01:00
parent 47d78be6db
commit fff1b3a23f
8 changed files with 2 additions and 18 deletions

View File

@ -32,8 +32,6 @@ public class DrawerContent extends VerticalLayout implements LocaleChangeObserve
ruleContainer.setId(RULE_CONTAINER_ID); ruleContainer.setId(RULE_CONTAINER_ID);
add(heading, ruleContainer); add(heading, ruleContainer);
setId(DRAWER_CONTENT_ID); setId(DRAWER_CONTENT_ID);
localeChange(null);
} }
@Override @Override

View File

@ -47,8 +47,6 @@ public class ExampleDialog extends Dialog implements LocaleChangeObserver {
} }
add(layout); add(layout);
setId(EXAMPLE_DIALOG_ID); setId(EXAMPLE_DIALOG_ID);
localeChange(null); // initialize text content
} }
@Override @Override

View File

@ -1,7 +1,5 @@
package edu.kit.typicalc.view.main; package edu.kit.typicalc.view.main;
import java.util.Locale;
import com.vaadin.flow.component.ItemLabelGenerator; import com.vaadin.flow.component.ItemLabelGenerator;
import com.vaadin.flow.component.UI; import com.vaadin.flow.component.UI;
import com.vaadin.flow.component.dependency.CssImport; 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.LocaleChangeEvent;
import com.vaadin.flow.i18n.LocaleChangeObserver; import com.vaadin.flow.i18n.LocaleChangeObserver;
import java.util.Locale;
/** /**
* Contains information on how to use the application. * 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.setId(CONTENT_LAYOUT_ID);
contentLayout.add(inputSyntax); contentLayout.add(inputSyntax);
add(headingLayout, contentLayout); add(headingLayout, contentLayout);
localeChange(null);
} }
@Override @Override

View File

@ -85,8 +85,6 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
add(infoIcon, typeAssumptions, lambdaButton, inputField, exampleButton, inferTypeButton); add(infoIcon, typeAssumptions, lambdaButton, inputField, exampleButton, inferTypeButton);
setId(INPUT_BAR_ID); setId(INPUT_BAR_ID);
localeChange(null);
} }
/** /**

View File

@ -23,8 +23,6 @@ public class NotFoundView extends VerticalLayout implements LocaleChangeObserver
suggestion = new H2(); suggestion = new H2();
add(error404, suggestion); // todo make beautiful add(error404, suggestion); // todo make beautiful
setAlignItems(Alignment.CENTER); setAlignItems(Alignment.CENTER);
localeChange(null);
} }
@Override @Override

View File

@ -60,8 +60,6 @@ public class TypeAssumptionField extends HorizontalLayout implements LocaleChang
deleteButton.setId(ASS_DELETE_BUTTON_ID); deleteButton.setId(ASS_DELETE_BUTTON_ID);
add(variableInputField, typeInputField, deleteButton); add(variableInputField, typeInputField, deleteButton);
setId(ASSUMPTIONS_FIELD_ID); setId(ASSUMPTIONS_FIELD_ID);
localeChange(null);
} }
/** /**

View File

@ -78,8 +78,6 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
layout.add(heading, buttons, assumptionContainer); layout.add(heading, buttons, assumptionContainer);
layout.setPadding(false); layout.setPadding(false);
add(layout); add(layout);
localeChange(null);
} }
/** /**

View File

@ -70,8 +70,6 @@ public class UpperBar extends HorizontalLayout implements LocaleChangeObserver {
setId(UPPER_BAR_ID); setId(UPPER_BAR_ID);
getThemeList().set("dark", true); //TODO remove magic string getThemeList().set("dark", true); //TODO remove magic string
setSpacing(false); setSpacing(false);
localeChange(null);
} }
/** /**