Search in sources :

Example 11 with Borderlayout

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

the class InfoBPartnerPanel method statInit.

private void statInit() {
    initComponents();
    fieldValue.setWidth("100%");
    fieldContact.setWidth("100%");
    fieldPhone.setWidth("100%");
    fieldName.setWidth("100%");
    fieldEMail.setWidth("100%");
    fieldPostal.setWidth("100%");
    Rows rows = new Rows();
    Row row = new Row();
    rows.appendChild(row);
    row.appendChild(labelValue.rightAlign());
    row.appendChild(fieldValue);
    row.appendChild(labelContact.rightAlign());
    row.appendChild(fieldContact);
    row.appendChild(labelPhone.rightAlign());
    row.appendChild(fieldPhone);
    row.appendChild(checkCustomer);
    row = new Row();
    rows.appendChild(row);
    row.appendChild(labelName.rightAlign());
    row.appendChild(fieldName);
    row.appendChild(labelEMail.rightAlign());
    row.appendChild(fieldEMail);
    row.appendChild(labelPostal.rightAlign());
    row.appendChild(fieldPostal);
    row.appendChild(checkAND);
    statusBar.setEastVisibility(false);
    //  Contact Tab
    ColumnInfo[] s_layoutContact = new ColumnInfo[] { new ColumnInfo(" ", "AD_User_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Greeting_ID"), "(SELECT g.Greeting from C_Greeting g WHERE g.C_Greeting_ID = AD_User.C_Greeting_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Title"), "Title", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Location_ID"), "(SELECT a.Name from C_BPartner_Location a WHERE AD_User.C_BPartner_Location_ID=a.C_BPartner_Location_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "Fax", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "EMail"), "EMail", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastContact"), "LastContact", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastResult"), "LastResult", String.class) };
    //  From Clause
    String s_sqlFrom = "AD_User";
    //  Where Clause					
    String s_sqlWhere = "C_BPartner_ID = ?  and IsActive = 'Y'";
    m_sqlContact = contactTbl.prepareTable(s_layoutContact, s_sqlFrom, s_sqlWhere, false, "AD_User");
    contactTbl.setMultiSelection(false);
    contactTbl.autoSize();
    contactTbl.getModel().addTableModelListener(this);
    contactTbl.setAttribute("zk_component_ID", "Lookup_Data_Contact");
    //  Location Tab
    ColumnInfo[] s_layoutAddress = new ColumnInfo[] { new ColumnInfo(" ", "l.C_BPartner_Location_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "l.Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "l.Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "l.Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "l.Fax", String.class), // Replaced with parsed value
    new ColumnInfo(Msg.translate(Env.getCtx(), "Address"), "a.Address1", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsShipTo"), "l.IsShipTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsBillTo"), "l.IsBillTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsRemitTo"), "l.IsRemitTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsPayFrom"), "l.IsPayFrom", Boolean.class) };
    ADDRESS_INDEX = 5;
    /**	From Clause							*/
    String s_locationFrom = "C_BPartner_Location l" + " LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID)";
    /** Where Clause						*/
    String s_locationWhere = "l.C_BPartner_ID = ? and l.IsActive = 'Y'";
    m_sqlAddress = addressTbl.prepareTable(s_layoutAddress, s_locationFrom, s_locationWhere, false, "l");
    addressTbl.setMultiSelection(false);
    addressTbl.autoSize();
    addressTbl.getModel().addTableModelListener(this);
    addressTbl.setAttribute("zk_component_ID", "Lookup_Data_Address");
    //
    detailTabBox.setHeight("100%");
    Tabpanels tabPanels = new Tabpanels();
    detailTabBox.appendChild(tabPanels);
    Tabs tabs = new Tabs();
    detailTabBox.appendChild(tabs);
    Tab tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Contact")));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    Tabpanel desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(contactTbl);
    tabPanels.appendChild(desktopTabPanel);
    tab = new Tab(Msg.translate(Env.getCtx(), "Location"));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(addressTbl);
    tabPanels.appendChild(desktopTabPanel);
    tabs.setAttribute("zk_component_ID", "Subordinate_Tabs");
    Borderlayout southSP = new Borderlayout();
    Center center = new Center();
    North north = new North();
    center.appendChild(detailTabBox);
    southSP.appendChild(north);
    southSP.appendChild(center);
    p_centerSouth.setTitle(Msg.translate(Env.getCtx(), "ContactAndAddress"));
    p_centerSouth.setTooltiptext(Msg.translate(Env.getCtx(), "ContactAndAddress"));
    p_centerSouth.appendChild(southSP);
    p_criteriaGrid.appendChild(rows);
    super.setSizes();
    contactTbl.addActionListener(new EventListener<Event>() {

        public void onEvent(Event event) throws Exception {
            int leadRowKey = 0;
            if (contactTbl != null || contactTbl.getRowCount() > 0)
                leadRowKey = contactTbl.getLeadRowKey();
            if (m_AD_User_ID != leadRowKey) {
                //  From the contact table
                m_AD_User_ID = leadRowKey;
            }
        }
    });
    addressTbl.addActionListener(new EventListener<Event>() {

        public void onEvent(Event event) throws Exception {
            int leadRowKey = 0;
            if (addressTbl != null || addressTbl.getRowCount() > 0)
                leadRowKey = addressTbl.getLeadRowKey();
            if (m_C_BPartner_Location_ID != leadRowKey) {
                //  From the main table
                m_C_BPartner_Location_ID = leadRowKey;
            }
        }
    });
}
Also used : Center(org.zkoss.zul.Center) ColumnInfo(org.compiere.minigrid.ColumnInfo) Borderlayout(org.zkoss.zul.Borderlayout) SQLException(java.sql.SQLException) Tab(org.adempiere.webui.component.Tab) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Event(org.zkoss.zk.ui.event.Event) North(org.zkoss.zul.North) Row(org.adempiere.webui.component.Row) Tabpanel(org.adempiere.webui.component.Tabpanel) Rows(org.adempiere.webui.component.Rows)

Example 12 with Borderlayout

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

the class WCreateFromStatementUI method zkInit.

//  dynInit
protected void zkInit() throws Exception {
    bankAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID"));
    authorizationLabel.setText(Msg.translate(Env.getCtx(), "R_AuthCode"));
    documentTypeLabel.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
    tenderTypeLabel.setText(Msg.translate(Env.getCtx(), "TenderType"));
    dateFromField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "DateFrom"));
    dateToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "DateTo"));
    amtFromField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtFrom"));
    amtToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtTo"));
    Borderlayout parameterLayout = new Borderlayout();
    parameterLayout.setHeight("120px");
    parameterLayout.setWidth("100%");
    Panel parameterPanel = v_CreateFromPanel.getParameterPanel();
    parameterPanel.appendChild(parameterLayout);
    Grid parameterBankLayout = GridFactory.newGridLayout();
    Panel parameterBankPanel = new Panel();
    parameterBankPanel.appendChild(parameterBankLayout);
    Center center = new Center();
    parameterLayout.appendChild(center);
    center.appendChild(parameterBankPanel);
    Rows rows = (Rows) parameterBankLayout.newRows();
    Row row = rows.newRow();
    row.appendChild(bankAccountLabel.rightAlign());
    row.appendChild(bankAccountField.getComponent());
    row.appendChild(documentNoLabel.rightAlign());
    row.appendChild(documentNoField.getComponent());
    row = rows.newRow();
    row.appendChild(documentTypeLabel.rightAlign());
    row.appendChild(documentTypeField.getComponent());
    row.appendChild(authorizationLabel.rightAlign());
    row.appendChild(authorizationField.getComponent());
    row = rows.newRow();
    row.appendChild(tenderTypeLabel.rightAlign());
    row.appendChild(tenderTypeField.getComponent());
    row.appendChild(amtFromLabel.rightAlign());
    Hbox hbox = new Hbox();
    hbox.appendChild(amtFromField.getComponent());
    hbox.appendChild(amtToLabel.rightAlign());
    hbox.appendChild(amtToField.getComponent());
    row.appendChild(hbox);
    row = rows.newRow();
    row.appendChild(BPartner_idLabel.rightAlign());
    row.appendChild(bPartnerLookup.getComponent());
    row.appendChild(dateFromLabel.rightAlign());
    hbox = new Hbox();
    hbox.appendChild(dateFromField.getComponent());
    hbox.appendChild(dateToLabel.rightAlign());
    hbox.appendChild(dateToField.getComponent());
    row.appendChild(hbox);
    //	Add to Main
    v_CreateFromPanel.setWidth("100%");
    v_CreateFromPanel.setHeight("100%");
    v_Container.appendChild(v_CreateFromPanel);
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Hbox(org.zkoss.zul.Hbox) Center(org.zkoss.zul.Center) Grid(org.adempiere.webui.component.Grid) Borderlayout(org.zkoss.zul.Borderlayout) Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Example 13 with Borderlayout

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

