From edd7d89e9cbaafe9ab44bdbed45d6efbc8b19200 Mon Sep 17 00:00:00 2001 From: uogau Date: Mon, 8 Mar 2021 01:39:19 +0100 Subject: [PATCH] fixed checkstyle --- .../view/content/typeinferencecontent/ShareDialog.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/ShareDialog.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/ShareDialog.java index 65a5ae4..6ba350f 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/ShareDialog.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/ShareDialog.java @@ -67,9 +67,7 @@ public class ShareDialog extends Dialog implements LocaleChangeObserver { latexArea.setClassName(FIELD_CLASS); UI.getCurrent().getPage().executeJs("window.autoSelect($0)", FIELD_CLASS); - urlField.setReadOnly(true); - packageArea.setReadOnly(true); - latexArea.setReadOnly(true); + setReadOnly(); layout.add(urlField, packageArea, latexArea); @@ -84,4 +82,10 @@ public class ShareDialog extends Dialog implements LocaleChangeObserver { packageArea.setLabel(getTranslation("share.packages.label")); latexArea.setLabel(getTranslation("share.latex.label")); } + + private void setReadOnly() { + urlField.setReadOnly(true); + packageArea.setReadOnly(true); + latexArea.setReadOnly(true); + } }