Search in sources :

Example 6 with StackedPanel

use of org.olat.core.gui.components.panel.StackedPanel in project OpenOLAT by OpenOLAT.

the class BasicController method putInitialPanel.

protected StackedPanel putInitialPanel(Component initialContent) {
    if (initialContent instanceof StackedPanel) {
        super.setInitialComponent(initialContent);
        return (StackedPanel) initialContent;
    } else {
        StackedPanel p = new SimpleStackedPanel("mainBasicPanel");
        p.setContent(initialContent);
        super.setInitialComponent(p);
        return p;
    }
}
Also used : SimpleStackedPanel(org.olat.core.gui.components.panel.SimpleStackedPanel) SimpleStackedPanel(org.olat.core.gui.components.panel.SimpleStackedPanel) StackedPanel(org.olat.core.gui.components.panel.StackedPanel)

Example 7 with StackedPanel

use of org.olat.core.gui.components.panel.StackedPanel in project openolat by klemens.

the class BasicController method putInitialPanel.

protected StackedPanel putInitialPanel(Component initialContent) {
    if (initialContent instanceof StackedPanel) {
        super.setInitialComponent(initialContent);
        return (StackedPanel) initialContent;
    } else {
        StackedPanel p = new SimpleStackedPanel("mainBasicPanel");
        p.setContent(initialContent);
        super.setInitialComponent(p);
        return p;
    }
}
Also used : SimpleStackedPanel(org.olat.core.gui.components.panel.SimpleStackedPanel) SimpleStackedPanel(org.olat.core.gui.components.panel.SimpleStackedPanel) StackedPanel(org.olat.core.gui.components.panel.StackedPanel)

Example 8 with StackedPanel

use of org.olat.core.gui.components.panel.StackedPanel in project openolat by klemens.

the class DefaultController method setInitialComponent.

/**
 * Sets the initialComponent.
 *
 * @param initialComponent The mainComponent to set
 */
protected void setInitialComponent(Component initialComponent) {
    if (this.initialComponent != null)
        throw new AssertException("can only set initialcomponent once! comp:" + initialComponent.getComponentName() + ", controller: " + toString());
    if (initialComponent instanceof StackedPanel) {
        wrapperPanel = (StackedPanel) initialComponent;
    } else {
        wrapperPanel = new SimpleStackedPanel("autowrapper of controller " + this.getClass().getName());
        wrapperPanel.setContent(initialComponent);
    }
    this.initialComponent = wrapperPanel;
}
Also used : AssertException(org.olat.core.logging.AssertException) SimpleStackedPanel(org.olat.core.gui.components.panel.SimpleStackedPanel) SimpleStackedPanel(org.olat.core.gui.components.panel.SimpleStackedPanel) StackedPanel(org.olat.core.gui.components.panel.StackedPanel)

Aggregations

StackedPanel (org.olat.core.gui.components.panel.StackedPanel)8 SimpleStackedPanel (org.olat.core.gui.components.panel.SimpleStackedPanel)4 Component (org.olat.core.gui.components.Component)2 AssertException (org.olat.core.logging.AssertException)2