Search in sources :

Example 1 with North

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

the class WFactReconcile method initLayout.

//  initComponents
/**
	 *  Initialize the form structure
	 *  - Load Bank Info
	 *  - Load BPartner
	 *  - Load Document Type
	 *  - Init Table
	 */
private void initLayout() {
    setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
    setBorder("none");
    setWidth("100%");
    setHeight("100%");
    setStyle("position: absolute");
    miniTable.setAttribute("zk_component_ID", "Lookup_Data_SearchResults");
    miniTable.setVflex(true);
    //  Define the criteria rows and grid  
    Rows rows = new Rows();
    //
    Row row = new Row();
    rows.appendChild(row);
    row.setSpans("1, 1, 1, 1");
    row.appendChild(labelAcctSchema.rightAlign());
    row.appendChild(fieldAcctSchema.getComponent());
    row.appendChild(labelBPartner.rightAlign());
    row.appendChild(fieldBPartner.getComponent());
    //
    row = new Row();
    rows.appendChild(row);
    row.setSpans("1, 1, 1, 1");
    row.appendChild(labelOrg.rightAlign());
    row.appendChild(fieldOrg.getComponent());
    row.appendChild(labelProduct.rightAlign());
    row.appendChild(fieldProduct.getComponent());
    //
    row = new Row();
    rows.appendChild(row);
    row.setSpans("1, 1, 1, 1");
    row.appendChild(labelAccount.rightAlign());
    row.appendChild(fieldAccount.getComponent());
    row.appendChild(new Space());
    row.appendChild(isReconciled);
    //
    row = new Row();
    rows.appendChild(row);
    row.setSpans("1, 1, 1, 1");
    row.appendChild(labelDateAcct.rightAlign());
    Hbox hbox = new Hbox();
    hbox.appendChild(fieldDateAcct);
    hbox.appendChild(labelDateAcct2);
    hbox.appendChild(fieldDateAcct2);
    row.appendChild(hbox);
    //
    parameterGrid.appendChild(rows);
    //
    Center center = new Center();
    center.setBorder("0");
    center.appendChild(parameterGrid);
    Hbox btnBox = new Hbox();
    btnBox.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
    btnBox.appendChild(bRefresh);
    btnBox.setHeight("100%");
    West west = new West();
    west.setBorder("0");
    west.appendChild(btnBox);
    parameterPanel.appendChild(center);
    parameterPanel.appendChild(west);
    parameterPanel.setHeight("100px");
    //
    North north = new North();
    north.appendChild(parameterPanel);
    mainPanel.appendChild(north);
    //
    center = new Center();
    center.appendChild(miniTable);
    mainPanel.appendChild(center);
    //  Setup the command buttons
    pnlBtnLeft = new Panel();
    pnlBtnLeft.setAlign("left");
    pnlBtnLeft.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
    pnlBtnLeft.appendChild(bZoom);
    //
    pnlBtnRight = new Panel();
    pnlBtnRight.setAlign("right");
    pnlBtnRight.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
    pnlBtnRight.appendChild(bGenerate);
    pnlBtnRight.appendChild(bReset);
    pnlBtnRight.appendChild(bCancel);
    //
    pnlTextCenter = new Panel();
    pnlTextCenter.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
    pnlTextCenter.setAlign("center");
    pnlTextCenter.appendChild(differenceLabel);
    pnlTextCenter.appendChild(differenceField);
    //
    hboxBtnRight = new Hbox();
    hboxBtnRight.appendChild(pnlBtnRight);
    hboxBtnRight.setWidth("100%");
    hboxBtnRight.setStyle("text-align:right");
    //
    hboxBtnLeft = new Hbox();
    hboxBtnLeft.appendChild(pnlBtnLeft);
    hboxBtnLeft.setWidth("100%");
    hboxBtnLeft.setStyle("text-align:left");
    //
    hboxTextCenter = new Hbox();
    hboxTextCenter.appendChild(pnlTextCenter);
    hboxTextCenter.setWidth("100%");
    hboxTextCenter.setHeight("100%");
    hboxTextCenter.setPack("center");
    hboxTextCenter.setStyle("text-align:Center");
    //
    commandPane = new Hbox();
    commandPane.appendChild(hboxBtnLeft);
    commandPane.appendChild(hboxTextCenter);
    commandPane.appendChild(hboxBtnRight);
    commandPane.setWidth("100%");
    commandPane.setPack("center");
    //
    commandPanel.setHeight("70px");
    commandPanel.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
    commandPanel.setWidth("100%");
    center = new Center();
    center.appendChild(commandPane);
    center.setBorder("0");
    commandPanel.appendChild(center);
    South south = new South();
    south.appendChild(statusBar);
    south.setBorder("0");
    commandPanel.appendChild(south);
    south = new South();
    south.appendChild(commandPanel);
    south.setBorder("0");
    mainPanel.appendChild(south);
    //  Add everything to the form 
    this.appendChild(mainPanel);
}
Also used : Space(org.zkoss.zul.Space) Hbox(org.zkoss.zul.Hbox) Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) StatusBarPanel(org.adempiere.webui.panel.StatusBarPanel) Center(org.zkoss.zul.Center) West(org.zkoss.zul.West) South(org.zkoss.zul.South) North(org.zkoss.zul.North) Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Example 2 with North

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

