Class DefaultDesktop

All Implemented Interfaces:
Serializable, IDesktop, MenuListener, ISupportMask, UIPart, org.osgi.service.event.EventHandler, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.util.DesktopCleanup

public class DefaultDesktop extends TabbedDesktop implements MenuListener, Serializable, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.osgi.service.event.EventHandler, org.zkoss.zk.ui.util.DesktopCleanup
Default IDesktop implementation.
Author:
Ashley G Ramdass, Low Heng Sin, Deepak Pansheriya/Vivek - Adding support for message broadcasting
See Also:
  • Constructor Details

    • DefaultDesktop

      public DefaultDesktop()
      Default constructor
  • Method Details

    • doCreatePart

      protected org.zkoss.zk.ui.Component doCreatePart(org.zkoss.zk.ui.Component parent)
      Create desktop layout from "zul/desktop/desktop.zul".
      Specified by:
      doCreatePart in class AbstractUIPart
      Parameters:
      parent - parent Component or null for root UI block
      Returns:
      Component
    • updateSideControllerWidthPreference

      protected void updateSideControllerWidthPreference(String width)
      Save width of west panel as user preference
      Parameters:
      width -
    • updateHelpWidthPreference

      protected void updateHelpWidthPreference(String width)
      Save width of east/help panel as user preference
      Parameters:
      width -
    • renderHomeTab

      public void renderHomeTab()
      Render content of home tab.
      Delegate to DashboardController.render(Component, IDesktop, boolean)
      Specified by:
      renderHomeTab in interface IDesktop
    • setSidePopupWidth

      protected void setSidePopupWidth(org.zkoss.zul.Popup popup)
      Set width of popup for side panel
      Parameters:
      popup -
    • onEvent

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

      protected void restoreHeader()
      Make page/desktop header visible again
    • collapseHeader

      protected void collapseHeader()
      Hide page/desktop header
    • setPage

      public void setPage(org.zkoss.zk.ui.Page page)
      Description copied from interface: IDesktop
      Attached to page
      Specified by:
      setPage in interface IDesktop
      Parameters:
      page -
    • getComponent

      public org.zkoss.zk.ui.Component getComponent()
      Get the root component
      Specified by:
      getComponent in interface IDesktop
      Specified by:
      getComponent in interface UIPart
      Returns:
      Component
    • logout

      public void logout()
      Description copied from interface: IDesktop
      User logout from desktop, do clean up
      Specified by:
      logout in interface IDesktop
    • logout

      public void logout(Callback<Boolean> callback)
      Description copied from interface: IDesktop
      Logout from desktop (call IDesktop.logout().
      Specified by:
      logout in interface IDesktop
      Parameters:
      callback - callback after logout
    • updateUI

      public void updateUI()
      Update home tab title after IDesktop.ON_ACTIVITIES_CHANGED_EVENT
    • preOpenNewTab

      protected void preOpenNewTab()
      Description copied from class: TabbedDesktop
      invoke before a new tab is added to the desktop
      Overrides:
      preOpenNewTab in class TabbedDesktop
    • bindEventManager

      public void bindEventManager()
      Implementation for Broadcast message
    • unbindEventManager

      public void unbindEventManager()
      Clean up for Broadcast message
    • handleEvent

      public void handleEvent(org.osgi.service.event.Event event)
      Handle OSGi event for Broadcast message
      Specified by:
      handleEvent in interface org.osgi.service.event.EventHandler
    • cleanup

      public void cleanup(org.zkoss.zk.ui.Desktop desktop) throws Exception
      Specified by:
      cleanup in interface org.zkoss.zk.ui.util.DesktopCleanup
      Throws:
      Exception
    • updateHelpContext

      public void updateHelpContext(String ctxType, int recordId)
      Description copied from interface: IDesktop
      Update help content in help/info panel
      Specified by:
      updateHelpContext in interface IDesktop
    • updateHelpContext

      public void updateHelpContext(String ctxType, int recordId, InfoPanel infoPanel)
      Description copied from interface: IDesktop
      Update help content in help/info panel
      Specified by:
      updateHelpContext in interface IDesktop
    • updateHelpTooltip

      public void updateHelpTooltip(GridField gridField)
      Description copied from interface: IDesktop
      Update tooltip content in help/info panel
      Specified by:
      updateHelpTooltip in interface IDesktop
    • updateHelpTooltip

      public void updateHelpTooltip(String hdr, String desc, String help, String otherContent, String entityType)
      Description copied from interface: IDesktop
      Update tooltip content in help/info panel
      Specified by:
      updateHelpTooltip in interface IDesktop
    • updateHelpQuickInfo

      public void updateHelpQuickInfo(InfoPanel infoPanel)
      Description copied from interface: IDesktop
      Update quick info (status line) in help/info panel
      Specified by:
      updateHelpQuickInfo in interface IDesktop
    • updateHelpQuickInfo

      public void updateHelpQuickInfo(GridTab gridTab)
      Description copied from interface: IDesktop
      Update quick info (status line) in help/info panel
      Specified by:
      updateHelpQuickInfo in interface IDesktop
    • openProcessDialog

      public ProcessDialog openProcessDialog(int processId, boolean soTrx)
      Description copied from interface: IDesktop
      Open process dialog in desktop
      Specified by:
      openProcessDialog in interface IDesktop
      Overrides:
      openProcessDialog in class TabbedDesktop
      Returns:
      ProcessDialog
    • openForm

      public ADForm openForm(int formId)
      Description copied from interface: IDesktop
      Open AD form in desktop
      Specified by:
      openForm in interface IDesktop
      Overrides:
      openForm in class TabbedDesktop
      Returns:
      ADForm
    • openWorkflow

      public void openWorkflow(int workflow_ID)
      Description copied from interface: IDesktop
      Open workflow window in desktop
      Specified by:
      openWorkflow in interface IDesktop
      Overrides:
      openWorkflow in class TabbedDesktop
    • openTask

      public void openTask(int taskId)
      Description copied from interface: IDesktop
      Open operating system task window
      Specified by:
      openTask in interface IDesktop
      Overrides:
      openTask in class TabbedDesktop
    • isPendingWindow

      public boolean isPendingWindow()
      Description copied from interface: IDesktop
      Is pending changes to be saved
      Specified by:
      isPendingWindow in interface IDesktop
      Returns:
      true if there are changes not save yet
    • onMenuSelected

      public void onMenuSelected(int menuId)
      Description copied from class: AbstractDesktop
      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
      Specified by:
      onMenuSelected in interface MenuListener
      Overrides:
      onMenuSelected in class AbstractDesktop
      Parameters:
      menuId - Identifier for the selected menu item
    • getMenuID

      protected int getMenuID()
      Returns:
      Menu tree ID for login role
    • setClientInfo

      public void setClientInfo(ClientInfo clientInfo)
      Description copied from interface: IDesktop
      Set client (browser) info
      Specified by:
      setClientInfo in interface IDesktop
      Overrides:
      setClientInfo in class AbstractDesktop