Search in sources :

Example 1 with Tabs

use of org.adempiere.webui.component.Tabs in project adempiere by adempiere.

the class WOrderReceiptIssue method jbInit.

//	fillPicks
/**
	 *  Static Init.
	 *  Places static visual elements into the window.
	 *  This is only run as part of the windows initialization process
	 *  <pre>
	 *  mainPanel
	 *      northPanel
	 *      centerPanel
	 *          xMatched
	 *          xPanel
	 *          xMathedTo
	 *      southPanel
	 *  </pre>
	 *  @throws Exception
	 */
private void jbInit() throws Exception {
    Center center = new Center();
    South south = new South();
    North north = new North();
    form.appendChild(mainPanel);
    mainPanel.appendChild(TabsReceiptsIssue);
    mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
    ReceiptIssueOrder.setWidth("100%");
    ReceiptIssueOrder.setHeight("99%");
    ReceiptIssueOrder.appendChild(north);
    north.appendChild(northPanel);
    northPanel.appendChild(fieldGrid);
    orderLabel.setText(Msg.translate(Env.getCtx(), "PP_Order_ID"));
    Rows tmpRows = fieldGrid.newRows();
    // 1st
    Row tmpRow = tmpRows.newRow();
    tmpRow.appendChild(orderLabel.rightAlign());
    tmpRow.appendChild(orderField.getComponent());
    resourceLabel.setText(Msg.translate(Env.getCtx(), "S_Resource_ID"));
    tmpRow.appendChild(resourceLabel.rightAlign());
    tmpRow.appendChild(resourceField.getComponent());
    warehouseLabel.setText(Msg.translate(Env.getCtx(), "M_Warehouse_ID"));
    tmpRow.appendChild(warehouseLabel.rightAlign());
    tmpRow.appendChild(warehouseField.getComponent());
    // Product 2nd
    tmpRow = tmpRows.newRow();
    tmpRow.appendChild(productLabel.rightAlign());
    tmpRow.appendChild(productField.getComponent());
    tmpRow.appendChild(uomLabel.rightAlign());
    tmpRow.appendChild(uomField.getComponent());
    tmpRow.appendChild(uomorderLabel.rightAlign());
    tmpRow.appendChild(uomorderField.getComponent());
    tmpRow = tmpRows.newRow();
    orderedQtyLabel.setText(Msg.translate(Env.getCtx(), "QtyOrdered"));
    tmpRow.appendChild(orderedQtyLabel.rightAlign());
    tmpRow.appendChild(orderedQtyField.getComponent());
    deliveredQtyLabel.setText(Msg.translate(Env.getCtx(), "QtyDelivered"));
    tmpRow.appendChild(deliveredQtyLabel.rightAlign());
    tmpRow.appendChild(deliveredQtyField.getComponent());
    openQtyLabel.setText(Msg.translate(Env.getCtx(), "QtyBackOrdered"));
    tmpRow.appendChild(openQtyLabel.rightAlign());
    tmpRow.appendChild(openQtyField.getComponent());
    //3rd
    tmpRow = tmpRows.newRow();
    tmpRow.appendChild(productLabel.rightAlign());
    tmpRow.appendChild(productField.getComponent());
    tmpRow.appendChild(uomLabel.rightAlign());
    tmpRow.appendChild(uomField.getComponent());
    tmpRow.appendChild(uomorderLabel.rightAlign());
    tmpRow.appendChild(uomorderField.getComponent());
    //4th
    tmpRow = tmpRows.newRow();
    QtyBatchsLabel.setText(Msg.translate(Env.getCtx(), "QtyBatchs"));
    tmpRow.appendChild(QtyBatchsLabel.rightAlign());
    tmpRow.appendChild(qtyBatchsField.getComponent());
    QtyBatchSizeLabel.setText(Msg.translate(Env.getCtx(), "QtyBatchSize"));
    tmpRow.appendChild(QtyBatchSizeLabel.rightAlign());
    tmpRow.appendChild(qtyBatchSizeField.getComponent());
    openQtyLabel.setText(Msg.translate(Env.getCtx(), "QtyBackOrdered"));
    tmpRow.appendChild(openQtyLabel.rightAlign());
    tmpRow.appendChild(openQtyField.getComponent());
    //5th
    tmpRow = tmpRows.newRow();
    tmpRow.appendChild(labelcombo.rightAlign());
    tmpRow.appendChild(pickcombo);
    tmpRow.appendChild(backflushGroupLabel.rightAlign());
    tmpRow.appendChild(backflushGroup);
    tmpRow.appendChild(new Space());
    tmpRow.appendChild(new Space());
    //6th
    tmpRow = tmpRows.newRow();
    toDeliverQtyLabel.setText(Msg.translate(Env.getCtx(), "QtyToDeliver"));
    tmpRow.appendChild(toDeliverQtyLabel.rightAlign());
    tmpRow.appendChild(toDeliverQty.getComponent());
    scrapQtyLabel.setText(Msg.translate(Env.getCtx(), "QtyScrap"));
    tmpRow.appendChild(scrapQtyLabel.rightAlign());
    tmpRow.appendChild(scrapQtyField.getComponent());
    rejectQtyLabel.setText(Msg.translate(Env.getCtx(), "QtyReject"));
    tmpRow.appendChild(rejectQtyLabel.rightAlign());
    tmpRow.appendChild(rejectQty.getComponent());
    //7th
    tmpRow = tmpRows.newRow();
    movementDateLabel.setText(Msg.translate(Env.getCtx(), "MovementDate"));
    tmpRow.appendChild(movementDateLabel.rightAlign());
    tmpRow.appendChild(movementDateField.getComponent());
    locatorLabel.setText(Msg.translate(Env.getCtx(), "M_Locator_ID"));
    tmpRow.appendChild(locatorLabel.rightAlign());
    tmpRow.appendChild(locatorField.getComponent());
    attributeLabel.setText(Msg.translate(Env.getCtx(), "M_AttributeSetInstance_ID"));
    tmpRow.appendChild(attributeLabel.rightAlign());
    tmpRow.appendChild(attribute.getComponent());
    ReceiptIssueOrder.appendChild(center);
    center.appendChild(issue);
    ReceiptIssueOrder.appendChild(south);
    south.appendChild(PanelBottom);
    Process.setLabel(Msg.translate(Env.getCtx(), "OK"));
    PanelBottom.appendChild(Process);
    PanelBottom.setWidth("100%");
    PanelBottom.setStyle("text-align:center");
    Tabs tabs = new Tabs();
    Tab tab1 = new Tab();
    Tab tab2 = new Tab();
    tab1.setLabel(Msg.parseTranslation(Env.getCtx(), "@IsShipConfirm@"));
    tab2.setLabel(Msg.parseTranslation(Env.getCtx(), "@Generate@"));
    tabs.appendChild(tab1);
    tabs.appendChild(tab2);
    TabsReceiptsIssue.appendChild(tabs);
    Tabpanels tabps = new Tabpanels();
    Tabpanel tabp1 = new Tabpanel();
    Tabpanel tabp2 = new Tabpanel();
    TabsReceiptsIssue.appendChild(tabps);
    TabsReceiptsIssue.setWidth("100%");
    TabsReceiptsIssue.setHeight("100%");
    tabps.appendChild(tabp1);
    tabps.appendChild(tabp2);
    tabp1.appendChild(ReceiptIssueOrder);
    tabp1.setWidth("100%");
    tabp1.setHeight("100%");
    tabp2.appendChild(Generate);
    tabp2.setWidth("100%");
    tabp2.setHeight("100%");
    Generate.appendChild(info);
    Generate.setVisible(true);
    info.setVisible(true);
    TabsReceiptsIssue.addEventListener(Events.ON_CHANGE, this);
}
Also used : Space(org.zkoss.zul.Space) Center(org.zkoss.zul.Center) MTab(org.compiere.model.MTab) Tab(org.adempiere.webui.component.Tab) Tabpanels(org.zkoss.zul.Tabpanels) South(org.zkoss.zul.South) Tabs(org.adempiere.webui.component.Tabs) North(org.zkoss.zul.North) Row(org.zkoss.zul.Row) Tabpanel(org.zkoss.zul.Tabpanel) Rows(org.adempiere.webui.component.Rows)