the class WMatch method zkInit.

/**
	 *  Static Init.
	 *  <pre>
	 *  mainPanel
	 *      northPanel
	 *      centerPanel
	 *          xMatched
	 *          xPanel
	 *          xMathedTo
	 *      southPanel
	 *  </pre>
	 *  @throws Exception
	 */
private void zkInit() throws Exception {
    form.appendChild(mainPanel);
    mainPanel.setStyle("width: 99%; height: 100%; padding: 0; margin: 0");
    mainPanel.appendChild(mainLayout);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    northPanel.appendChild(northLayout);
    matchFromLabel.setText(Msg.translate(Env.getCtx(), "MatchFrom"));
    matchToLabel.setText(Msg.translate(Env.getCtx(), "MatchTo"));
    matchModeLabel.setText(Msg.translate(Env.getCtx(), "MatchMode"));
    onlyVendorLabel.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
    onlyProductLabel.setText(Msg.translate(Env.getCtx(), "M_Product_ID"));
    dateFromLabel.setText(Msg.translate(Env.getCtx(), "DateFrom"));
    dateToLabel.setText(Msg.translate(Env.getCtx(), "DateTo"));
    bSearch.setLabel(Msg.translate(Env.getCtx(), "Search"));
    southPanel.appendChild(southLayout);
    xMatchedLabel.setText(Msg.translate(Env.getCtx(), "ToBeMatched"));
    xMatchedToLabel.setText(Msg.translate(Env.getCtx(), "Matching"));
    differenceLabel.setText(Msg.translate(Env.getCtx(), "Difference"));
    bProcess.setLabel(Msg.translate(Env.getCtx(), "Process"));
    centerPanel.appendChild(centerLayout);
    sameProduct.setSelected(true);
    sameProduct.setText(Msg.translate(Env.getCtx(), "SameProduct"));
    sameBPartner.setSelected(true);
    sameBPartner.setText(Msg.translate(Env.getCtx(), "SameBPartner"));
    sameQty.setSelected(false);
    sameQty.setText(Msg.translate(Env.getCtx(), "SameQty"));
    North north = new North();
    mainLayout.appendChild(north);
    north.appendChild(northPanel);
    Rows rows = northLayout.newRows();
    Row row = rows.newRow();
    row.appendChild(matchFromLabel.rightAlign());
    row.appendChild(matchFrom);
    row.appendChild(matchToLabel.rightAlign());
    row.appendChild(matchTo);
    row.appendChild(new Space());
    row = rows.newRow();
    row.setSpans("1,1,3");
    row.appendChild(matchModeLabel.rightAlign());
    row.appendChild(matchMode);
    row.appendChild(new Space());
    row = rows.newRow();
    row.appendChild(onlyVendorLabel.rightAlign());
    row.appendChild(onlyVendor.getComponent());
    row.appendChild(onlyProductLabel.rightAlign());
    row.appendChild(onlyProduct.getComponent());
    row.appendChild(new Space());
    row = rows.newRow();
    row.appendChild(dateFromLabel.rightAlign());
    row.appendChild(dateFrom.getComponent());
    row.appendChild(dateToLabel.rightAlign());
    row.appendChild(dateTo.getComponent());
    row.appendChild(bSearch);
    South south = new South();
    mainLayout.appendChild(south);
    south.appendChild(southPanel);
    rows = southLayout.newRows();
    row = rows.newRow();
    row.appendChild(xMatchedLabel.rightAlign());
    row.appendChild(xMatched.getComponent());
    row.appendChild(xMatchedToLabel.rightAlign());
    row.appendChild(xMatchedTo.getComponent());
    row.appendChild(differenceLabel.rightAlign());
    row.appendChild(difference.getComponent());
    row.appendChild(bProcess);
    Center center = new Center();
    mainLayout.appendChild(center);
    center.appendChild(centerPanel);
    center.setHflex("true");
    center.setVflex("true");
    centerLayout.setWidth("100%");
    centerLayout.setHeight("100%");
    north = new North();
    centerLayout.appendChild(north);
    north.setStyle("border: none");
    Panel p = new Panel();
    p.appendChild(xMatchedBorder);
    p.appendChild(xMatchedTable);
    xMatchedTable.setWidth("99%");
    xMatchedTable.setHeight("85%");
    p.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
    north.appendChild(p);
    north.setHeight("44%");
    south = new South();
    centerLayout.appendChild(south);
    south.setStyle("border: none");
    xMatchedToTable.setWidth("99%");
    xMatchedToTable.setHeight("99%");
    south.appendChild(xMatchedToTable);
    south.setHeight("44%");
    center = new Center();
    centerLayout.appendChild(center);
    center.setStyle("border: none");
    center.setHflex("false");
    center.setVflex("false");
    //		center.setHeight("6%");
    center.appendChild(xPanel);
    xPanel.appendChild(sameBPartner);
    xPanel.appendChild(new Space());
    xPanel.appendChild(sameProduct);
    xPanel.appendChild(new Space());
    xPanel.appendChild(sameQty);
    xPanel.setHeight("50px");
    xPanel.appendChild(new Separator());
    xPanel.appendChild(xMatchedToBorder);
}
Also used : Space(org.zkoss.zul.Space) Panel(org.adempiere.webui.component.Panel) StatusBarPanel(org.adempiere.webui.panel.StatusBarPanel) 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)

Example 3 with North

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

the class WDelete method zkInit.

private void zkInit() throws Exception {
    //Form Init()
    form.appendChild(mainLayout);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    clientLabel.setText(Msg.translate(Env.getCtx(), "AD_Client_ID"));
    tableLabel.setText(Msg.translate(Env.getCtx(), "AD_Table_ID"));
    dryRun = new Checkbox("Dry Run");
    dryRun.setChecked(true);
    parameterPanel.appendChild(parameterLayout);
    North north = new North();
    north.setStyle("border: none");
    mainLayout.appendChild(north);
    north.appendChild(parameterPanel);
    Rows rows = null;
    Row row = null;
    parameterLayout.setWidth("100%");
    rows = parameterLayout.newRows();
    row = rows.newRow();
    row.appendChild(clientLabel.rightAlign());
    row.appendChild(clientPick);
    row.appendChild(tableLabel.rightAlign());
    row.appendChild(tablePick.getComponent());
    row.appendChild(dryRun);
    centerPanel.appendChild(centerLayout);
    centerLayout.setWidth("100%");
    Center center = new Center();
    mainLayout.appendChild(center);
    center.setStyle("border: none");
    center.appendChild(centerPanel);
    tree = new Tree();
    treeCols = new Treecols();
    treeCol = new Treecol("");
    treeCol2 = new Treecol();
    centerPanel.appendChild(tree);
    treeCols.appendChild(treeCol);
    treeCols.appendChild(treeCol2);
    tree.appendChild(treeCols);
    center.setFlex(true);
    center.setAutoscroll(true);
    South south = new South();
    south.appendChild(southPanel);
    southPanel.appendChild(southLayout);
    southPanel.setWidth("100%");
    mainLayout.appendChild(south);
    Rows rows2 = southLayout.newRows();
    Row south_row = rows2.newRow();
    south_row.appendChild(confirmPanel);
    confirmPanel.addActionListener(this);
    clientPick.addEventListener(Events.ON_SELECT, this);
}
Also used : Treecol(org.zkoss.zul.Treecol) Treecols(org.zkoss.zul.Treecols) Center(org.zkoss.zul.Center) Checkbox(org.zkoss.zul.Checkbox) South(org.zkoss.zul.South) Tree(org.zkoss.zul.Tree) North(org.zkoss.zul.North) Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Example 4 with North

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

