Search in sources :

Example 1 with SimpleStackedPanel

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

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)

Example 2 with SimpleStackedPanel

use of org.olat.core.gui.components.panel.SimpleStackedPanel 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 3 with SimpleStackedPanel

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

the class CPContentController method init.

protected void init(UserRequest ureq) {
    mainPanel = putInitialPanel(new SimpleStackedPanel("cpContent"));
    CPManagerImpl cpMgm = (CPManagerImpl) CPManager.getInstance();
    currentPage = cpMgm.getFirstPageToDisplay(cp);
    displayPage(ureq, currentPage.getIdentifier());
}
Also used : SimpleStackedPanel(org.olat.core.gui.components.panel.SimpleStackedPanel) CPManagerImpl(org.olat.ims.cp.CPManagerImpl)

Example 4 with SimpleStackedPanel

use of org.olat.core.gui.components.panel.SimpleStackedPanel 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 5 with SimpleStackedPanel

use of org.olat.core.gui.components.panel.SimpleStackedPanel 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

SimpleStackedPanel (org.olat.core.gui.components.panel.SimpleStackedPanel)6 StackedPanel (org.olat.core.gui.components.panel.StackedPanel)4 AssertException (org.olat.core.logging.AssertException)2 CPManagerImpl (org.olat.ims.cp.CPManagerImpl)2