Search in sources :

Example 1 with Tabpanels

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

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

the class Tabbox method getTabpanel.

public Tabpanel getTabpanel(int index) {
    try {
        Tabpanels tabpanels = this.getTabpanels();
        Tabpanel tabPanel = (Tabpanel) tabpanels.getChildren().get(index);
        return tabPanel;
    } catch (Exception ex) {
        throw new IndexOutOfBoundsException(ex.getMessage());
    }
}
Also used : Tabpanels(org.zkoss.zul.Tabpanels)

Example 3 with Tabpanels

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

the class TabbedDesktop method closeWindow.

/**
	 *
	 * @param windowNo
	 * @return boolean
	 */
public boolean closeWindow(int windowNo) {
    Tabbox tabbox = windowContainer.getComponent();
    Tabpanels panels = tabbox.getTabpanels();
    List<?> childrens = panels.getChildren();
    for (Object child : childrens) {
        Tabpanel panel = (Tabpanel) child;
        Component component = panel.getFirstChild();
        Object att = component.getAttribute(WINDOWNO_ATTRIBUTE);
        if (att != null && (att instanceof Integer)) {
            if (windowNo == (Integer) att) {
                Tab tab = panel.getLinkedTab();
                panel.getLinkedTab().onClose();
                if (tab.getParent() == null) {
                    unregisterWindow(windowNo);
                    return true;
                } else {
                    return false;
                }
            }
        }
    }
    return false;
}
Also used : Tab(org.zkoss.zul.Tab) Tabpanels(org.zkoss.zul.Tabpanels) Tabbox(org.adempiere.webui.component.Tabbox) Component(org.zkoss.zk.ui.Component) Tabpanel(org.adempiere.webui.component.Tabpanel) DesktopTabpanel(org.adempiere.webui.component.DesktopTabpanel)

Aggregations

Tabpanels (org.zkoss.zul.Tabpanels)3 DesktopTabpanel (org.adempiere.webui.component.DesktopTabpanel)1 Rows (org.adempiere.webui.component.Rows)1 Tab (org.adempiere.webui.component.Tab)1 Tabbox (org.adempiere.webui.component.Tabbox)1 Tabpanel (org.adempiere.webui.component.Tabpanel)1 Tabs (org.adempiere.webui.component.Tabs)1 MTab (org.compiere.model.MTab)1 Component (org.zkoss.zk.ui.Component)1 Center (org.zkoss.zul.Center)1 North (org.zkoss.zul.North)1 Row (org.zkoss.zul.Row)1 South (org.zkoss.zul.South)1 Space (org.zkoss.zul.Space)1 Tab (org.zkoss.zul.Tab)1 Tabpanel (org.zkoss.zul.Tabpanel)1