Search in sources :

Example 1 with ADTabPanel

use of org.adempiere.webui.panel.ADTabPanel in project adempiere by adempiere.

the class WTrxMaterial method dynInit.

//  dynParameter
/**
	 *  Dynamic Layout (Grid).
	 * 	Based on AD_Window: Material Transactions
	 */
private void dynInit() {
    super.dynInit(statusBar);
    //
    m_gridController = new ADTabPanel();
    m_gridController.init(null, m_WindowNo, m_mTab, m_mWindow);
    if (!m_gridController.isGridView())
        m_gridController.switchRowPresentation();
    Center center = new Center();
    mainLayout.appendChild(center);
    center.setFlex(true);
    center.appendChild(m_gridController);
}
Also used : ADTabPanel(org.adempiere.webui.panel.ADTabPanel) Center(org.zkoss.zkex.zul.Center)

Example 2 with ADTabPanel

use of org.adempiere.webui.panel.ADTabPanel in project adempiere by adempiere.

the class WAccountDialog method init.

/**
	 *	Static component init.
	 *  <pre>
	 *  - north
	 *    - parameterPanel
	 *    - toolBar
	 *  - center
	 *    - adtabpanel
	 *  - south
	 *    - confirmPanel
	 *    - statusBar
	 *  </pre>
	 *  @throws Exception
	 */
void init() throws Exception {
    //
    Caption caption = new Caption(Msg.getMsg(Env.getCtx(), "Parameter"));
    parameterPanel.appendChild(caption);
    parameterPanel.setStyle("background-color: transparent;");
    toolBar.setOrient("vertical");
    toolBar.setStyle("border: none; margin: 5px");
    bSave.setImage(ServletFns.resolveThemeURL("~./images/Save24.png"));
    bSave.setTooltiptext(Msg.getMsg(Env.getCtx(), "AccountNewUpdate"));
    bSave.addEventListener(Events.ON_CLICK, this);
    bRefresh.setImage(ServletFns.resolveThemeURL("~./images/Refresh24.png"));
    bRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(), "Refresh"));
    bRefresh.addEventListener(Events.ON_CLICK, this);
    bIgnore.setImage(ServletFns.resolveThemeURL("~./images/Ignore24.png"));
    bIgnore.setTooltiptext(Msg.getMsg(Env.getCtx(), "Ignore"));
    bIgnore.addEventListener(Events.ON_CLICK, this);
    //
    toolBar.appendChild(bRefresh);
    toolBar.appendChild(bIgnore);
    toolBar.appendChild(bSave);
    //
    northPanel.appendChild(parameterPanel);
    parameterPanel.setWidth("95%");
    northPanel.appendChild(toolBar);
    northPanel.setWidth("100%");
    m_adTabPanel = new ADTabPanel();
    Borderlayout layout = new Borderlayout();
    layout.setParent(this);
    if (AEnv.isFirefox2()) {
        layout.setHeight("93%");
        layout.setWidth("98%");
        layout.setStyle("background-color: transparent; position: absolute;");
        this.setStyle("position: relative;");
    } else {
        layout.setHeight("100%");
        layout.setWidth("100%");
        layout.setStyle("background-color: transparent;");
    }
    North nRegion = new North();
    nRegion.setParent(layout);
    nRegion.setHflex("false");
    nRegion.setVflex("false");
    nRegion.appendChild(northPanel);
    nRegion.setStyle("background-color: transparent; border: none");
    northPanel.setStyle("background-color: transparent;");
    Center cRegion = new Center();
    cRegion.setParent(layout);
    cRegion.appendChild(m_adTabPanel);
    cRegion.setHflex("true");
    cRegion.setVflex("true");
    South sRegion = new South();
    sRegion.setParent(layout);
    Div div = new Div();
    div.appendChild(confirmPanel);
    confirmPanel.setStyle("margin-top: 5px; margin-bottom: 5px");
    div.appendChild(statusBar);
    sRegion.appendChild(div);
    sRegion.setStyle("background-color: transparent; border: none");
    confirmPanel.addActionListener(Events.ON_CLICK, this);
    this.setBorder("normal");
    this.setClosable(false);
    this.setAttribute("modal", Boolean.TRUE);
    this.setSizable(true);
}
Also used : ADTabPanel(org.adempiere.webui.panel.ADTabPanel) Div(org.zkoss.zul.Div) Center(org.zkoss.zul.Center) South(org.zkoss.zul.South) North(org.zkoss.zul.North) Borderlayout(org.zkoss.zul.Borderlayout) Caption(org.zkoss.zul.Caption)

Example 3 with ADTabPanel

use of org.adempiere.webui.panel.ADTabPanel in project adempiere by adempiere.

the class WStocktake method dynInit.

//  dynParameter
/**
	 *  Dynamic Layout (Grid).
	 * 	Based on AD_Window: Material Transactions
	 */
private void dynInit() {
    super.dynInit(statusBar);
    //
    m_gridController = new ADTabPanel();
    m_gridController.init(null, m_WindowNo, m_mTab, m_mWindow);
    if (!m_gridController.isGridView())
        m_gridController.switchRowPresentation();
    Center center = new Center();
    mainLayout.appendChild(center);
    center.setFlex(true);
    center.appendChild(m_gridController);
}
Also used : ADTabPanel(org.adempiere.webui.panel.ADTabPanel) Center(org.zkoss.zkex.zul.Center)

Example 4 with ADTabPanel

use of org.adempiere.webui.panel.ADTabPanel in project adempiere by adempiere.

the class AbstractADTab method canNavigateTo.

public boolean canNavigateTo(int fromIndex, int toIndex) {
    IADTabPanel newTab = tabPanelList.get(toIndex);
    if (newTab instanceof ADTabPanel) {
        if (!isDisplay(newTab)) {
            return false;
        }
    }
    boolean canJump = true;
    if (toIndex != fromIndex) {
        IADTabPanel oldTabpanel = fromIndex >= 0 ? tabPanelList.get(fromIndex) : null;
        if (oldTabpanel != null) {
            IADTabPanel oldTab = oldTabpanel;
            if (newTab.getTabLevel() > oldTab.getTabLevel()) {
                int currentLevel = newTab.getTabLevel();
                for (int i = toIndex - 1; i >= 0; i--) {
                    IADTabPanel tabPanel = tabPanelList.get(i);
                    if (tabPanel.getTabLevel() < currentLevel) {
                        if (!tabPanel.isCurrent()) {
                            canJump = false;
                            break;
                        }
                        currentLevel = tabPanel.getTabLevel();
                    }
                }
            }
        }
    }
    return canJump;
}
Also used : IADTabPanel(org.adempiere.webui.panel.IADTabPanel) ADTabPanel(org.adempiere.webui.panel.ADTabPanel) IADTabPanel(org.adempiere.webui.panel.IADTabPanel)

Aggregations

ADTabPanel (org.adempiere.webui.panel.ADTabPanel)4 Center (org.zkoss.zkex.zul.Center)2 IADTabPanel (org.adempiere.webui.panel.IADTabPanel)1 Borderlayout (org.zkoss.zul.Borderlayout)1 Caption (org.zkoss.zul.Caption)1 Center (org.zkoss.zul.Center)1 Div (org.zkoss.zul.Div)1 North (org.zkoss.zul.North)1 South (org.zkoss.zul.South)1