the class WGenForm method zkInit.

//	init
/**
	 *	Static Init.
	 *  <pre>
	 *  selPanel (tabbed)
	 *      fOrg, fBPartner
	 *      scrollPane & miniTable
	 *  genPanel
	 *      info
	 *  </pre>
	 *  @throws Exception
	 */
void zkInit() throws Exception {
    //
    selPanel.setWidth("99%");
    selPanel.setHeight("90%");
    selPanel.setStyle("border: none; position: absolute");
    DesktopTabpanel tabpanel = new DesktopTabpanel();
    tabpanel.appendChild(selPanel);
    Tabpanels tabPanels = new Tabpanels();
    tabPanels.appendChild(tabpanel);
    tabbedPane.appendChild(tabPanels);
    Tabs tabs = new Tabs();
    tabbedPane.appendChild(tabs);
    Tab tab = new Tab(Msg.getMsg(Env.getCtx(), "Select"));
    tabs.appendChild(tab);
    North north = new North();
    selPanel.appendChild(north);
    north.appendChild(selNorthPanel);
    South south = new South();
    selPanel.appendChild(south);
    south.appendChild(confirmPanelSel);
    Center center = new Center();
    selPanel.appendChild(center);
    center.appendChild(miniTable);
    center.setHflex("true");
    center.setVflex("true");
    miniTable.setHeight("99%");
    confirmPanelSel.addActionListener(this);
    //
    tabpanel = new DesktopTabpanel();
    tabPanels.appendChild(tabpanel);
    tabpanel.appendChild(genPanel);
    tab = new Tab(Msg.getMsg(Env.getCtx(), "Generate"));
    tabs.appendChild(tab);
    genPanel.setWidth("99%");
    genPanel.setHeight("90%");
    genPanel.setStyle("border: none; position: absolute");
    center = new Center();
    genPanel.appendChild(center);
    Div div = new Div();
    div.appendChild(info);
    center.appendChild(div);
    south = new South();
    genPanel.appendChild(south);
    south.appendChild(confirmPanelGen);
    confirmPanelGen.addActionListener(this);
}
Also used : Div(org.zkoss.zul.Div) 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) DesktopTabpanel(org.adempiere.webui.component.DesktopTabpanel)

Example 5 with North

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

the class ZkReportViewer method init.

