Search in sources :

Example 6 with Tabpanels

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

the class InfoProductPanel method statInit.

//	initComponents
private void statInit() {
    //  Fill the grid, setup the center data table & add the tabs
    initComponents();
    Rows rows = new Rows();
    Row row = new Row();
    rows.appendChild(row);
    row.appendCellChild(lblValue.rightAlign());
    row.appendCellChild(fieldValue);
    row.appendCellChild(lblWarehouse.rightAlign());
    row.appendCellChild(fWarehouse_ID.getComponent());
    row.appendCellChild(lblBlank.rightAlign());
    row.appendCellChild(checkOnlyStock);
    row = new Row();
    rows.appendChild(row);
    row.appendCellChild(lblName.rightAlign());
    row.appendCellChild(fieldName);
    row.appendCellChild(lblPriceList.rightAlign());
    row.appendCellChild(fPriceList_ID.getComponent());
    row.appendCellChild(lblAS.rightAlign());
    row.appendCellChild(fAS_ID.getComponent());
    //
    row = new Row();
    rows.appendChild(row);
    row.appendCellChild(lblUPC.rightAlign());
    row.appendCellChild(fieldUPC);
    row.appendCellChild(lblProductCategory.rightAlign());
    row.appendCellChild(fProductCategory_ID.getComponent());
    row.appendCellChild(lblASI.rightAlign());
    row.appendCellChild(fASI_ID.getComponent());
    row = new Row();
    rows.appendChild(row);
    row.appendCellChild(lblSKU.rightAlign());
    row.appendCellChild(fieldSKU);
    row.appendCellChild(lblVendor.rightAlign());
    row.appendCellChild(fVendor_ID.getComponent());
    row.appendCellChild(lblBlank.rightAlign());
    row.appendCellChild(checkAND);
    //
    ColumnInfo[] s_layoutWarehouse = new ColumnInfo[] { new ColumnInfo(" ", "M_Warehouse_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "WarehouseName"), "WarehouseName", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "sum(QtyAvailable)", Double.class, true, true, null), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "sum(QtyOnHand)", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "sum(QtyReserved)", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOrdered"), "sum(QtyOrdered)", Double.class) };
    //        		new ColumnInfo(Msg.translate(Env.getCtx(), "DocumentNote"), "DocumentNote", String.class)};
    /**	From Clause							*/
    String s_sqlFrom = " M_PRODUCT_STOCK_V ";
    /** Where Clause						*/
    String s_sqlWhere = "(QtyOnHand <> 0 OR QtyAvailable <> 0 OR QtyReserved <> 0 OR QtyOrdered <> 0) AND M_Product_ID = ?";
    //      String s_sqlWhere = "M_Product_ID = ?";
    m_sqlWarehouse = warehouseTbl.prepareTable(s_layoutWarehouse, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_STOCK_V");
    m_sqlWarehouse += " Group By M_Warehouse_ID, WarehouseName ";
    m_sqlWarehouse += " Order By sum(QtyOnHand) DESC, WarehouseName ";
    warehouseTbl.setMultiSelection(false);
    warehouseTbl.setSizedByContent(false);
    //warehouseTbl.autoSize();
    warehouseTbl.setShowTotals(true);
    //warehouseTbl.getModel().addTableModelListener(this);
    warehouseTbl.setAttribute("zk_component_ID", "Lookup_Data_Warehouse");
    ColumnInfo[] s_layoutSubstitute = new ColumnInfo[] { new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "orgname", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Description"), "description", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Value"), "value", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "QtyAvailable", Double.class, true, true, null), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "QtyOnHand", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "QtyReserved", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "PriceStd"), "PriceStd", Double.class) };
    s_sqlFrom = "M_PRODUCT_SUBSTITUTERELATED_V";
    s_sqlWhere = "M_Product_ID = ? AND M_PriceList_Version_ID = ? and RowType = 'S'";
    m_sqlSubstitute = substituteTbl.prepareTable(s_layoutSubstitute, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_SUBSTITUTERELATED_V");
    substituteTbl.setMultiSelection(false);
    substituteTbl.autoSize();
    substituteTbl.getModel().addTableModelListener(this);
    substituteTbl.setAttribute("zk_component_ID", "Lookup_Data_Substitute");
    ColumnInfo[] s_layoutRelated = new ColumnInfo[] { new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "orgname", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Description"), "description", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Value"), "value", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "QtyAvailable", Double.class, true, true, null), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "QtyOnHand", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "QtyReserved", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "PriceStd"), "PriceStd", Double.class) };
    s_sqlFrom = "M_PRODUCT_SUBSTITUTERELATED_V";
    s_sqlWhere = "M_Product_ID = ? AND M_PriceList_Version_ID = ? and RowType = 'R'";
    m_sqlRelated = relatedTbl.prepareTable(s_layoutRelated, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_SUBSTITUTERELATED_V");
    relatedTbl.setMultiSelection(false);
    relatedTbl.autoSize();
    relatedTbl.getModel().addTableModelListener(this);
    relatedTbl.setAttribute("zk_component_ID", "Lookup_Data_Related");
    //Available to Promise Tab
    m_tableAtp.setMultiSelection(false);
    m_tableAtp.autoSize();
    m_tableAtp.setShowTotals(true);
    m_tableAtp.setAttribute("zk_component_ID", "Lookup_Data_ATP");
    //Vendor tab
    ColumnInfo[] s_layoutVendor = new ColumnInfo[] { new ColumnInfo(Msg.translate(Env.getCtx(), "Vendor"), "(SELECT bp.Name FROM C_BPartner bp WHERE bp.C_BPartner_ID = M_PRODUCT_PO.C_BPartner_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsCurrentVendor"), "IsCurrentVendor", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_UOM_ID"), "(SELECT Name FROM C_UOM WHERE C_UOM_ID = M_PRODUCT_PO.C_UOM_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Currency_ID"), "(SELECT iso_code FROM C_Currency WHERE C_Currency_ID = M_PRODUCT_PO.C_Currency_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "PriceList"), "PriceList", BigDecimal.class), new ColumnInfo(Msg.translate(Env.getCtx(), "PricePO"), "PricePO", BigDecimal.class), new ColumnInfo(Msg.translate(Env.getCtx(), "VendorProductNo"), "VendorProductNo", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Order_Min"), "Order_Min", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "DeliveryTime_Promised"), "DeliveryTime_Promised", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "DeliveryTime_Actual"), "DeliveryTime_Actual", Double.class) };
    s_sqlFrom = "M_PRODUCT_PO";
    s_sqlWhere = "M_Product_ID = ?";
    m_sqlVendor = vendorTbl.prepareTable(s_layoutVendor, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_PO");
    vendorTbl.setMultiSelection(false);
    vendorTbl.autoSize();
    vendorTbl.setAttribute("zk_component_ID", "Lookup_Data_Vendor");
    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(), "Warehouse")));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    Tabpanel desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(warehouseTbl);
    tabPanels.appendChild(desktopTabPanel);
    tab = new Tab(Msg.translate(Env.getCtx(), "Description"));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    fieldDescription.setWidth("99%");
    fieldDescription.setHeight("99%");
    desktopTabPanel.appendChild(fieldDescription);
    tabPanels.appendChild(desktopTabPanel);
    tab = new Tab(Msg.translate(Env.getCtx(), "ProductAttribute"));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    fieldPAttributes.setWidth("99%");
    fieldPAttributes.setHeight("99%");
    desktopTabPanel.appendChild(fieldPAttributes);
    tabPanels.appendChild(desktopTabPanel);
    tab = new Tab(Msg.translate(Env.getCtx(), "Substitute_ID"));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(substituteTbl);
    tabPanels.appendChild(desktopTabPanel);
    tab = new Tab(Msg.translate(Env.getCtx(), "RelatedProduct_ID"));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(relatedTbl);
    tabPanels.appendChild(desktopTabPanel);
    tab = new Tab(Msg.getMsg(Env.getCtx(), "ATP"));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(m_tableAtp);
    tabPanels.appendChild(desktopTabPanel);
    tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Vendor")));
    tab.addEventListener(Events.ON_SELECT, this);
    tabs.appendChild(tab);
    desktopTabPanel = new Tabpanel();
    desktopTabPanel.setHeight("100%");
    desktopTabPanel.appendChild(vendorTbl);
    tabPanels.appendChild(desktopTabPanel);
    tabs.setAttribute("zk_component_ID", "Subordinate_Tabs");
    //  Add the tabs to the center south layout
    Borderlayout tabLayout = new Borderlayout();
    //  
    North north = new North();
    tabLayout.appendChild(north);
    north.appendChild(checkShowDetail);
    //
    Center center = new Center();
    tabLayout.appendChild(center);
    center.appendChild(detailTabBox);
    //  Set main panel elements.  The other elements are handled by the info.java class
    p_criteriaGrid.appendChild(rows);
    p_centerSouth.appendChild(tabLayout);
    p_centerSouth.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock"));
    p_centerSouth.setTooltiptext(Msg.translate(Env.getCtx(), "WarehouseStock"));
    super.setSizes();
    warehouseTbl.addActionListener(new EventListener<Event>() {

        public void onEvent(Event event) throws Exception {
            if (warehouseTbl.getRowCount() > 0) {
                int selectedRow = warehouseTbl.getSelectedRow();
                if (selectedRow < 0)
                    selectedRow = 0;
                Object wh_data = warehouseTbl.getValueAt(selectedRow, warehouseTbl.getKeyColumnIndex());
                if (wh_data != null && wh_data instanceof IDColumn) {
                    IDColumn dataColumn = (IDColumn) wh_data;
                    m_ATP_M_Warehouse_ID = dataColumn.getRecord_ID();
                } else {
                    m_ATP_M_Warehouse_ID = m_M_Warehouse_ID;
                }
            } else {
                m_ATP_M_Warehouse_ID = m_M_Warehouse_ID;
            }
        }
    });
}
Also used : Center(org.zkoss.zul.Center) ColumnInfo(org.compiere.minigrid.ColumnInfo) Borderlayout(org.zkoss.zul.Borderlayout) SQLException(java.sql.SQLException) IDColumn(org.compiere.minigrid.IDColumn) 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 7 with Tabpanels

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

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