the class WCharge method zkInit.

private void zkInit() {
    Borderlayout contentPane = new Borderlayout();
    form.appendChild(contentPane);
    North north = new North();
    contentPane.appendChild(north);
    north.appendChild(m_grdNew);
    Center center = new Center();
    contentPane.appendChild(center);
    center.appendChild(m_pnlAccount);
    South south = new South();
    contentPane.appendChild(south);
    Panel southPanel = new Panel();
    south.appendChild(southPanel);
    southPanel.appendChild(new Separator());
    southPanel.appendChild(m_grdConfirm);
}
Also used : 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) Borderlayout(org.zkoss.zul.Borderlayout) Separator(org.zkoss.zul.Separator)

Example 14 with Borderlayout

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

the class WGenForm method initForm.

@Override
protected void initForm() {
    try {
        zkInit();
        dynInit();
        Borderlayout contentPane = new Borderlayout();
        this.appendChild(contentPane);
        contentPane.setWidth("99%");
        contentPane.setHeight("100%");
        Center center = new Center();
        center.setStyle("border: none");
        contentPane.appendChild(center);
        center.appendChild(tabbedPane);
        center.setHflex("true");
        center.setVflex("true");
        South south = new South();
        south.setStyle("border: none");
        contentPane.appendChild(south);
        south.appendChild(statusBar);
        south.setHeight("22px");
    } catch (Exception ex) {
        log.log(Level.SEVERE, "init", ex);
    }
}
Also used : Center(org.zkoss.zul.Center) South(org.zkoss.zul.South) Borderlayout(org.zkoss.zul.Borderlayout)

