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

org.valkyriercp.widget.WidgetViewDescriptor Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
package org.valkyriercp.widget;

import org.valkyriercp.application.PageComponent;
import org.valkyriercp.application.support.AbstractView;
import org.valkyriercp.application.support.DefaultViewDescriptor;

public final class WidgetViewDescriptor extends DefaultViewDescriptor {
    /**
     * Widget to create the view.
     */
    private WidgetProvider widget;

    public WidgetViewDescriptor(String id, WidgetProvider widget) {
        setId(id);
        setViewClass(WidgetView.class);
        this.widget = widget;
    }

    /**
     * {@inheritDoc}
     */
    public PageComponent createPageComponent() {
        AbstractView sv;
        sv = new WidgetView(getWidget());
        sv.setDescriptor(this);
        return sv;
    }

    public Widget getWidget() {
        return widget.getWidget();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy