Search in sources :

Example 1 with Tabbox

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

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

the class ADTabPanel method createHorizontalPanelForEmbedded.

private org.zkoss.zul.Row createHorizontalPanelForEmbedded(org.zkoss.zul.Div divComponent, org.zkoss.zul.Row footer, HorizontalEmbeddedPanel ep) {
    //Setting Properties to Div Component
    divComponent.setHeight("100%");
    divComponent.setWidth("100%");
    // Create a Panel Object
    Panel panel = new Panel();
    //Setting Properties to Panel
    panel.setFramable(true);
    //panel.setStyle("overflow:auto");
    panel.setWidth("100%");
    panel.setHeight("100%");
    panel.setMaximizable(true);
    //creating Object to PanelChildren class
    ep.panelChildren = new Panelchildren();
    // Creating a Object to Grid And Apply Properties
    Grid newGrid = new Grid();
    newGrid.setVflex(true);
    newGrid.setStyle("margin:0; padding:0; position: absolute; border: none;");
    newGrid.makeNoStrip();
    newGrid.setWidth("100%");
    newGrid.setHeight("100%");
    // Grid append to Panel Children
    ep.panelChildren.appendChild(newGrid);
    // Panel Children Append to Panel
    panel.appendChild(ep.panelChildren);
    // Creating one Tabbox And panel append to TabPanels
    Tabbox panels = setTabPanels(ep, panel);
    // TabBox Append to divComponent
    panels.setParent(divComponent);
    ep.embeddedGrid = newGrid;
    //Creating Rows based on the Grid
    Rows newRows = newGrid.newRows();
    newRows.setWidth("100%");
    newRows.setHeight("100%");
    org.zkoss.zul.Row newRow = new Group();
    // Create a Row For ToolBar
    org.zkoss.zul.Row toolbarRow = new org.adempiere.webui.component.Row();
    toolbarRow.setSpans("5");
    ep.toolbarRow = toolbarRow;
    //Create a Row For All Widgets
    org.zkoss.zul.Row panelRow = new org.adempiere.webui.component.Row();
    panelRow.setSpans("5");
    panelRow.setWidth("100%");
    panelRow.setHeight("100%");
    // Added to Group
    newRows.appendChild(newRow);
    // Added to tool-bar Row
    newRows.appendChild(toolbarRow);
    // Now added to Panel Row
    newRows.appendChild(panelRow);
    //Added to footer
    newRows.appendChild(footer);
    return panelRow;
}
Also used : org.zkoss.zul(org.zkoss.zul) Panel(org.zkoss.zul.Panel) Row(org.zkoss.zul.Row) Grid(org.adempiere.webui.component.Grid) Tabbox(org.adempiere.webui.component.Tabbox) Row(org.zkoss.zul.Row) Rows(org.adempiere.webui.component.Rows)

Example 3 with Tabbox

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

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

the class WMRPDetailed method initComponents.

private void initComponents() {
    OrderPlanning = new Tabbox();
    PanelOrder = new Tab();
    PanelFind = new Panel();
    PanelCenter = new Panel();
    PanelBottom = new Panel();
    Results = new Tab();
    Borderlayout PanelOrderLayout = new Borderlayout();
    PanelOrder.appendChild(PanelOrderLayout);
    North north = new North();
    PanelOrderLayout.appendChild(north);
    north.appendChild(PanelFind);
    Center center = new Center();
    PanelOrderLayout.appendChild(center);
    center.appendChild(PanelCenter);
    South south = new South();
    PanelOrderLayout.appendChild(south);
    south.appendChild(PanelBottom);
    OrderPlanning.appendChild(PanelOrder);
    OrderPlanning.appendChild(Results);
    PanelOrder.setLabel("Order");
    Results.setLabel("Result");
    Center center2 = new Center();
    mainLayout.appendChild(center2);
    center2.appendChild(OrderPlanning);
    m_frame.setWidth("99%");
    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");
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) StatusBarPanel(org.adempiere.webui.panel.StatusBarPanel) Center(org.zkoss.zul.Center) Tab(org.adempiere.webui.component.Tab) South(org.zkoss.zul.South) Tabbox(org.adempiere.webui.component.Tabbox) North(org.zkoss.zul.North) Borderlayout(org.adempiere.webui.component.Borderlayout)

Example 5 with Tabbox

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

Tabbox (org.adempiere.webui.component.Tabbox)9 Tabpanels (org.adempiere.webui.component.Tabpanels)6 Tabs (org.adempiere.webui.component.Tabs)6 Tab (org.adempiere.webui.component.Tab)5 Tabpanel (org.adempiere.webui.component.Tabpanel)5 Borderlayout (org.adempiere.webui.component.Borderlayout)2 Button (org.adempiere.webui.component.Button)2 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)2 Center (org.zkoss.zul.Center)2 Div (org.zkoss.zul.Div)2 Hbox (org.zkoss.zul.Hbox)2 North (org.zkoss.zul.North)2 Separator (org.zkoss.zul.Separator)2 Vbox (org.zkoss.zul.Vbox)2 DesktopTabpanel (org.adempiere.webui.component.DesktopTabpanel)1 Grid (org.adempiere.webui.component.Grid)1 Label (org.adempiere.webui.component.Label)1 Panel (org.adempiere.webui.component.Panel)1 Rows (org.adempiere.webui.component.Rows)1 Textbox (org.adempiere.webui.component.Textbox)1