fix checkstyle

This commit is contained in:
ucrhh 2021-03-11 00:41:08 +01:00
parent 1d53bdfe75
commit 1ee86c5c32

View File

@ -67,18 +67,8 @@ public class ShareDialog extends Dialog implements LocaleChangeObserver {
latexAreaTree = new TextArea(); latexAreaTree = new TextArea();
packageAreaUnification = new TextArea(); packageAreaUnification = new TextArea();
latexAreaUnification = new TextArea(); latexAreaUnification = new TextArea();
initializeFields(url, latexCodeTree, latexCodeUnification);
urlField.setValue(url);
urlField.setClassName(FIELD_CLASS);
packageAreaTree.setValue(getTranslation("share.neededPackagesTree")); //todo
packageAreaTree.setClassName(FIELD_CLASS);
packageAreaUnification.setValue(getTranslation("share.neededPackagesUnification")); //todo
packageAreaUnification.setClassName(FIELD_CLASS);
latexAreaTree.setValue(latexCodeTree);
latexAreaTree.setClassName(FIELD_CLASS);
latexAreaUnification.setValue(latexCodeUnification
.replaceAll(Pattern.quote(LatexCreatorConstants.SUBSTITUTION_SIGN), RIGHT_ARROW_WHITE));
latexAreaUnification.setClassName(FIELD_CLASS);
UI.getCurrent().getPage().executeJs("window.autoSelect($0)", FIELD_CLASS); UI.getCurrent().getPage().executeJs("window.autoSelect($0)", FIELD_CLASS);
setReadOnly(); setReadOnly();
@ -88,6 +78,20 @@ public class ShareDialog extends Dialog implements LocaleChangeObserver {
add(headingLayout, layout); add(headingLayout, layout);
} }
private void initializeFields(String url, String latexCodeTree, String latexCodeUnification) {
urlField.setValue(url);
urlField.setClassName(FIELD_CLASS);
packageAreaTree.setValue(getTranslation("share.neededPackagesTree"));
packageAreaTree.setClassName(FIELD_CLASS);
packageAreaUnification.setValue(getTranslation("share.neededPackagesUnification"));
packageAreaUnification.setClassName(FIELD_CLASS);
latexAreaTree.setValue(latexCodeTree);
latexAreaTree.setClassName(FIELD_CLASS);
latexAreaUnification.setValue(latexCodeUnification
.replaceAll(Pattern.quote(LatexCreatorConstants.SUBSTITUTION_SIGN), RIGHT_ARROW_WHITE));
latexAreaUnification.setClassName(FIELD_CLASS);
}
@Override @Override
public void localeChange(LocaleChangeEvent localeChangeEvent) { public void localeChange(LocaleChangeEvent localeChangeEvent) {