Class WindowContainer

java.lang.Object
org.adempiere.webui.part.AbstractUIPart
org.adempiere.webui.part.WindowContainer
All Implemented Interfaces:
ISupportMask, UIPart, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>

public class WindowContainer extends AbstractUIPart implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
Controller for multiple desktop windows (tabs).
Implemented using Tabbox.
Author:
Low Heng Sin
  • Field Details

  • Constructor Details

    • WindowContainer

      public WindowContainer()
  • Method Details

    • createFrom

      public static WindowContainer createFrom(Tabbox tb)
      Parameters:
      tb -
      Returns:
      WindowContainer
    • doCreatePart

      protected org.zkoss.zk.ui.Component doCreatePart(org.zkoss.zk.ui.Component parent)
      Description copied from class: AbstractUIPart
      Sub class override this to create root UI block or child UI block
      Specified by:
      doCreatePart in class AbstractUIPart
      Parameters:
      parent - parent Component or null for root UI block
      Returns:
      Component
    • addWindow

      @Deprecated(forRemoval=true, since="11") public Tab addWindow(org.zkoss.zk.ui.Component comp, String title, boolean closeable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      comp -
      title -
      closeable -
      Returns:
    • addWindow

      @Deprecated(forRemoval=true, since="11") public Tab addWindow(org.zkoss.zk.ui.Component comp, String title, boolean closeable, boolean enable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      comp -
      title -
      closeable -
      enable -
      Returns:
    • insertBefore

      @Deprecated(forRemoval=true, since="11") public Tab insertBefore(Tab refTab, org.zkoss.zk.ui.Component comp, String title, boolean closeable, boolean enable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      refTab -
      comp -
      title -
      closeable -
      enable -
      Returns:
    • insertAfter

      @Deprecated(forRemoval=true, since="11") public Tab insertAfter(Tab refTab, org.zkoss.zk.ui.Component comp, String title, boolean closeable, boolean enable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      refTab -
      comp -
      title -
      closeable -
      enable -
      Returns:
    • addWindow

      public Tab addWindow(org.zkoss.zk.ui.Component comp, String title, boolean closeable, Tab.DecorateInfo decorateInfo)
      Add comp as new tab
      Parameters:
      comp -
      title -
      closeable -
      decorateInfo -
      Returns:
      new tab
    • addWindow

      public Tab addWindow(org.zkoss.zk.ui.Component comp, String title, boolean closeable, boolean enable, Tab.DecorateInfo decorateInfo)
      Add comp as new tab
      Parameters:
      comp -
      title -
      closeable -
      enable -
      decorateInfo -
      Returns:
      new tab
    • insertBefore

      public Tab insertBefore(Tab refTab, org.zkoss.zk.ui.Component comp, String title, boolean closeable, boolean enable, Tab.DecorateInfo decorateInfo)
      Insert comp as new tab before refTab
      Parameters:
      refTab -
      comp -
      title -
      closeable -
      enable -
      decorateInfo -
      Returns:
      new tab
    • closeTabs

      protected void closeTabs(Tab tab, int start, int end, int focus)
      Close tabs from start to end, set focus to focus index parameter.
      Parameters:
      tab -
      start -
      end -
      focus -
    • setTabTitle

      public void setTabTitle(String title, int windowNo)
      Set tab title by windowNo
      Parameters:
      title -
      windowNo -
    • getTab

      public org.zkoss.zul.Tab getTab(int windowNo)
      IDEMPIERE-2333 / getTab - get tab by windowNo
      Parameters:
      windowNo -
      Returns:
      org.zkoss.zul.Tab
    • setTabTitle

      public void setTabTitle(String title, org.zkoss.zul.Tab tab)
      Set title of tab
      Parameters:
      title -
      tab -
    • insertAfter

      public Tab insertAfter(Tab refTab, org.zkoss.zk.ui.Component comp, String title, boolean closeable, boolean enable, Tab.DecorateInfo decorateInfo)
      Insert comp as new tab after refTab.
      Parameters:
      refTab -
      comp -
      title -
      closeable -
      enable -
      decorateInfo -
      Returns:
      new tab
    • replace

      public org.zkoss.zul.Tab replace(org.zkoss.zul.Tab refTab, Window comp, String title)
      IDEMPIERE-5275 - Tabular Report Re-Run button/close parameter window.
      Replace content of refTab with comp.
      Parameters:
      refTab -
      comp -
      title -
      Returns:
      org.zkoss.zul.Tab
    • setSelectedTab

      public void setSelectedTab(org.zkoss.zul.Tab tab)
      Set tab as selected tab.
      Parameters:
      tab -
    • closeActiveWindow

      public boolean closeActiveWindow()
      Close current active window (tab)
      Returns:
      true if successfully close the active window
    • getSelectedTab

      public Tab getSelectedTab()
      Get current selected tab
      Returns:
      Tab
    • setTabTitle

      public void setTabTitle(int tabNo, String title, String tooltip)
      Set title and tooltip of a tab
      Parameters:
      tabNo -
      title -
      tooltip -
    • getComponent

      public Tabbox getComponent()
      Get root component
      Specified by:
      getComponent in interface UIPart
      Returns:
      Tabbox
    • getToobar

      public ToolBar getToobar()
      Get toolbar
      Returns:
      toolbar
    • onEvent

      public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception
      Specified by:
      onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
      Throws:
      Exception