Search in sources :

Example 1 with East

use of org.zkoss.zul.East in project adempiere by adempiere.

the class WGraph method render.

/**
	 * render chart and/or table
	 */
public void render() {
    Borderlayout layout = null;
    this.getChildren().clear();
    if (m_renderTable && m_renderChart) {
        layout = new Borderlayout();
        appendChild(layout);
        layout.setStyle("height: 100%; width: 100%; position: absolute;");
        Center center = new Center();
        layout.appendChild(center);
        center.appendChild(panel);
    } else {
        appendChild(panel);
    }
    if (m_renderChart) {
        JFreeChart chart = builder.createChart(builder.getMGoal().getChartType());
        render(chart);
    }
    if (m_renderTable) {
        if (m_renderChart) {
            East east = new East();
            layout.appendChild(east);
            renderTable(east);
        } else {
            Panelchildren pc = panel.getPanelchildren();
            if (pc == null) {
                pc = new Panelchildren();
                panel.appendChild(pc);
            } else {
                pc.getChildren().clear();
            }
            renderTable(pc);
        }
    }
}
Also used : Center(org.zkoss.zul.Center) Panelchildren(org.zkoss.zul.Panelchildren) Borderlayout(org.zkoss.zul.Borderlayout) East(org.zkoss.zul.East) JFreeChart(org.jfree.chart.JFreeChart)

Example 2 with East

use of org.zkoss.zul.East in project adempiere by adempiere.

the class WTreeMaintenance method jbInit.

//	preInit
/**
	 * 	Static init
	 *	@throws Exception
	 */
private void jbInit() throws Exception {
    bAddAll.setImage(ServletFns.resolveThemeURL("~./images/FastBack24.png"));
    bAdd.setImage(ServletFns.resolveThemeURL("~./images/StepBack24.png"));
    bDelete.setImage(ServletFns.resolveThemeURL("~./images/StepForward24.png"));
    bDeleteAll.setImage(ServletFns.resolveThemeURL("~./images/FastForward24.png"));
    form.setWidth("99%");
    form.setHeight("100%");
    form.setStyle("position: absolute; padding: 0; margin: 0");
    form.appendChild(mainLayout);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    mainLayout.setStyle("position: absolute");
    treeLabel.setText(Msg.translate(Env.getCtx(), "AD_Tree_ID"));
    cbAllNodes.setEnabled(false);
    cbAllNodes.setText(Msg.translate(Env.getCtx(), "IsAllNodes"));
    treeInfo.setText(" ");
    bAdd.setTooltiptext("Add to Tree");
    bAddAll.setTooltiptext("Add ALL to Tree");
    bDelete.setTooltiptext("Delete from Tree");
    bDeleteAll.setTooltiptext("Delete ALL from Tree");
    bAdd.addActionListener(this);
    bAddAll.addActionListener(this);
    bDelete.addActionListener(this);
    bDeleteAll.addActionListener(this);
    North north = new North();
    mainLayout.appendChild(north);
    north.appendChild(northPanel);
    north.setHeight("28px");
    //
    northPanel.appendChild(treeLabel);
    northPanel.appendChild(new Space());
    northPanel.appendChild(treeField);
    northPanel.appendChild(new Space());
    northPanel.appendChild(cbAllNodes);
    northPanel.appendChild(new Space());
    northPanel.appendChild(treeInfo);
    northPanel.appendChild(new Space());
    northPanel.appendChild(bAddAll);
    northPanel.appendChild(new Space());
    northPanel.appendChild(bAdd);
    northPanel.appendChild(new Space());
    northPanel.appendChild(bDelete);
    northPanel.appendChild(new Space());
    northPanel.appendChild(bDeleteAll);
    //
    Center center = new Center();
    mainLayout.appendChild(center);
    center.appendChild(centerTree);
    center.setHflex("true");
    center.setVflex("true");
    center.setAutoscroll(true);
    East east = new East();
    mainLayout.appendChild(east);
    east.appendChild(centerList);
    east.setCollapsible(false);
    east.setSplittable(true);
    east.setWidth("45%");
    centerList.setVflex(true);
    centerList.setFixedLayout(true);
    centerList.addEventListener(Events.ON_SELECT, this);
}
Also used : Space(org.zkoss.zul.Space) Center(org.zkoss.zul.Center) North(org.zkoss.zul.North) East(org.zkoss.zul.East)

Example 3 with East

use of org.zkoss.zul.East in project adempiere by adempiere.

the class Borderlayout method appendEast.

public Borderlayout appendEast(Component c) {
    East east = getEast();
    if (east == null) {
        east = new East();
        this.appendChild(east);
    }
    east.appendChild(c);
    ThemeUtils.addSclass("ad-borderlayout-east", east);
    return this;
}
Also used : East(org.zkoss.zul.East)

Example 4 with East

use of org.zkoss.zul.East in project adempiere by adempiere.

the class WLogin method doCreatePart.

