Package org.adempiere.webui.desktop
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
Abstract base class for
IDesktop implementation- Author:
- hengsin
-
Field Summary
Fields inherited from class org.adempiere.webui.part.AbstractUIPart
page, showMaskWrapperFields inherited from interface org.adempiere.webui.desktop.IDesktop
ACTIVITIES_EVENT_QUEUE, ON_ACTIVITIES_CHANGED_EVENT, ON_CLOSE_WINDOW_SHORTCUT_EVENT, WINDOWNO_ATTRIBUTEFields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindWindow(int WindowNo) Find window by registered window numberintfindWindowNo(org.zkoss.zk.ui.Component component) Find registered window no via component treeGet client (browser) infoprotected StringbooleanIs closing tab with ESC shortcut key allowedprotected booleanvoidonMenuSelected(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.voidonNewRecord(int menuId) Open AD window in new record mode.
Call by global search, application menu tree and favourite panel.intregisterWindow(Object win) Register new windowvoidsetClientInfo(ClientInfo clientInfo) Set client (browser) infovoidsetCloseTabWithShortcut(boolean isCloseTabWithShortcut) Set if closing tab with ESC shortcut key is allowedvoidsetMenuIsSOTrx(boolean isSOTrx) voidsetPredefinedContextVariables(String predefinedVariables) protected abstract voidshowEmbedded(Window win) ShowWindow.Mode.EMBEDDEDwindowprotected voidshowHighlighted(Window win, String position) ShowWindow.Mode.HIGHLIGHTEDwindowprotected voidShow modal window.protected voidshowOverlapped(Window win, String position) ShowWindow.Mode.OVERLAPPEDwindowprotected voidShowWindow.Mode.POPUPwindowvoidshowWindow(Window win) Delegate toshowWindow(Window, String)voidshowWindow(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, useLayoutUtils.openOverlappedWindow(org.zkoss.zk.ui.Component, org.zkoss.zul.Window, String).voidunregisterWindow(int WindowNo) Remove from registered window list and clear environment contextprotected voidupdateRecentMenuItem(int menuId) Perform asynchronous update of recent menu items preference for userMethods inherited from class org.adempiere.webui.part.AbstractUIPart
createPart, doCreatePart, getMaskComponent, getMaskObj, hideMask, showMaskMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.adempiere.webui.desktop.IDesktop
closeActiveWindow, closeWindow, getActiveWindow, getComponent, isPendingWindow, logout, logout, openForm, openInfo, openProcessDialog, openTask, openWindow, openWindow, openWorkflow, renderHomeTab, setPage, setTabTitle, showHTMLContent, showURL, showWindow, showZoomWindow, updateHelpContext, updateHelpContext, updateHelpQuickInfo, updateHelpQuickInfo, updateHelpTooltip, updateHelpTooltip, updateHelpTooltipMethods inherited from interface org.adempiere.webui.part.UIPart
createPart
-
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:
onMenuSelectedin interfaceIDesktop- 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:
onNewRecordin interfaceIDesktop- Parameters:
menuId-
-
updateRecentMenuItem
protected void updateRecentMenuItem(int menuId) Perform asynchronous update of recent menu items preference for user- Parameters:
menuId-
-
getClientInfo
Description copied from interface:IDesktopGet client (browser) info- Specified by:
getClientInfoin interfaceIDesktop- Returns:
ClientInfo
-
setClientInfo
Description copied from interface:IDesktopSet client (browser) info- Specified by:
setClientInfoin interfaceIDesktop- Parameters:
clientInfo-
-
registerWindow
Description copied from interface:IDesktopRegister new window- Specified by:
registerWindowin interfaceIDesktop- Parameters:
win-- Returns:
- windowNo for new window
-
unregisterWindow
public void unregisterWindow(int WindowNo) Remove from registered window list and clear environment context- Specified by:
unregisterWindowin interfaceIDesktop- Parameters:
WindowNo-
-
findWindow
Find window by registered window number- Specified by:
findWindowin interfaceIDesktop- Parameters:
WindowNo-- Returns:
- Object
-
findWindowNo
public int findWindowNo(org.zkoss.zk.ui.Component component) Description copied from interface:IDesktopFind registered window no via component tree- Specified by:
findWindowNoin interfaceIDesktop- Returns:
- register window no or -1 if not found
-
showWindow
Delegate toshowWindow(Window, String)- Specified by:
showWindowin interfaceIDesktop- Parameters:
win-
-
showWindow
When width of win set by stylesheet (css class or in style) win sometime don't position in center.
To workaround that, useLayoutUtils.openOverlappedWindow(org.zkoss.zk.ui.Component, org.zkoss.zul.Window, String).- Specified by:
showWindowin interfaceIDesktop- Parameters:
win- Windowpos- seeWindow.setPosition(String)
-
showEmbedded
ShowWindow.Mode.EMBEDDEDwindow- Parameters:
win-
-
showModal
Show modal window.- Parameters:
win-
-
showPopup
ShowWindow.Mode.POPUPwindow- Parameters:
win- Windowposition- seeWindow.setPosition(String)
-
showOverlapped
ShowWindow.Mode.OVERLAPPEDwindow- Parameters:
win- Windowposition- seeWindow.setPosition(String)
-
showHighlighted
ShowWindow.Mode.HIGHLIGHTEDwindow- Parameters:
win- Windowposition- seeWindow.setPosition(String)
-
getWindows
- Returns:
- List of registered windows
-
setPredefinedContextVariables
- Parameters:
predefinedVariables-
-
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:IDesktopIs closing tab with ESC shortcut key allowed- Specified by:
isCloseTabWithShortcutin interfaceIDesktop- Returns:
- true if allowed
-
setCloseTabWithShortcut
public void setCloseTabWithShortcut(boolean isCloseTabWithShortcut) Description copied from interface:IDesktopSet if closing tab with ESC shortcut key is allowed- Specified by:
setCloseTabWithShortcutin interfaceIDesktop
-