All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mateu.mdd.vaadin.views.ComponentView Maven / Gradle / Ivy

There is a newer version: 1.1.60
Show newest version
package io.mateu.mdd.vaadin.views;

import com.vaadin.icons.VaadinIcons;
import com.vaadin.ui.Component;
import io.mateu.mdd.vaadin.components.ComponentWrapper;
import io.mateu.mdd.vaadin.controllers.VoidController;
import io.mateu.mdd.vaadin.navigation.View;
import io.mateu.mdd.vaadin.navigation.ViewStack;

public class ComponentView extends View {

    private String title;

    @Override
    public String toString() {
        return title;
    }

    public ComponentView(ViewStack stack, String title, VaadinIcons icon, Component component) {
        super(stack, getContent(icon, title, component), new VoidController());
        this.title = title;
    }

    private static Component getContent(VaadinIcons icon, String title, Component component) {
        return new ComponentWrapper(icon, title, component, false);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy