Search in sources :

Example 1 with StackedPanel

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

the class BaseFullWebappController method setGuiStack.

private void setGuiStack(GuiStack guiStack) {
    currentGuiStack = guiStack;
    StackedPanel guiStackPanel = currentGuiStack.getPanel();
    main.setContent(guiStackPanel);
    // place for modal dialogs, which are overlayd over the normal layout (using
    // css alpha blending)
    // maybe null if no current modal dialog -> clears the panel
    StackedPanel modalStackP = currentGuiStack.getModalPanel();
    modalPanel.setContent(modalStackP);
}
Also used : StackedPanel(org.olat.core.gui.components.panel.StackedPanel)

Example 2 with StackedPanel

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

the class BreadcrumbedStackedPanel method setContent.

@Override
public void setContent(Component newContent) {
    // 1: remove any stack css from current active stack
    Component currentComponent = getContent();
    if (currentComponent != null) {
        if (currentComponent instanceof StackedPanel) {
            StackedPanel currentPanel = (StackedPanel) currentComponent;
            String currentStackCss = currentPanel.getCssClass();
            removeCssClass(currentStackCss);
        }
    }
    // 2: update stack with new component on standard Panel
    super.setContent(newContent);
    // 3: add new stack css
    if (newContent != null) {
        if (newContent instanceof StackedPanel) {
            StackedPanel newPanel = (StackedPanel) newContent;
            String newStackCss = newPanel.getCssClass();
            addCssClass(newStackCss);
        }
    }
}
Also used : Component(org.olat.core.gui.components.Component) StackedPanel(org.olat.core.gui.components.panel.StackedPanel)

Example 3 with StackedPanel

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

the class BreadcrumbedStackedPanel method setContent.

@Override
public void setContent(Component newContent) {
    // 1: remove any stack css from current active stack
    Component currentComponent = getContent();
    if (currentComponent != null) {
        if (currentComponent instanceof StackedPanel) {
            StackedPanel currentPanel = (StackedPanel) currentComponent;
            String currentStackCss = currentPanel.getCssClass();
            removeCssClass(currentStackCss);
        }
    }
    // 2: update stack with new component on standard Panel
    super.setContent(newContent);
    // 3: add new stack css
    if (newContent != null) {
        if (newContent instanceof StackedPanel) {
            StackedPanel newPanel = (StackedPanel) newContent;
            String newStackCss = newPanel.getCssClass();
            addCssClass(newStackCss);
        }
    }
}
Also used : Component(org.olat.core.gui.components.Component) StackedPanel(org.olat.core.gui.components.panel.StackedPanel)

Example 4 with StackedPanel

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

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

the class BaseFullWebappController method setGuiStack.

private void setGuiStack(GuiStack guiStack) {
    currentGuiStack = guiStack;
    StackedPanel guiStackPanel = currentGuiStack.getPanel();
    main.setContent(guiStackPanel);
    // place for modal dialogs, which are overlayd over the normal layout (using
    // css alpha blending)
    // maybe null if no current modal dialog -> clears the panel
    StackedPanel modalStackP = currentGuiStack.getModalPanel();
    modalPanel.setContent(modalStackP);
}
Also used : 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