JavaDoc for new class

This commit is contained in:
Moritz Dieing 2021-02-19 12:37:29 +01:00
parent bd77f5a62b
commit 9f8ab35ef1
2 changed files with 15 additions and 1 deletions

View File

@ -10,6 +10,9 @@ import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.i18n.LocaleChangeEvent;
import com.vaadin.flow.i18n.LocaleChangeObserver;
/**
* A Slide for the vaadin carousel-addon. This Slide consists of an image and a text.
*/
@CssImport("./styles/view/image-slide.css")
public class ImageSlide extends Slide implements LocaleChangeObserver {
@ -24,8 +27,13 @@ public class ImageSlide extends Slide implements LocaleChangeObserver {
private Image image;
private final String imagePathKey;
/**
* Create a new ImageSlide with a key for the path of the image and a key for the text.
*
* @param imgPathKey key for the path of the image
* @param textKey key for the text
*/
public ImageSlide(String imgPathKey, String textKey) {
// move to css
slideLayout = new VerticalLayout();
this.imagePathKey = imgPathKey;
image = new Image(getTranslation(imgPathKey), StringUtils.EMPTY);

View File

@ -19,6 +19,9 @@ import edu.kit.typicalc.view.content.ControlPanel;
import edu.kit.typicalc.view.content.ControlPanelView;
import edu.kit.typicalc.view.main.MainViewImpl;
/**
* The starting page of the application. Presents an introduction to the user.
*/
@Route(value = "", layout = MainViewImpl.class)
@PageTitle(MainViewImpl.PAGE_TITLE)
@JsModule("./src/mathjax-setup.js")
@ -45,6 +48,9 @@ public class StartPageView extends VerticalLayout implements ControlPanelView, L
private final Text linkText;
private final Anchor link;
/**
* Fills the view with content.
*/
public StartPageView() {
controlPanel = new ControlPanel(this, this);
controlPanel.setId(CONTROL_PANEL_ID);