Search in sources :

Example 31 with South

use of org.zkoss.zul.South 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)

Example 32 with South

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

the class GridPanel method init_components.

/**
	 * 
	 */
private void init_components() {
    listbox = new Grid();
    listbox.setOddRowSclass(null);
    //listbox.setHeight("100%");
    listbox.setVflex(true);
    //true might look better, false for better performance
    listbox.setSizedByContent(true);
    listbox.addEventListener(Events.ON_CLICK, this);
    //listbox.setVflex("1");
    Center center = new Center();
    ThemeUtils.addSclass("ad-gridpanel-center", center);
    center.setVflex("1");
    center.setHflex("1");
    center.appendChild(listbox);
    this.appendChild(center);
    south = new South();
    ThemeUtils.addSclass("ad-gridpanel-south", south);
    this.appendChild(south);
}
Also used : Center(org.zkoss.zul.Center) South(org.zkoss.zul.South)

Example 33 with South

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

the class InfoPAttributePanel method jbInit.

//
/**
	 * 	Static Init
	 *	@throws Exception
	 */
private void jbInit() throws Exception {
    setWidth("410px");
    setHeight("410px");
    Borderlayout layout = new Borderlayout();
    Center center = new Center();
    layout.appendChild(center);
    center.setFlex(true);
    center.setAutoscroll(true);
    center.setStyle("border: none");
    this.appendChild(layout);
    South south = new South();
    layout.appendChild(south);
    Grid grid = new Grid();
    ThemeUtils.addSclass("small-grid", grid);
    center.appendChild(grid);
    rows = new Rows();
    grid.appendChild(rows);
    //	ConfirmPanel
    confirmPanel.addActionListener(this);
    south.appendChild(confirmPanel);
}
Also used : Center(org.zkoss.zul.Center) Grid(org.adempiere.webui.component.Grid) South(org.zkoss.zul.South) Borderlayout(org.zkoss.zul.Borderlayout) Rows(org.adempiere.webui.component.Rows)

Example 34 with South

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

the class InvoiceHistory method jbInit.

/**
	 *	Ststic Init
	 */
void jbInit() throws Exception {
    label.setText("Label");
    Tabs tabs = new Tabs();
    tabbox.appendChild(tabs);
    Tabpanels tabpanels = new Tabpanels();
    tabbox.appendChild(tabpanels);
    tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "PriceHistory")));
    tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "OrderPriceHistory")));
    tabs.appendChild(new Tab(Msg.translate(Env.getCtx(), "QtyReserved")));
    tabs.appendChild(new Tab(Msg.translate(Env.getCtx(), "QtyOrdered")));
    tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "QtyUnconfirmed")));
    if (m_M_Product_ID != 0)
        tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "ATP")));
    pricePane.setHeight("100%");
    pricePane.appendChild(m_tablePrice);
    tabpanels.appendChild(pricePane);
    orderPricePane.setHeight("100%");
    orderPricePane.appendChild(m_tableOrderPrice);
    tabpanels.appendChild(orderPricePane);
    reservedPane.setHeight("100%");
    reservedPane.appendChild(m_tableReserved);
    tabpanels.appendChild(reservedPane);
    orderedPane.setHeight("100%");
    orderedPane.appendChild(m_tableOrdered);
    tabpanels.appendChild(orderedPane);
    unconfirmedPane.setHeight("100%");
    unconfirmedPane.appendChild(m_tableUnconfirmed);
    tabpanels.appendChild(unconfirmedPane);
    if (m_M_Product_ID != 0) {
        atpPane.setHeight("100%");
        atpPane.appendChild(m_tableAtp);
        tabpanels.appendChild(atpPane);
    }
    tabbox.setSelectedIndex(0);
    tabbox.addEventListener(Events.ON_SELECT, this);
    confirmPanel.addActionListener(this);
    Borderlayout borderlayout = new Borderlayout();
    borderlayout.setWidth("100%");
    borderlayout.setHeight("100%");
    borderlayout.setStyle("border: none; position: relative");
    this.appendChild(borderlayout);
    North north = new North();
    north.setStyle("border: none");
    borderlayout.appendChild(north);
    north.appendChild(label);
    Center center = new Center();
    center.setStyle("border: none");
    center.setAutoscroll(true);
    center.setHflex("true");
    center.setVflex("true");
    borderlayout.appendChild(center);
    center.appendChild(tabbox);
    South south = new South();
    south.setStyle("border: none");
    borderlayout.appendChild(south);
    south.appendChild(confirmPanel);
}
Also used : Center(org.zkoss.zul.Center) Tab(org.adempiere.webui.component.Tab) Tabpanels(org.adempiere.webui.component.Tabpanels) South(org.zkoss.zul.South) Tabs(org.adempiere.webui.component.Tabs) North(org.zkoss.zul.North) Borderlayout(org.zkoss.zul.Borderlayout)

