Search in sources :

Example 1 with PageRunComponent

use of org.olat.modules.portfolio.ui.editor.PageRunComponent in project OpenOLAT by OpenOLAT.

the class TitleHandler method getContent.

@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints hints) {
    String content = "";
    if (element instanceof Title) {
        content = ((Title) element).getContent();
    }
    Component cmp = TextFactory.createTextComponentFromString("title_" + idGenerator.incrementAndGet(), content, null, false, null);
    return new PageRunComponent(cmp);
}
Also used : PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent) Title(org.olat.modules.forms.model.xml.Title) Component(org.olat.core.gui.components.Component) PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent)

Example 2 with PageRunComponent

use of org.olat.modules.portfolio.ui.editor.PageRunComponent in project openolat by klemens.

the class TitlePageElementHandler method getContent.

@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints options) {
    String content = "";
    if (element instanceof TitlePart) {
        content = ((TitlePart) element).getContent();
    }
    TextComponent cmp = TextFactory.createTextComponentFromString("title_" + idGenerator.incrementAndGet(), content, null, false, null);
    return new PageRunComponent(cmp);
}
Also used : TextComponent(org.olat.core.gui.components.text.TextComponent) PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent) TitlePart(org.olat.modules.portfolio.model.TitlePart)

Example 3 with PageRunComponent

use of org.olat.modules.portfolio.ui.editor.PageRunComponent in project OpenOLAT by OpenOLAT.

the class HTMLRawHandler method getContent.

@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints hints) {
    String content = "";
    if (element instanceof HTMLRaw) {
        content = ((HTMLRaw) element).getContent();
    }
    Component cmp = TextFactory.createTextComponentFromString("htmlraw_" + CodeHelper.getRAMUniqueID(), content, null, false, null);
    return new PageRunComponent(cmp);
}
Also used : PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent) HTMLRaw(org.olat.modules.forms.model.xml.HTMLRaw) Component(org.olat.core.gui.components.Component) PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent)

Example 4 with PageRunComponent

use of org.olat.modules.portfolio.ui.editor.PageRunComponent in project OpenOLAT by OpenOLAT.

the class TitlePageElementHandler method getContent.

@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints options) {
    String content = "";
    if (element instanceof TitlePart) {
        content = ((TitlePart) element).getContent();
    }
    TextComponent cmp = TextFactory.createTextComponentFromString("title_" + idGenerator.incrementAndGet(), content, null, false, null);
    return new PageRunComponent(cmp);
}
Also used : TextComponent(org.olat.core.gui.components.text.TextComponent) PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent) TitlePart(org.olat.modules.portfolio.model.TitlePart)

Example 5 with PageRunComponent

use of org.olat.modules.portfolio.ui.editor.PageRunComponent in project OpenOLAT by OpenOLAT.

the class HTMLRawPageElementHandler method getContent.

@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints options) {
    String content = "";
    if (element instanceof HTMLPart) {
        content = ((HTMLPart) element).getContent();
        content = Formatter.formatLatexFormulas(content);
    }
    TextComponent cmp = TextFactory.createTextComponentFromString("htmlRawCmp" + CodeHelper.getRAMUniqueID(), content, null, false, null);
    cmp.setElementCssClass("o_pf_html_raw");
    return new PageRunComponent(cmp);
}
Also used : TextComponent(org.olat.core.gui.components.text.TextComponent) PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent) HTMLPart(org.olat.modules.portfolio.model.HTMLPart)

Aggregations

PageRunComponent (org.olat.modules.portfolio.ui.editor.PageRunComponent)8 Component (org.olat.core.gui.components.Component)4 TextComponent (org.olat.core.gui.components.text.TextComponent)4 HTMLRaw (org.olat.modules.forms.model.xml.HTMLRaw)2 Title (org.olat.modules.forms.model.xml.Title)2 HTMLPart (org.olat.modules.portfolio.model.HTMLPart)2 TitlePart (org.olat.modules.portfolio.model.TitlePart)2