the class WBrowser method initComponents.

/**
	 * Initialize View Components
	 */
private void initComponents() {
    toolsBar = new ToolBar();
    bZoom = new Button();
    bExport = new Button();
    bDelete = new Button();
    tabsPanel = new Tabbox();
    searchTab = new Borderlayout();
    collapsibleSeach = new North();
    topPanel = new Hbox();
    searchGrid = new WBrowserSearch(getWindowNo(), getAD_Browse_ID(), BrowserSearch.COLUMNS_2);
    detail = new WBrowserTable(this);
    detail.addEventListener(Events.ON_SELECT, this);
    bCancel = new Button();
    bOk = new Button();
    detailPanel = new Borderlayout();
    Borderlayout mainLayout = new Borderlayout();
    setupToolBar();
    bSelectAll.setLabel(Msg.getMsg(Env.getCtx(), "SelectAll").replaceAll("[&]", ""));
    bSelectAll.setEnabled(false);
    bSelectAll.addActionListener(new EventListener() {

        public void onEvent(Event evt) {
            selectedRows();
        }
    });
    toolsBar.appendChild(bSelectAll);
    //TODO: victor.perez@e-evolution.com pending print functionality
    /*bPrint.setLabel("Print");

		bPrint.addActionListener(new EventListener() {
			@Override
			public void onEvent(Event event) throws Exception {
				bPrintActionPerformed(event);
			}
		});

		toolsBar.appendChild(bPrint);*/
    bZoom.setLabel(Msg.getMsg(Env.getCtx(), "Zoom").replaceAll("[&]", ""));
    bZoom.setEnabled(false);
    bZoom.addActionListener(new EventListener() {

        public void onEvent(Event evt) {
            cmd_Zoom();
        }
    });
    //Only enable if exist a reference
    if (AD_Window_ID > 0)
        toolsBar.appendChild(bZoom);
    bExport.setLabel(Msg.getMsg(Env.getCtx(), "Export"));
    bExport.setEnabled(false);
    bExport.addActionListener(new EventListener() {

        public void onEvent(Event evt) {
            cmd_Export();
        }
    });
    toolsBar.appendChild(bExport);
    bDelete.setLabel(Msg.getMsg(Env.getCtx(), "Delete").replaceAll("[&]", ""));
    bDelete.setEnabled(false);
    bDelete.addActionListener(new EventListener() {

        public void onEvent(Event evt) {
            cmd_deleteSelection();
        }
    });
    if (isDeleteable())
        toolsBar.appendChild(bDelete);
    m_frame.setWidth("100%");
    m_frame.setHeight("100%");
    m_frame.setStyle("position: absolute; padding: 0; margin: 0");
    m_frame.appendChild(mainLayout);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    mainLayout.setStyle("position: absolute");
    North north = new North();
    north.appendChild(toolsBar);
    mainLayout.appendChild(north);
    searchTab = new Borderlayout();
    searchTab.setWidth("99.4%");
    searchTab.setHeight("99.4%");
    searchTab.setStyle("background-color: transparent");
    topPanel = new Hbox();
    topPanel.setStyle("background-color: transparent");
    bSearch.setLabel(Msg.getMsg(Env.getCtx(), "StartSearch"));
    bSearch.addActionListener(new EventListener() {

        public void onEvent(Event evt) {
            cmd_Search();
        }
    });
    Vbox vbox = new Vbox();
    vbox.appendChild(topPanel);
    vbox.appendChild(bSearch);
    vbox.setAlign("center");
    vbox.setWidth("100%");
    vbox.setStyle("background-color: transparent");
    Div div = new Div();
    div.appendChild(vbox);
    div.setWidth("100%");
    div.setHeight("100%");
    collapsibleSeach.setTitle(Msg.getMsg(Env.getCtx(), ("SearchCriteria")));
    collapsibleSeach.setCollapsible(true);
    collapsibleSeach.setAutoscroll(true);
    collapsibleSeach.appendChild(div);
    collapsibleSeach.setStyle("overflow-y:auto");
    collapsibleSeach.setStyle("background-color: transparent");
    collapsibleSeach.setStyle("border: none");
    searchTab.appendChild(collapsibleSeach);
    detail.setWidth("100%");
    //detail.setHeight("100%");
    Center dCenter = new Center();
    dCenter.appendChild(detail);
    dCenter.setBorder("none");
    detail.setVflex(true);
    detail.setFixedLayout(true);
    dCenter.setHflex("true");
    dCenter.setVflex("true");
    dCenter.setAutoscroll(true);
    detailPanel.setHeight("100%");
    detailPanel.setWidth("100%");
    detailPanel.appendCenter(detail);
    //		Div dv = new Div();
    div.appendChild(detailPanel);
    div.setHeight("100%");
    div.setWidth("100%");
    searchTab.appendCenter(detailPanel);
    Hbox hbox = new Hbox();
    //		bCancel.setLabel(Msg.getMsg(Env.getCtx(), "Cancel").replaceAll("[&]",""));
    bCancel.addActionListener(new EventListener() {

        public void onEvent(Event evt) {
            cmd_Cancel();
        }
    });
    //		bOk.setLabel(Msg.getMsg(Env.getCtx(), "Ok").replaceAll("[&]",""));
    bOk.addActionListener(new EventListener() {

        public void onEvent(Event evt) {
            cmd_Ok();
        }
    });
    Div confirmDiv = new Div();
    confirmDiv.setAlign("center");
    hbox.appendChild(bCancel);
    hbox.appendChild(bOk);
    hbox.setAlign("center");
    confirmDiv.appendChild(hbox);
    Separator separator = new Separator();
    separator.setBar(true);
    confirmDiv.appendChild(separator);
    confirmDiv.appendChild(statusBar);
    searchTab.appendSouth(confirmDiv);
    searchTab.getSouth().setBorder("none");
    Tabpanel search = new Tabpanel();
    search.setWidth("100%");
    search.appendChild(searchTab);
    Tab tabSearch = new Tab();
    tabSearch.addEventListener(Events.ON_SELECT, this);
    tabSearch.setLabel(Msg.getMsg(Env.getCtx(), "Search").replaceAll("[&]", ""));
    Tabs tabs = new Tabs();
    tabs.appendChild(tabSearch);
    Tabpanels tabPanels = new Tabpanels();
    tabPanels.setWidth("100%");
    tabPanels.appendChild(search);
    //graphPanel = new Borderlayout();
    //TODO victor.perez@e-evolution.com implement Graph Functionality
    //Tabpanel graph = new Tabpanel();
    //graph.setWidth("100%");
    //graph.appendChild(graphPanel);
    //Tab tabGraph = new Tab();
    //tabGraph.addEventListener(Events.ON_SELECT, this);
    //tabGraph.setLabel(Msg.getMsg(Env.getCtx(), "Graph").replaceAll("[&]",
    //		""));
    //tabs.appendChild(tabGraph);
    //tabPanels.appendChild(graph);
    tabsPanel.setWidth("100%");
    tabsPanel.setHeight("100%");
    tabsPanel.appendChild(tabs);
    tabsPanel.appendChild(tabPanels);
    mainLayout.appendCenter(tabsPanel);
}
Also used : Hbox(org.zkoss.zul.Hbox) Center(org.zkoss.zul.Center) Tabbox(org.adempiere.webui.component.Tabbox) Borderlayout(org.adempiere.webui.component.Borderlayout) Div(org.zkoss.zul.Div) Tab(org.adempiere.webui.component.Tab) Button(org.adempiere.webui.component.Button) Tabpanels(org.adempiere.webui.component.Tabpanels) ToolBar(org.adempiere.webui.component.ToolBar) WBrowserTable(org.eevolution.grid.WBrowserTable) Event(org.zkoss.zk.ui.event.Event) Tabs(org.adempiere.webui.component.Tabs) North(org.zkoss.zul.North) EventListener(org.zkoss.zk.ui.event.EventListener) Vbox(org.zkoss.zul.Vbox) Tabpanel(org.adempiere.webui.component.Tabpanel) Separator(org.zkoss.zul.Separator)

