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.- Version:
- $Revision: 0.10 $
- 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
void
logout()
User logout from desktop, do clean upvoid
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) void
openInfo
(int infoId) openProcessDialog
(int processId, boolean soTrx) void
openTask
(int taskId) Open operating system task windowvoid
openWorkflow
(int workflow_ID) protected 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) void
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
updateHelpTooltip
(String hdr, String desc, String help, String otherContent) 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, 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.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
-
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
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
- Specified by:
openProcessDialog
in interfaceIDesktop
- Overrides:
openProcessDialog
in classTabbedDesktop
- Returns:
- ProcessDialog
-
openForm
- Specified by:
openForm
in interfaceIDesktop
- Overrides:
openForm
in classTabbedDesktop
- Returns:
- ADForm
-
openInfo
public void openInfo(int infoId) - Specified by:
openInfo
in interfaceIDesktop
- Overrides:
openInfo
in classTabbedDesktop
-
openWorkflow
public void openWorkflow(int workflow_ID) - 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()- 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
- Specified by:
setClientInfo
in interfaceIDesktop
- Overrides:
setClientInfo
in classAbstractDesktop
-