Class AbstractDesktop

java.lang.Object
org.adempiere.webui.part.AbstractUIPart
org.adempiere.webui.desktop.AbstractDesktop
All Implemented Interfaces:
IDesktop, ISupportMask, UIPart
Direct Known Subclasses:
TabbedDesktop

public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop
Abstract base class for IDesktop implementation
Author:
hengsin
  • Constructor Details

    • AbstractDesktop

      public AbstractDesktop()
      Default constructor
  • Method Details

    • onMenuSelected

      public void onMenuSelected(int menuId)
      Event listener for menu item selection.
      Identifies the action associated with the selected menu item and acts accordingly.
      Event from favourite panel, global search and application menu tree will be routed here.
      Specified by:
      onMenuSelected in interface IDesktop
      Parameters:
      menuId - Identifier for the selected menu item
      Throws:
      ApplicationException - If the selected menu action has yet to be implemented
    • onNewRecord

      public void onNewRecord(int menuId)
      Open AD window in new record mode.
      Call by global search, application menu tree and favourite panel.
      Specified by:
      onNewRecord in interface IDesktop
      Parameters:
      menuId -
    • updateRecentMenuItem

      protected void updateRecentMenuItem(int menuId)
      Perform asynchronous update of recent menu items preference for user
      Parameters:
      menuId -
    • getClientInfo

      public ClientInfo getClientInfo()
      Description copied from interface: IDesktop
      Get client (browser) info
      Specified by:
      getClientInfo in interface IDesktop
      Returns:
      ClientInfo
    • setClientInfo

      public void setClientInfo(ClientInfo clientInfo)
      Description copied from interface: IDesktop
      Set client (browser) info
      Specified by:
      setClientInfo in interface IDesktop
      Parameters:
      clientInfo -
    • registerWindow

      public int registerWindow(Object win)
      Description copied from interface: IDesktop
      Register new window
      Specified by:
      registerWindow in interface IDesktop
      Parameters:
      win -
      Returns:
      windowNo for new window
    • unregisterWindow

      public void unregisterWindow(int WindowNo)
      Remove from registered window list and clear environment context
      Specified by:
      unregisterWindow in interface IDesktop
      Parameters:
      WindowNo -
    • findWindow

      public Object findWindow(int WindowNo)
      Find window by registered window number
      Specified by:
      findWindow in interface IDesktop
      Parameters:
      WindowNo -
      Returns:
      Object
    • findWindowNo

      public int findWindowNo(org.zkoss.zk.ui.Component component)
      Description copied from interface: IDesktop
      Find registered window no via component tree
      Specified by:
      findWindowNo in interface IDesktop
      Returns:
      register window no or -1 if not found
    • showWindow

      public void showWindow(Window win)
      Specified by:
      showWindow in interface IDesktop
      Parameters:
      win -
    • showWindow

      public void showWindow(Window win, String pos)
      When width of win set by stylesheet (css class or in style) win sometime don't position in center.
      To workaround that, use LayoutUtils.openOverlappedWindow(org.zkoss.zk.ui.Component, org.zkoss.zul.Window, String).
      Specified by:
      showWindow in interface IDesktop
      Parameters:
      win - Window
      pos - see Window.setPosition(String)
    • showEmbedded

      protected abstract void showEmbedded(Window win)
      Show Window.Mode.EMBEDDED window
      Parameters:
      win -
    • showModal

      protected void showModal(Window win)
      Show modal window.
      Parameters:
      win -
    • showPopup

      protected void showPopup(Window win, String position)
      Show Window.Mode.POPUP window
      Parameters:
      win - Window
      position - see Window.setPosition(String)
    • showOverlapped

      protected void showOverlapped(Window win, String position)
      Show Window.Mode.OVERLAPPED window
      Parameters:
      win - Window
      position - see Window.setPosition(String)
    • showHighlighted

      protected void showHighlighted(Window win, String position)
      Show Window.Mode.HIGHLIGHTED window
      Parameters:
      win - Window
      position - see Window.setPosition(String)
    • getWindows

      protected List<Object> getWindows()
      Returns:
      List of registered windows
    • setPredefinedContextVariables

      public void setPredefinedContextVariables(String predefinedVariables)
      Parameters:
      predefinedVariables -
    • getPredefinedContextVariables

      protected String getPredefinedContextVariables()
      Returns:
      predefinedContextVariables
    • setMenuIsSOTrx

      public void setMenuIsSOTrx(boolean isSOTrx)
      Parameters:
      isSOTrx -
    • isMenuSOTrx

      protected boolean isMenuSOTrx()
      Returns:
      menuIsSOTrx
    • isCloseTabWithShortcut

      public boolean isCloseTabWithShortcut()
      Description copied from interface: IDesktop
      Is closing tab with ESC shortcut key allowed
      Specified by:
      isCloseTabWithShortcut in interface IDesktop
      Returns:
      true if allowed
    • setCloseTabWithShortcut

      public void setCloseTabWithShortcut(boolean isCloseTabWithShortcut)
      Description copied from interface: IDesktop
      Set if closing tab with ESC shortcut key is allowed
      Specified by:
      setCloseTabWithShortcut in interface IDesktop