Example 9 with Tabpanels

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

the class AboutWindow method init.

private void init() {
    this.setWidth("500px");
    this.setHeight("450px");
    this.setPosition("center");
    this.setTitle(ThemeManager.getBrowserTitle());
    this.setClosable(true);
    this.setSizable(true);
    this.addEventListener(Events.ON_SIZE, this);
    Vbox layout = new Vbox();
    layout.setWidth("100%");
    layout.setParent(this);
    tabbox = new Tabbox();
    tabbox.setParent(layout);
    tabbox.setWidth("480px");
    tabbox.setHeight("380px");
    //		tabbox.setSclass("lite");
    Tabs tabs = new Tabs();
    tabs.setParent(tabbox);
    tabPanels = new Tabpanels();
    tabPanels.setParent(tabbox);
    tabPanels.setWidth("480px");
    //about
    Tab tab = new Tab();
    tab.setLabel(Msg.getMsg(Env.getCtx(), "About"));
    tab.setParent(tabs);
    Tabpanel tabPanel = createAbout();
    tabPanel.setParent(tabPanels);
    //Credit
    tab = new Tab();
    tab.setLabel(Msg.getMsg(Env.getCtx(), "Credits"));
    tab.setParent(tabs);
    tabPanel = createCredit();
    tabPanel.setParent(tabPanels);
    //Info
    tab = new Tab();
    tab.setLabel(Msg.getMsg(Env.getCtx(), "Info"));
    tab.setParent(tabs);
    tabPanel = createInfo();
    tabPanel.setParent(tabPanels);
    //Trace
    tab = new Tab();
    tab.setLabel("Errors");
    tabLog = tab;
    tab.setParent(tabs);
    tabPanel = createTrace();
    tabPanel.setParent(tabPanels);
    Hbox hbox = new Hbox();
    hbox.setParent(layout);
    hbox.setPack("end");
    hbox.setWidth("100%");
    Button btnOk = new Button();
    btnOk.setImage("/images/Ok24.png");
    btnOk.addEventListener(Events.ON_CLICK, this);
    btnOk.setParent(hbox);
    this.setBorder("normal");
}
Also used : Hbox(org.zkoss.zul.Hbox) Tab(org.adempiere.webui.component.Tab) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Button(org.adempiere.webui.component.Button) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Tabbox(org.adempiere.webui.component.Tabbox) Vbox(org.zkoss.zul.Vbox) Tabpanel(org.adempiere.webui.component.Tabpanel)