Example 35 with South

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

the class WPaySelect method zkInit.

//	init
/**
	 *  Static Init
	 *  @throws Exception
	 */
private void zkInit() throws Exception {
    //
    form.appendChild(mainPanel);
    mainPanel.appendChild(mainLayout);
    mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
    mainLayout.setHeight("100%");
    mainLayout.setWidth("99%");
    parameterPanel.appendChild(parameterLayout);
    //
    labelBankAccount.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID"));
    fieldBankAccount.addActionListener(this);
    fieldBankAccount.setAttribute("zk_component_ID", "Lookup_Criteria_C_BankAccount_ID");
    fieldBankAccount.setAttribute("zk_component_prefix", "Lookup_");
    fieldBankAccount.setAttribute("IsDynamic", "False");
    fieldBankAccount.setAttribute("fieldName", "fieldBankAccount");
    fieldBankAccount.setWidth("200px");
    //
    labelBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
    fieldBPartner.addValueChangeListener(this);
    fieldBPartner.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_C_BPartner_ID");
    fieldBPartner.getComponent().setAttribute("zk_component_prefix", "Lookup_");
    fieldBPartner.getComponent().setAttribute("IsDynamic", "False");
    fieldBPartner.getComponent().setAttribute("fieldName", "fieldBPartner");
    fieldBPartner.getComponent().setWidth("200px");
    //
    bRefresh.addActionListener(this);
    //
    labelPayDate.setText(Msg.translate(Env.getCtx(), "PayDate"));
    fieldPayDate.addValueChangeListener(this);
    fieldPayDate.getComponent().setAttribute("zk_component_ID", "Lookup_Criteria_PayDate");
    fieldPayDate.getComponent().setAttribute("zk_component_prefix", "Lookup_");
    fieldPayDate.getComponent().setAttribute("IsDynamic", "False");
    fieldPayDate.getComponent().setAttribute("fieldName", "fieldPayDate");
    fieldPayDate.getComponent().setWidth("200px");
    //
    labelPaymentRule.setText(Msg.translate(Env.getCtx(), "PaymentRule"));
    fieldPaymentRule.addActionListener(this);
    fieldPaymentRule.setAttribute("zk_component_ID", "Lookup_Criteria_PaymentRule");
    fieldPaymentRule.setAttribute("zk_component_prefix", "Lookup_");
    fieldPaymentRule.setAttribute("IsDynamic", "False");
    fieldPaymentRule.setAttribute("fieldName", "fieldPaymentRule");
    fieldPaymentRule.setWidth("200px");
    //
    labelDtype.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
    fieldDtype.addActionListener(this);
    fieldDtype.setAttribute("zk_component_ID", "Lookup_Criteria_C_DocType_ID");
    fieldDtype.setAttribute("zk_component_prefix", "Lookup_");
    fieldDtype.setAttribute("IsDynamic", "False");
    fieldDtype.setAttribute("fieldName", "fieldDtype");
    //
    labelBankBalance.setText(Msg.translate(Env.getCtx(), "CurrentBalance"));
    labelBalance.setText("0");
    labelBalance.setAttribute("zk_component_ID", "Lookup_Criteria_CurrentBalance");
    labelBalance.setAttribute("zk_component_prefix", "Lookup_");
    labelBalance.setAttribute("IsDynamic", "False");
    labelBalance.setAttribute("fieldName", "labelBalance");
    //
    onlyDue.setText(Msg.getMsg(Env.getCtx(), "OnlyDue"));
    onlyDue.addActionListener(this);
    onlyDue.setAttribute("zk_component_ID", "Lookup_Criteria_OnlyDue");
    onlyDue.setAttribute("fieldName", "onlyDue");
    onlyDue.setName("OnlyDue");
    onlyDue.setTooltiptext(Msg.getMsg(Env.getCtx(), "OnlyDue"));
    //
    checkAutoQuery.setText(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
    checkAutoQuery.addActionListener(this);
    checkAutoQuery.setAttribute("zk_component_ID", "Lookup_Criteria_AutoRefresh");
    checkAutoQuery.setName("AutoQuery");
    checkAutoQuery.setSelected(MSysConfig.getValue(SYSCONFIG_INFO_AUTO_QUERY, "Y", Env.getAD_Client_ID(Env.getCtx())).equals("Y"));
    //
    dataStatus.setText(" ");
    dataStatus.setPre(true);
    dataStatus.setAttribute("zk_component_ID", "Lookup_Criteria_DataStatus");
    dataStatus.setAttribute("zk_component_prefix", "Lookup_");
    dataStatus.setAttribute("IsDynamic", "False");
    dataStatus.setAttribute("fieldName", "dataStatus");
    //
    bGenerate.addActionListener(this);
    bCancel.addActionListener(this);
    //
    North north = new North();
    north.setStyle("border: none");
    mainLayout.appendChild(north);
    north.appendChild(parameterPanel);
    //
    Rows rows = parameterLayout.newRows();
    Row row = rows.newRow();
    row.appendChild(labelBankAccount.rightAlign());
    row.appendChild(fieldBankAccount);
    row.appendChild(labelBankBalance.rightAlign());
    Panel balancePanel = new Panel();
    balancePanel.appendChild(labelCurrency);
    balancePanel.appendChild(labelBalance);
    row.appendChild(balancePanel);
    row.appendChild(new Space());
    //
    row = rows.newRow();
    row.appendChild(labelBPartner.rightAlign());
    row.appendChild(fieldBPartner.getComponent());
    row.appendChild(new Space());
    row.appendChild(new Space());
    row.appendChild(new Space());
    //
    row = rows.newRow();
    row.appendChild(labelDtype.rightAlign());
    row.appendChild(fieldDtype);
    row.appendChild(labelPaymentRule.rightAlign());
    row.appendChild(fieldPaymentRule);
    row.appendChild(checkAutoQuery);
    //
    row = rows.newRow();
    row.appendChild(labelPayDate.rightAlign());
    row.appendChild(fieldPayDate.getComponent());
    row.appendChild(new Space());
    row.appendChild(onlyDue);
    row.appendChild(bRefresh);
    //
    commandPanel.addButton(bGenerate);
    commandPanel.getButton(ConfirmPanel.A_OK).setVisible(false);
    //
    southPanel = new Panel();
    southPanel.appendChild(dataStatus);
    southPanel.appendChild(new Separator());
    southPanel.appendChild(commandPanel);
    //
    South south = new South();
    south.setStyle("border: none");
    mainLayout.appendChild(south);
    south.appendChild(southPanel);
    //
    Center center = new Center();
    mainLayout.appendChild(center);
    center.appendChild(miniTable);
}
Also used : Space(org.zkoss.zul.Space) Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Center(org.zkoss.zul.Center) South(org.zkoss.zul.South) North(org.zkoss.zul.North) Row(org.adempiere.webui.component.Row) Separator(org.zkoss.zul.Separator) Rows(org.adempiere.webui.component.Rows)

Aggregations

South (org.zkoss.zul.South)41 Center (org.zkoss.zul.Center)38 North (org.zkoss.zul.North)28 Borderlayout (org.zkoss.zul.Borderlayout)19 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)12 Rows (org.adempiere.webui.component.Rows)12 Div (org.zkoss.zul.Div)10 Row (org.adempiere.webui.component.Row)9 Panel (org.adempiere.webui.component.Panel)8 Separator (org.zkoss.zul.Separator)8 Label (org.adempiere.webui.component.Label)6 Space (org.zkoss.zul.Space)6 Grid (org.adempiere.webui.component.Grid)5 StatusBarPanel (org.adempiere.webui.panel.StatusBarPanel)5 Tab (org.adempiere.webui.component.Tab)4 Hbox (org.zkoss.zul.Hbox)4 West (org.zkoss.zul.West)4 Tabs (org.adempiere.webui.component.Tabs)3 Button (org.adempiere.webui.component.Button)2 Tabpanels (org.adempiere.webui.component.Tabpanels)2