Package org.adempiere.webui.desktop
Class DefaultDesktop
java.lang.Object
org.adempiere.webui.part.AbstractUIPart
org.adempiere.webui.desktop.AbstractDesktop
org.adempiere.webui.desktop.TabbedDesktop
org.adempiere.webui.desktop.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:
-
Field Summary
Fields inherited from class org.adempiere.webui.desktop.TabbedDesktop
windowContainer
Fields inherited from class org.adempiere.webui.part.AbstractUIPart
page, showMaskWrapper
Fields inherited from interface org.adempiere.webui.desktop.IDesktop
ACTIVITIES_EVENT_QUEUE, ON_ACTIVITIES_CHANGED_EVENT, ON_CLOSE_WINDOW_SHORTCUT_EVENT, WINDOWNO_ATTRIBUTE
Fields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Implementation for Broadcast messagevoid
cleanup
(org.zkoss.zk.ui.Desktop desktop) protected void
Hide page/desktop headerprotected org.zkoss.zk.ui.Component
doCreatePart
(org.zkoss.zk.ui.Component parent) Create desktop layout from "zul/desktop/desktop.zul".org.zkoss.zk.ui.Component
Get the root componentprotected int
void
handleEvent
(org.osgi.service.event.Event event) Handle OSGi event for Broadcast messageboolean
Is pending changes to be savedvoid
logout()
User logout from desktop, do clean upvoid
Logout from desktop (callIDesktop.logout()
.void
onEvent
(org.zkoss.zk.ui.event.Event event) 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.openForm
(int formId) Open AD form in desktopopenProcessDialog
(int processId, boolean soTrx) Open process dialog in desktopvoid
openTask
(int taskId) Open operating system task windowvoid
openWorkflow
(int workflow_ID) Open workflow window in desktopprotected void
invoke before a new tab is added to the desktopvoid
Render content of home tab.
Delegate toDashboardController.render(Component, IDesktop, boolean)
protected void
Make page/desktop header visible againvoid
setClientInfo
(ClientInfo clientInfo) Set client (browser) infovoid
setPage
(org.zkoss.zk.ui.Page page) Attached to pageprotected void
setSidePopupWidth
(org.zkoss.zul.Popup popup) Set width of popup for side panelvoid
Clean up for Broadcast messagevoid
updateHelpContext
(String ctxType, int recordId) Update help content in help/info panelvoid
updateHelpContext
(String ctxType, int recordId, InfoPanel infoPanel) Update help content in help/info panelvoid
updateHelpQuickInfo
(InfoPanel infoPanel) Update quick info (status line) in help/info panelvoid
updateHelpQuickInfo
(GridTab gridTab) Update quick info (status line) in help/info panelvoid
Update tooltip content in help/info panelvoid
updateHelpTooltip
(GridField gridField) Update tooltip content in help/info panelprotected void
updateHelpWidthPreference
(String width) Save width of east/help panel as user preferenceprotected void
Save width of west panel as user preferencevoid
updateUI()
Update home tab title afterIDesktop.ON_ACTIVITIES_CHANGED_EVENT
Methods inherited from class org.adempiere.webui.desktop.TabbedDesktop
closeActiveWindow, closeWindow, getActiveWindow, openInfo, openWindow, openWindow, setTabTitle, showEmbedded, showHTMLContent, showURL, showURL, showWindow, showZoomWindow
Methods inherited from class org.adempiere.webui.desktop.AbstractDesktop
findWindow, findWindowNo, getClientInfo, getPredefinedContextVariables, getWindows, isCloseTabWithShortcut, isMenuSOTrx, onNewRecord, registerWindow, setCloseTabWithShortcut, setMenuIsSOTrx, setPredefinedContextVariables, showHighlighted, showModal, showOverlapped, showPopup, showWindow, showWindow, unregisterWindow, updateRecentMenuItem
Methods inherited from class org.adempiere.webui.part.AbstractUIPart
createPart, getMaskComponent, getMaskObj, hideMask, showMask
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.adempiere.webui.desktop.IDesktop
updateHelpTooltip
Methods inherited from interface org.adempiere.webui.part.UIPart
createPart
-
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 classAbstractUIPart
- Parameters:
parent
- parent Component or null for root UI block- Returns:
- Component
-
updateSideControllerWidthPreference
Save width of west panel as user preference- Parameters:
width
-
-
updateHelpWidthPreference
Save width of east/help panel as user preference- Parameters:
width
-
-
renderHomeTab
public void renderHomeTab()Render content of home tab.
Delegate toDashboardController.render(Component, IDesktop, boolean)
- Specified by:
renderHomeTab
in interfaceIDesktop
-
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 interfaceorg.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 -
getComponent
public org.zkoss.zk.ui.Component getComponent()Get the root component- Specified by:
getComponent
in interfaceIDesktop
- Specified by:
getComponent
in interfaceUIPart
- Returns:
- Component
-
logout
public void logout()Description copied from interface:IDesktop
User logout from desktop, do clean up -
logout
Description copied from interface:IDesktop
Logout from desktop (callIDesktop.logout()
. -
updateUI
public void updateUI()Update home tab title afterIDesktop.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 classTabbedDesktop
-
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 interfaceorg.osgi.service.event.EventHandler
-
cleanup
- Specified by:
cleanup
in interfaceorg.zkoss.zk.ui.util.DesktopCleanup
- Throws:
Exception
-
updateHelpContext
Description copied from interface:IDesktop
Update help content in help/info panel- Specified by:
updateHelpContext
in interfaceIDesktop
-
updateHelpContext
Description copied from interface:IDesktop
Update help content in help/info panel- Specified by:
updateHelpContext
in interfaceIDesktop
-
updateHelpTooltip
Description copied from interface:IDesktop
Update tooltip content in help/info panel- Specified by:
updateHelpTooltip
in interfaceIDesktop
-
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 interfaceIDesktop
-
updateHelpQuickInfo
Description copied from interface:IDesktop
Update quick info (status line) in help/info panel- Specified by:
updateHelpQuickInfo
in interfaceIDesktop
-
updateHelpQuickInfo
Description copied from interface:IDesktop
Update quick info (status line) in help/info panel- Specified by:
updateHelpQuickInfo
in interfaceIDesktop
-
openProcessDialog
Description copied from interface:IDesktop
Open process dialog in desktop- Specified by:
openProcessDialog
in interfaceIDesktop
- Overrides:
openProcessDialog
in classTabbedDesktop
- Returns:
- ProcessDialog
-
openForm
Description copied from interface:IDesktop
Open AD form in desktop- Specified by:
openForm
in interfaceIDesktop
- Overrides:
openForm
in classTabbedDesktop
- Returns:
- ADForm
-
openWorkflow
public void openWorkflow(int workflow_ID) Description copied from interface:IDesktop
Open workflow window in desktop- Specified by:
openWorkflow
in interfaceIDesktop
- Overrides:
openWorkflow
in classTabbedDesktop
-
openTask
public void openTask(int taskId) Description copied from interface:IDesktop
Open operating system task window- Specified by:
openTask
in interfaceIDesktop
- Overrides:
openTask
in classTabbedDesktop
-
isPendingWindow
public boolean isPendingWindow()Description copied from interface:IDesktop
Is pending changes to be saved- Specified by:
isPendingWindow
in interfaceIDesktop
- 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 interfaceIDesktop
- Specified by:
onMenuSelected
in interfaceMenuListener
- Overrides:
onMenuSelected
in classAbstractDesktop
- Parameters:
menuId
- Identifier for the selected menu item
-
getMenuID
protected int getMenuID()- Returns:
- Menu tree ID for login role
-
setClientInfo
Description copied from interface:IDesktop
Set client (browser) info- Specified by:
setClientInfo
in interfaceIDesktop
- Overrides:
setClientInfo
in classAbstractDesktop
-