Example 10 with Tabpanels

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

the class WTextEditorDialog method init.

private void init() {
    setBorder("normal");
    VerticalBox vbox = new VerticalBox();
    appendChild(vbox);
    tabbox = new Tabbox();
    vbox.appendChild(tabbox);
    Tabs tabs = new Tabs();
    tabbox.appendChild(tabs);
    Tabpanels tabPanels = new Tabpanels();
    tabbox.appendChild(tabPanels);
    Tab tab = new Tab("Text");
    tabs.appendChild(tab);
    Tabpanel tabPanel = new Tabpanel();
    tabPanels.appendChild(tabPanel);
    textBox = new Textbox(text);
    textBox.setCols(80);
    textBox.setRows(30);
    textBox.setEnabled(editable);
    textBox.setWidth("700px");
    textBox.setHeight("500px");
    tabPanel.appendChild(textBox);
    tab = new Tab("HTML");
    tabs.appendChild(tab);
    tabPanel = new Tabpanel();
    tabPanels.appendChild(tabPanel);
    if (editable) {
        editor = new FCKeditor();
        tabPanel.appendChild(editor);
        editor.setWidth("700px");
        editor.setHeight("500px");
        editor.setValue(text);
    } else {
        Div div = new Div();
        div.setHeight("500px");
        div.setWidth("700px");
        div.setStyle("overflow: auto; border: 1px solid");
        tabPanel.appendChild(div);
        Html html = new Html();
        div.appendChild(html);
        html.setContent(text);
    }
    vbox.appendChild(new Separator());
    ConfirmPanel confirmPanel = new ConfirmPanel(true);
    vbox.appendChild(confirmPanel);
    confirmPanel.addButton(confirmPanel.createButton(ConfirmPanel.A_RESET));
    confirmPanel.addActionListener(this);
    if (maxSize > 0) {
        status = new Label();
        appendChild(status);
        updateStatus(text.length());
        status.setStyle("margin-top:10px;");
        textBox.addEventListener(Events.ON_CHANGE, this);
        editor.addEventListener(Events.ON_CHANGE, this);
    }
    tabbox.addEventListener(Events.ON_SELECT, this);
}
Also used : VerticalBox(org.adempiere.webui.component.VerticalBox) Textbox(org.adempiere.webui.component.Textbox) Label(org.adempiere.webui.component.Label) Html(org.zkoss.zul.Html) Tabbox(org.adempiere.webui.component.Tabbox) Div(org.zkoss.zul.Div) Tab(org.adempiere.webui.component.Tab) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Tabpanel(org.adempiere.webui.component.Tabpanel) Separator(org.zkoss.zul.Separator) FCKeditor(org.zkforge.fckez.FCKeditor)

Aggregations

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