From 07a7218192cada3487a220f19d627b8b25b377f9 Mon Sep 17 00:00:00 2001 From: ucrhh Date: Fri, 29 Jan 2021 09:10:30 +0100 Subject: [PATCH] StartPage init into private methods --- .../content/infocontent/StartPageView.java | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/kit/typicalc/view/content/infocontent/StartPageView.java b/src/main/java/edu/kit/typicalc/view/content/infocontent/StartPageView.java index e4c0201..ee59752 100644 --- a/src/main/java/edu/kit/typicalc/view/content/infocontent/StartPageView.java +++ b/src/main/java/edu/kit/typicalc/view/content/infocontent/StartPageView.java @@ -32,6 +32,14 @@ public class StartPageView extends VerticalLayout implements ControlPanelView { Scroller scroller = new Scroller(content); scroller.setSizeFull(); scroller.setScrollDirection(Scroller.ScrollDirection.BOTH); + setAlignItems(Alignment.CENTER); + add(scroller, controlPanel); + disableControlPanel(); + createContent(); + + } + + private void createContent() { content.add(new MathjaxDisplay(getTranslation("abs-rule"))); content.add(new MathjaxUnification("\\(conswwwwwwWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" + "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" @@ -42,32 +50,33 @@ public class StartPageView extends VerticalLayout implements ControlPanelView { content.add(new MathjaxProofTree(getTranslation("demo-tree"))); content.add(new MathjaxProofTree(getTranslation("demo-tree"))); content.add(new MathjaxProofTree(getTranslation("demo-tree"))); - setAlignItems(Alignment.CENTER); - add(scroller, controlPanel); + } + + private void disableControlPanel() { + controlPanel.setEnabledFirstStep(false); + controlPanel.setEnabledLastStep(false); + controlPanel.setEnabledNextStep(false); + controlPanel.setEnabledPreviousStep(false); + controlPanel.setEnabledShareButton(false); } @Override public void shareButton() { - } @Override public void firstStepButton() { - } @Override public void lastStepButton() { - } @Override public void nextStepButton() { - } @Override public void previousStepButton() { - } }