Example 2 with Tabs

use of org.adempiere.webui.component.Tabs 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 3 with Tabs

use of org.adempiere.webui.component.Tabs in project adempiere by adempiere.

the class MultiTabPart method doCreatePart.

protected Component doCreatePart(Component parent) {
    tabbox = new Tabbox();
    //        tabbox.setSclass("lite");
    Tabpanels tabpanels = new Tabpanels();
    Tabs tabs = new Tabs();
    tabbox.appendChild(tabs);
    tabbox.appendChild(tabpanels);
    if (parent != null)
        tabbox.setParent(parent);
    else
        tabbox.setPage(page);
    return tabbox;
}
Also used : Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Tabbox(org.adempiere.webui.component.Tabbox)

Example 4 with Tabs

use of org.adempiere.webui.component.Tabs in project adempiere by adempiere.

the class ADTabPanel method setTabPanels.

private Tabbox setTabPanels(HorizontalEmbeddedPanel ep, Panel panel) {
    // For One Tab We created only one TabBox
    if (null == tabBox && null == tabPanels) {
        tabBox = new Tabbox();
        tabBox.setHeight("100%");
        //tabBox.setStyle("height: 100%; width: 100%; position: relative;");
        tabPanels = new Tabpanels();
        tabPanels.setHeight("600px");
        tabBox.appendChild(tabPanels);
        tabs = new Tabs();
        tabBox.appendChild(tabs);
    }
    // Setting Name For Tab
    Tab tab = new Tab(ep.gridWindow.getTab(ep.tabIndex).getName());
    tab.addEventListener(Events.ON_CLICK, this);
    tab.addEventListener(Events.ON_FOCUS, this);
    // Appending Tab to Tabs
    tabs.appendChild(tab);
    //Creating a TabPanel For every Tab
    Tabpanel tabPanel = new Tabpanel();
    embeddedTabPanel.put(ep.adTabId, tabPanel);
    tabPanel.setStyle("margin:0; padding:0; border: none; height:600px;");
    //Setting Embedded Panel to tabPanel
    tabPanel.appendChild(panel);
    //Appending Tab Panel To TabPanels
    tabPanels.appendChild(tabPanel);
    //By Default first Tab should populated
    tabBox.setSelectedIndex(0);
    // Returning the tabbox
    return tabBox;
}
Also used : Tab(org.adempiere.webui.component.Tab) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Tabbox(org.adempiere.webui.component.Tabbox) Tabpanel(org.adempiere.webui.component.Tabpanel)

Example 5 with Tabs

use of org.adempiere.webui.component.Tabs 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)

Aggregations

Tabs (org.adempiere.webui.component.Tabs)11 Tabpanels (org.adempiere.webui.component.Tabpanels)10 Tab (org.adempiere.webui.component.Tab)9 Tabbox (org.adempiere.webui.component.Tabbox)6 Tabpanel (org.adempiere.webui.component.Tabpanel)6 Center (org.zkoss.zul.Center)6 North (org.zkoss.zul.North)6 Rows (org.adempiere.webui.component.Rows)3 Event (org.zkoss.zk.ui.event.Event)3 Borderlayout (org.zkoss.zul.Borderlayout)3 Div (org.zkoss.zul.Div)3 South (org.zkoss.zul.South)3 SQLException (java.sql.SQLException)2 Button (org.adempiere.webui.component.Button)2 Row (org.adempiere.webui.component.Row)2 ColumnInfo (org.compiere.minigrid.ColumnInfo)2 Hbox (org.zkoss.zul.Hbox)2 Separator (org.zkoss.zul.Separator)2 Vbox (org.zkoss.zul.Vbox)2 Borderlayout (org.adempiere.webui.component.Borderlayout)1