Search in sources :

Example 1 with Tabpanels

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

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

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

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

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

the class WindowContainer method doCreatePart.

protected Component doCreatePart(Component parent) {
    tabbox = new Tabbox();
    tabbox.setSclass("desktop-tabbox");
    tabbox.setId("desktop_tabbox");
    Tabpanels tabpanels = new Tabpanels();
    tabpanels.setVflex("1");
    tabpanels.setHflex("1");
    Tabs tabs = new Tabs();
    tabbox.appendChild(tabs);
    tabbox.appendChild(tabpanels);
    //tabbox.setWidth("100%");
    //tabbox.setHeight("100%");
    tabbox.setVflex("1");
    tabbox.setHflex("1");
    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)

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