Search in sources :

Example 1 with SidePanelLinker

use of org.jahia.ajax.gwt.client.widget.edit.sidepanel.SidePanelTabItem.SidePanelLinker in project jahia by Jahia.

the class EngineWindow method setEngine.

public void setEngine(Component component, String header, ButtonBar buttonsBar, GWTJahiaLanguage language, final Linker linker) {
    removeAll();
    add(component);
    setHeadingHtml(header);
    if (buttonsBar != null) {
        setBottomComponent(buttonsBar);
    }
    if (linker instanceof EditLinker || linker instanceof SidePanelLinker) {
        EditLinker editLinker = linker instanceof EditLinker ? (EditLinker) linker : ((SidePanelLinker) linker).getEditLinker();
        if (GXT.isIE) {
            // resize to fit main module area
            MainModule main = editLinker.getMainModule();
            setSize(main.getOffsetWidth(), main.getOffsetHeight());
            Element element = main.getElement();
            setPosition(WindowUtil.getAbsoluteLeft(element), WindowUtil.getAbsoluteTop(element));
            setBorders(false);
        } else if (editLinker.getMainAreaComponent() != null) {
            setContainer(editLinker.getMainAreaComponent().getElement());
        }
    }
}
Also used : EditLinker(org.jahia.ajax.gwt.client.widget.edit.EditLinker) SidePanelLinker(org.jahia.ajax.gwt.client.widget.edit.sidepanel.SidePanelTabItem.SidePanelLinker) Element(com.google.gwt.user.client.Element) MainModule(org.jahia.ajax.gwt.client.widget.edit.mainarea.MainModule)

Aggregations

Element (com.google.gwt.user.client.Element)1 EditLinker (org.jahia.ajax.gwt.client.widget.edit.EditLinker)1 MainModule (org.jahia.ajax.gwt.client.widget.edit.mainarea.MainModule)1 SidePanelLinker (org.jahia.ajax.gwt.client.widget.edit.sidepanel.SidePanelTabItem.SidePanelLinker)1