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); + } }