private void init() {
    Borderlayout layout = new Borderlayout();
    layout.setStyle("position: absolute; height: 99%; width: 99%");
    this.appendChild(layout);
    this.setStyle("width: 100%; height: 100%; position: absolute");
    toolBar.setHeight("26px");
    previewType.setMold("select");
    previewType.appendItem("PDF", "PDF");
    previewType.appendItem("HTML", "HTML");
    previewType.appendItem("Excel", "XLS");
    toolBar.appendChild(previewType);
    previewType.addEventListener(Events.ON_SELECT, this);
    toolBar.appendChild(new Separator("vertical"));
    //set default type
    String type = m_reportEngine.getPrintFormat().isForm() ? MSysConfig.getValue("ZK_REPORT_FORM_OUTPUT_TYPE") : MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE");
    if ("PDF".equals(type))
        previewType.setSelectedIndex(0);
    else if ("HTML".equals(type))
        previewType.setSelectedIndex(1);
    else if ("XLS".equals(type))
        previewType.setSelectedIndex(2);
    else
        //fallback to PDF
        previewType.setSelectedIndex(0);
    labelDrill.setValue(Msg.getMsg(Env.getCtx(), "Drill") + ": ");
    toolBar.appendChild(labelDrill);
    comboDrill.setMold("select");
    comboDrill.setTooltiptext(Msg.getMsg(Env.getCtx(), "Drill"));
    toolBar.appendChild(comboDrill);
    toolBar.appendChild(new Separator("vertical"));
    comboReport.setMold("select");
    comboReport.setTooltiptext(Msg.translate(Env.getCtx(), "AD_PrintFormat_ID"));
    toolBar.appendChild(comboReport);
    //	FR [ 237 ]
    //		toolBar.appendChild(new Separator("vertical"));
    comboReportView.setMold("select");
    comboReportView.setTooltiptext(Msg.translate(Env.getCtx(), "AD_ReportView_ID"));
    toolBar.appendChild(comboReportView);
    summary.setText(Msg.getMsg(Env.getCtx(), "Summary"));
    toolBar.appendChild(summary);
    bCustomize.setImage(ServletFns.resolveThemeURL("~./images/Preference24.png"));
    bCustomize.setTooltiptext(Msg.getMsg(Env.getCtx(), "PrintCustomize"));
    toolBar.appendChild(bCustomize);
    bCustomize.addEventListener(Events.ON_CLICK, this);
    bFind.setImage(ServletFns.resolveThemeURL("~./images/Find24.png"));
    bFind.setTooltiptext(Msg.getMsg(Env.getCtx(), "Find"));
    toolBar.appendChild(bFind);
    bFind.addEventListener(Events.ON_CLICK, this);
    toolBar.appendChild(new Separator("vertical"));
    bSendMail.setImage(ServletFns.resolveThemeURL("~./images/SendMail24.png"));
    bSendMail.setTooltiptext(Msg.getMsg(Env.getCtx(), "SendMail"));
    toolBar.appendChild(bSendMail);
    bSendMail.addEventListener(Events.ON_CLICK, this);
    bArchive.setImage(ServletFns.resolveThemeURL("~./images/Archive24.png"));
    bArchive.setTooltiptext(Msg.getMsg(Env.getCtx(), "Archive"));
    toolBar.appendChild(bArchive);
    bArchive.addEventListener(Events.ON_CLICK, this);
    if (m_isCanExport) {
        bExport.setImage(ServletFns.resolveThemeURL("~./images/ExportX24.png"));
        bExport.setTooltiptext(Msg.getMsg(Env.getCtx(), "Export"));
        toolBar.appendChild(bExport);
        bExport.addEventListener(Events.ON_CLICK, this);
    }
    toolBar.appendChild(new Separator("vertical"));
    bRefresh.setImage(ServletFns.resolveThemeURL("~./images/Refresh24.png"));
    bRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(), "Refresh"));
    toolBar.appendChild(bRefresh);
    bRefresh.addEventListener(Events.ON_CLICK, this);
    North north = new North();
    layout.appendChild(north);
    north.appendChild(toolBar);
    Center center = new Center();
    center.setHflex("true");
    center.setVflex("true");
    layout.appendChild(center);
    iframe = new Iframe();
    iframe.setId("reportFrame");
    iframe.setHeight("100%");
    iframe.setWidth("100%");
    iframe.addEventListener(Events.ON_CLICK, this);
    iframe.addEventListener(Events.ON_RIGHT_CLICK, this);
    center.appendChild(iframe);
    try {
        renderReport();
    } catch (Exception e) {
        throw new AdempiereException("Failed to render report", e);
    }
    iframe.setAutohide(true);
    this.setBorder("normal");
    this.addEventListener("onZoom", new EventListener() {

        public void onEvent(Event event) throws Exception {
            if (event instanceof ZoomEvent) {
                ZoomEvent ze = (ZoomEvent) event;
                if (ze.getData() != null && ze.getData() instanceof MQuery) {
                    AEnv.zoom((MQuery) ze.getData());
                }
            }
        }
    });
    this.addEventListener(DrillEvent.ON_DRILL_ACROSS, new EventListener() {

        public void onEvent(Event event) throws Exception {
            if (event instanceof DrillEvent) {
                DrillEvent de = (DrillEvent) event;
                if (de.getData() != null && de.getData() instanceof MQuery) {
                    MQuery query = (MQuery) de.getData();
                    Listitem item = comboDrill.getSelectedItem();
                    if (item != null && item.getValue() != null && item.toString().trim().length() > 0) {
                        query.setTableName(item.getValue().toString());
                        executeDrill(query, event.getTarget());
                    }
                }
            }
        }
    });
    this.addEventListener(DrillEvent.ON_DRILL_DOWN, new EventListener() {

        public void onEvent(Event event) throws Exception {
            if (event instanceof DrillEvent) {
                DrillEvent de = (DrillEvent) event;
                if (de.getData() != null && de.getData() instanceof MQuery) {
                    MQuery query = (MQuery) de.getData();
                    executeDrill(query, event.getTarget());
                }
            }
        }
    });
}
Also used : Iframe(org.zkoss.zul.Iframe) Center(org.zkoss.zul.Center) Listitem(org.zkoss.zul.Listitem) MQuery(org.compiere.model.MQuery) Borderlayout(org.zkoss.zul.Borderlayout) SQLException(java.sql.SQLException) AdempiereException(org.adempiere.exceptions.AdempiereException) ZoomEvent(org.adempiere.webui.event.ZoomEvent) AdempiereException(org.adempiere.exceptions.AdempiereException) ZoomEvent(org.adempiere.webui.event.ZoomEvent) Event(org.zkoss.zk.ui.event.Event) DrillEvent(org.adempiere.webui.event.DrillEvent) DrillEvent(org.adempiere.webui.event.DrillEvent) North(org.zkoss.zul.North) EventListener(org.zkoss.zk.ui.event.EventListener) Separator(org.zkoss.zul.Separator)

Aggregations

North (org.zkoss.zul.North)37 Center (org.zkoss.zul.Center)35 South (org.zkoss.zul.South)28 Borderlayout (org.zkoss.zul.Borderlayout)18 Rows (org.adempiere.webui.component.Rows)11 Div (org.zkoss.zul.Div)11 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)10 Row (org.adempiere.webui.component.Row)9 Separator (org.zkoss.zul.Separator)9 Panel (org.adempiere.webui.component.Panel)7 Tab (org.adempiere.webui.component.Tab)7 Space (org.zkoss.zul.Space)7 Tabs (org.adempiere.webui.component.Tabs)6 Event (org.zkoss.zk.ui.event.Event)6 West (org.zkoss.zul.West)6 Tabpanels (org.adempiere.webui.component.Tabpanels)5 SQLException (java.sql.SQLException)4 Label (org.adempiere.webui.component.Label)4 StatusBarPanel (org.adempiere.webui.panel.StatusBarPanel)4 EventListener (org.zkoss.zk.ui.event.EventListener)4