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, 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 TypeMethodDescriptionfindWindow
(int WindowNo) Find window by registered window numberint
findWindowNo
(org.zkoss.zk.ui.Component component) Find registered window no via component treeGet client (browser) infoprotected String
boolean
Is closing tab with ESC shortcut key allowedprotected boolean
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.void
onNewRecord
(int menuId) Open AD window in new record mode.
Call by global search, application menu tree and favourite panel.int
registerWindow
(Object win) Register new windowvoid
setClientInfo
(ClientInfo clientInfo) Set client (browser) infovoid
setCloseTabWithShortcut
(boolean isCloseTabWithShortcut) Set if closing tab with ESC shortcut key is allowedvoid
setMenuIsSOTrx
(boolean isSOTrx) void
setPredefinedContextVariables
(String predefinedVariables) protected abstract void
showEmbedded
(Window win) ShowWindow.Mode.EMBEDDED
windowprotected void
showHighlighted
(Window win, String position) ShowWindow.Mode.HIGHLIGHTED
windowprotected void
Show modal window.protected void
showOverlapped
(Window win, String position) ShowWindow.Mode.OVERLAPPED
windowprotected void
ShowWindow.Mode.POPUP
windowvoid
showWindow
(Window win) Delegate toshowWindow(Window, String)
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, useLayoutUtils.openOverlappedWindow(org.zkoss.zk.ui.Component, org.zkoss.zul.Window, String)
.void
unregisterWindow
(int WindowNo) Remove from registered window list and clear environment contextprotected void
updateRecentMenuItem
(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, 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
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
Methods 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:
onMenuSelected
in 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:
onNewRecord
in 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:IDesktop
Get client (browser) info- Specified by:
getClientInfo
in interfaceIDesktop
- Returns:
ClientInfo
-
setClientInfo
Description copied from interface:IDesktop
Set client (browser) info- Specified by:
setClientInfo
in interfaceIDesktop
- Parameters:
clientInfo
-
-
registerWindow
Description copied from interface:IDesktop
Register new window- Specified by:
registerWindow
in 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:
unregisterWindow
in interfaceIDesktop
- Parameters:
WindowNo
-
-
findWindow
Find window by registered window number- Specified by:
findWindow
in interfaceIDesktop
- 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 interfaceIDesktop
- Returns:
- register window no or -1 if not found
-
showWindow
Delegate toshowWindow(Window, String)
- Specified by:
showWindow
in 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:
showWindow
in interfaceIDesktop
- Parameters:
win
- Windowpos
- seeWindow.setPosition(String)
-
showEmbedded
ShowWindow.Mode.EMBEDDED
window- Parameters:
win
-
-
showModal
Show modal window.- Parameters:
win
-
-
showPopup
ShowWindow.Mode.POPUP
window- Parameters:
win
- Windowposition
- seeWindow.setPosition(String)
-
showOverlapped
ShowWindow.Mode.OVERLAPPED
window- Parameters:
win
- Windowposition
- seeWindow.setPosition(String)
-
showHighlighted
ShowWindow.Mode.HIGHLIGHTED
window- 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:IDesktop
Is closing tab with ESC shortcut key allowed- Specified by:
isCloseTabWithShortcut
in interfaceIDesktop
- 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 interfaceIDesktop
-