Example 15 with Borderlayout

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

the class WCreateFromWindow method zkInit.

protected void zkInit() throws Exception {
    Borderlayout contentPane = new Borderlayout();
    appendChild(contentPane);
    North north = new North();
    contentPane.appendChild(north);
    north.appendChild(parameterPanel);
    Center center = new Center();
    contentPane.appendChild(center);
    center.appendChild(dataTable);
    WAppsAction selectAllAction = new WAppsAction(SELECT_ALL, null, null);
    Button selectAllButton = selectAllAction.getButton();
    confirmPanel.addComponentsLeft(selectAllButton);
    selectAllButton.addActionListener(this);
    South south = new South();
    contentPane.appendChild(south);
    Panel southPanel = new Panel();
    south.appendChild(southPanel);
    southPanel.appendChild(new Separator());
    southPanel.appendChild(confirmPanel);
    southPanel.appendChild(new Separator());
    southPanel.appendChild(statusBar);
    setWidth("750px");
    setHeight("550px");
    setSizable(true);
    setBorder("normal");
    contentPane.setWidth("100%");
    contentPane.setHeight("100%");
}
Also used : ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) StatusBarPanel(org.adempiere.webui.panel.StatusBarPanel) Panel(org.adempiere.webui.component.Panel) Center(org.zkoss.zul.Center) Button(org.adempiere.webui.component.Button) South(org.zkoss.zul.South) North(org.zkoss.zul.North) Borderlayout(org.zkoss.zul.Borderlayout) WAppsAction(org.adempiere.webui.component.WAppsAction) Separator(org.zkoss.zul.Separator)

Aggregations

Borderlayout (org.zkoss.zul.Borderlayout)30 Center (org.zkoss.zul.Center)30 South (org.zkoss.zul.South)19 North (org.zkoss.zul.North)18 Rows (org.adempiere.webui.component.Rows)10 Row (org.adempiere.webui.component.Row)9 Div (org.zkoss.zul.Div)9 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)8 Grid (org.adempiere.webui.component.Grid)8 Panel (org.adempiere.webui.component.Panel)7 Separator (org.zkoss.zul.Separator)7 Event (org.zkoss.zk.ui.event.Event)5 SQLException (java.sql.SQLException)4 Label (org.adempiere.webui.component.Label)4 West (org.zkoss.zul.West)4 Tab (org.adempiere.webui.component.Tab)3 Tabpanels (org.adempiere.webui.component.Tabpanels)3 Tabs (org.adempiere.webui.component.Tabs)3 EventListener (org.zkoss.zk.ui.event.EventListener)3 IOException (java.io.IOException)2