protected Component doCreatePart(Component parent) {
    layout = new Borderlayout();
    if (parent != null)
        layout.setParent(parent);
    else
        layout.setPage(page);
    ThemeUtils.addSclass("ad-wlogin-layout", layout);
    Center center = new Center();
    center.setParent(layout);
    center.setHflex("true");
    center.setVflex("true");
    center.setAutoscroll(true);
    ThemeUtils.addSclass("ad-wlogin-layout-center", center);
    Vbox vb = new Vbox();
    vb.setParent(center);
    vb.setPack("center");
    vb.setAlign("center");
    vb.setWidth("100%");
    vb.setHeight("100%");
    LoginWindow loginWindow = new LoginWindow(app);
    loginWindow.setParent(vb);
    if (!AEnv.isBrowserSupported()) {
        //TODO: localization
        String msg = "You might experience slow performance and user interface anomalies using your current browser to access the application. We recommend the use of Firefox, Google Chrome or Apple Safari.";
        browserWarningWindow = new Window();
        ThemeUtils.addSclass("ad-wlogin-browser-not-supported", browserWarningWindow);
        Div div = new Div();
        div.appendChild(new Text(msg));
        browserWarningWindow.setPosition("top,right");
        browserWarningWindow.appendChild(div);
        browserWarningWindow.setPage(page);
        browserWarningWindow.doOverlapped();
    }
    try {
        String right = ThemeUtils.getLoginRightPanel();
        PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(right);
        East east = new East();
        ThemeUtils.addSclass("ad-wlogin-east-panel", east);
        addContent(east, pageDefintion);
    } catch (Exception e) {
        //ignore page not found exception
        if (e instanceof UiException) {
            if (!(e.getMessage() != null && e.getMessage().startsWith("Page not found"))) {
                e.printStackTrace();
            }
        } else {
            e.printStackTrace();
        }
    }
    try {
        String left = ThemeUtils.getLoginLeftPanel();
        PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(left);
        West west = new West();
        ThemeUtils.addSclass("ad-wlogin-west-panel", west);
        addContent(west, pageDefintion);
    } catch (Exception e) {
        //ignore page not found exception
        if (e instanceof UiException) {
            if (!(e.getMessage() != null && e.getMessage().startsWith("Page not found"))) {
                e.printStackTrace();
            }
        } else {
            e.printStackTrace();
        }
    }
    try {
        String top = ThemeUtils.getLoginTopPanel();
        PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(top);
        North north = new North();
        ThemeUtils.addSclass("ad-wlogin-north-panel", north);
        addContent(north, pageDefintion);
    } catch (Exception e) {
        //ignore page not found exception
        if (e instanceof UiException) {
            if (!(e.getMessage() != null && e.getMessage().startsWith("Page not found"))) {
                e.printStackTrace();
            }
        } else {
            e.printStackTrace();
        }
    }
    try {
        String bottom = ThemeUtils.getLoginBottomPanel();
        PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(bottom);
        South south = new South();
        ThemeUtils.addSclass("ad-wlogin-south-panel", south);
        addContent(south, pageDefintion);
    } catch (Exception e) {
        //ignore page not found exception
        if (e instanceof UiException) {
            if (!(e.getMessage() != null && e.getMessage().startsWith("Page not found"))) {
                e.printStackTrace();
            }
        } else {
            e.printStackTrace();
        }
    }
    return layout;
}
Also used : LoginWindow(org.adempiere.webui.window.LoginWindow) Window(org.zkoss.zul.Window) PageDefinition(org.zkoss.zk.ui.metainfo.PageDefinition) Center(org.zkoss.zul.Center) LoginWindow(org.adempiere.webui.window.LoginWindow) West(org.zkoss.zul.West) South(org.zkoss.zul.South) Text(org.zkoss.zhtml.Text) Borderlayout(org.zkoss.zul.Borderlayout) UiException(org.zkoss.zk.ui.UiException) UiException(org.zkoss.zk.ui.UiException) Div(org.zkoss.zul.Div) North(org.zkoss.zul.North) Vbox(org.zkoss.zul.Vbox) East(org.zkoss.zul.East)

Aggregations

East (org.zkoss.zul.East)4 Center (org.zkoss.zul.Center)3 Borderlayout (org.zkoss.zul.Borderlayout)2 North (org.zkoss.zul.North)2 LoginWindow (org.adempiere.webui.window.LoginWindow)1 JFreeChart (org.jfree.chart.JFreeChart)1 Text (org.zkoss.zhtml.Text)1 UiException (org.zkoss.zk.ui.UiException)1 PageDefinition (org.zkoss.zk.ui.metainfo.PageDefinition)1 Div (org.zkoss.zul.Div)1 Panelchildren (org.zkoss.zul.Panelchildren)1 South (org.zkoss.zul.South)1 Space (org.zkoss.zul.Space)1 Vbox (org.zkoss.zul.Vbox)1 West (org.zkoss.zul.West)1 Window (org.zkoss.zul.Window)1