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);
}
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);
}
}
}
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);
}
}
}
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;
}
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);
}
Aggregations