Package org.adempiere.webui.adwindow
Class ADWindowToolbar
java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Toolbar
org.adempiere.webui.component.ToolBar
org.adempiere.webui.adwindow.ADWindowToolbar
- All Implemented Interfaces:
Serializable
,Cloneable
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
,org.zkoss.zk.ui.ext.Scope
,org.zkoss.zk.ui.sys.ComponentCtrl
public class ADWindowToolbar
extends ToolBar
implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
Toolbar of AD_Window
- Author:
- Ashley G Ramdass, Cristina Ghita, www.arhipac.ro
- FR [ 2076330 ] Add new methods in CWindowToolbar class
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Prefix for Button Nameboolean
Show Personal Lockstatic final String
Deprecated, for removal: This API element is subject to removal in a future version.static final int
VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A)static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
-
Constructor Summary
ConstructorDescriptiondefault constructorADWindowToolbar
(AbstractADWindowContent windowContent, int windowNo) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(ToolbarListener toolbarListener) Add ToolbarListenerprotected void
Add separator/spacer between buttonvoid
Dynamic update of each toolbar button state (Check restrictions).
For custom button, callToolbarCustomButton.dynamicDisplay()
, process pressedLogic and readOnlyLogic.void
enableActiveWorkflows
(boolean enabled) Enable/disable Active Workflows buttonvoid
enableArchive
(boolean enabled) Enable/disable Archive buttonvoid
enableAttachment
(boolean enabled) Enable/disable Attachment buttonvoid
enableChat
(boolean enabled) Enable/disable Chat buttonvoid
enableCopy
(boolean enabled) Enable/disable Copy/Duplicate buttonvoid
enableCSVImport
(boolean b) Enable/disable CSV Import buttonvoid
enableCustomize
(boolean enabled) Enable/disable Customize Grid buttonvoid
enableDelete
(boolean enabled) Enable/disable Delete buttonvoid
enableExport
(boolean b) Enable/disable Export buttonvoid
enableFileImport
(boolean b) Enable/disable File Import buttonvoid
enableFind
(boolean enabled) Enable/disable Find/Query buttonvoid
enableGridToggle
(boolean enabled) Enable/disable Toggle buttonvoid
enableIgnore
(boolean enabled) Enable/disable Ignore/Undo buttonvoid
enableLabel
(boolean enabled) Enable/disable Label record buttonvoid
enableNew
(boolean enabled) Enable/disable New buttonvoid
enablePostIt
(boolean enabled) Enable/disable Post It Note buttonvoid
enablePrint
(boolean enabled) Enable/disable Print buttonvoid
enableProcessButton
(boolean b) Enable/disable Process buttonvoid
enableQuickForm
(boolean enabled) Enable/disable Quick Form buttonvoid
enableRefresh
(boolean enabled) Enable/disable Refresh buttonvoid
enableReport
(boolean enabled) Enable/disable Report buttonvoid
enableRequests
(boolean enabled) Enable/disable Requests buttonvoid
enableSave
(boolean enabled) Enable/disable Save buttonvoid
enableTabNavigation
(boolean enabled) Enable/disable buttons for navigation between parent and detail tabvoid
enableTabNavigation
(boolean enableParent, boolean enableDetail) Enable/disable buttons for navigation between parent and detail tabvoid
enableZoomAcross
(boolean enabled) Enable/disable Zoom Across buttonint
Get ToolBarButton by nameorg.zkoss.zk.ui.event.Event
getEvent()
Get source eventint
Get parent tab level for quick formorg.zkoss.zul.impl.LabelImageElement
getToolbarItem
(String name) Get ToolBarButton by nameprotected boolean
hasWorkflow
(GridTab gridTab) btnActiveWorkflow should be disabled when table has no workflow definedboolean
Set selected user query to first default user query (if any)boolean
Is delete button enableboolean
Is create new record button enableboolean
Is save button enablevoid
lock
(boolean locked) Turn on/off Lock button (Pressed=On, Not Pressed=Off)void
onEvent
(org.zkoss.zk.ui.event.Event event) void
onPageAttached
(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage) void
onPageDetached
(org.zkoss.zk.ui.Page page) void
Post after size event handler for mobile client.
Calculate which toolbar buttons should overflow to show more popup.void
refreshUserQuery
(int AD_Tab_ID, int AD_UserQuery_ID) Reload user queries and set selected item to AD_UserQuery_IDvoid
removeListener
(ToolbarListener toolbarListener) Remove ToolbarListenervoid
setPressed
(String buttonName, boolean pressed) Set button to pressed/not pressed statevoid
setQuickFormTabHrchyLevel
(int quickFormHrchyTabLevel) Set parent tab level for quick formvoid
setSelectedUserQuery
(int AD_UserQuery_ID) Set selected user queryvoid
setSelectedUserQuery
(MUserQuery selectedUserQuery) Set selected user queryvoid
setVisible
(String buttonName, boolean visible) void
setVisibleAll
(boolean visible) Make all toolbar buttons visiblevoid
setWindowNo
(int windowNo) void
Initialise the accessibility state of toolbar buttonsMethods inherited from class org.zkoss.zul.Toolbar
getAlign, getOrient, getOverflowPopupIconSclass, getZclass, isOverflowPopup, renderProperties, setAlign, setOrient, setOverflowPopup, setOverflowPopupIconSclass
Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Field Details
-
BTNPREFIX
Prefix for Button Name- See Also:
-
MNITMPREFIX
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
isPersonalLock
public boolean isPersonalLockShow Personal Lock -
VK_A
public static final int VK_AVK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A)- See Also:
-
VK_B
public static final int VK_B- See Also:
-
VK_C
public static final int VK_C- See Also:
-
VK_D
public static final int VK_D- See Also:
-
VK_E
public static final int VK_E- See Also:
-
VK_F
public static final int VK_F- See Also:
-
VK_G
public static final int VK_G- See Also:
-
VK_H
public static final int VK_H- See Also:
-
VK_I
public static final int VK_I- See Also:
-
VK_J
public static final int VK_J- See Also:
-
VK_K
public static final int VK_K- See Also:
-
VK_L
public static final int VK_L- See Also:
-
VK_M
public static final int VK_M- See Also:
-
VK_N
public static final int VK_N- See Also:
-
VK_O
public static final int VK_O- See Also:
-
VK_P
public static final int VK_P- See Also:
-
VK_Q
public static final int VK_Q- See Also:
-
VK_R
public static final int VK_R- See Also:
-
VK_S
public static final int VK_S- See Also:
-
VK_T
public static final int VK_T- See Also:
-
VK_U
public static final int VK_U- See Also:
-
VK_V
public static final int VK_V- See Also:
-
VK_W
public static final int VK_W- See Also:
-
VK_X
public static final int VK_X- See Also:
-
VK_Y
public static final int VK_Y- See Also:
-
VK_Z
public static final int VK_Z- See Also:
-
-
Constructor Details
-
ADWindowToolbar
public ADWindowToolbar()default constructor -
ADWindowToolbar
- Parameters:
windowContent
-windowNo
-
-
-
Method Details
-
getButton
Get ToolBarButton by name- Parameters:
name
-- Returns:
ToolBarButton
or null
-
getToolbarItem
Get ToolBarButton by name- Parameters:
name
-- Returns:
LabelImageElement
or null
-
addSeparator
protected void addSeparator()Add separator/spacer between button -
addListener
Add ToolbarListener- Parameters:
toolbarListener
-
-
removeListener
Remove ToolbarListener- Parameters:
toolbarListener
-
-
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>
-
enableRefresh
public void enableRefresh(boolean enabled) Enable/disable Refresh button- Parameters:
enabled
-
-
enableSave
public void enableSave(boolean enabled) Enable/disable Save button- Parameters:
enabled
-
-
isSaveEnable
public boolean isSaveEnable()Is save button enable- Returns:
- true if Save button is enable
-
enableDelete
public void enableDelete(boolean enabled) Enable/disable Delete button- Parameters:
enabled
-
-
isDeleteEnable
public boolean isDeleteEnable()Is delete button enable- Returns:
- true if Delete button is enable
-
isNewEnabled
public boolean isNewEnabled()Is create new record button enable- Returns:
- true if New button is enable
-
enableIgnore
public void enableIgnore(boolean enabled) Enable/disable Ignore/Undo button- Parameters:
enabled
-
-
enableNew
public void enableNew(boolean enabled) Enable/disable New button- Parameters:
enabled
-
-
enableCopy
public void enableCopy(boolean enabled) Enable/disable Copy/Duplicate button- Parameters:
enabled
-
-
enableAttachment
public void enableAttachment(boolean enabled) Enable/disable Attachment button- Parameters:
enabled
-
-
enableChat
public void enableChat(boolean enabled) Enable/disable Chat button- Parameters:
enabled
-
-
enablePrint
public void enablePrint(boolean enabled) Enable/disable Print button- Parameters:
enabled
-
-
enableReport
public void enableReport(boolean enabled) Enable/disable Report button- Parameters:
enabled
-
-
enableFind
public void enableFind(boolean enabled) Enable/disable Find/Query button- Parameters:
enabled
-
-
enableGridToggle
public void enableGridToggle(boolean enabled) Enable/disable Toggle button- Parameters:
enabled
-
-
enableCustomize
public void enableCustomize(boolean enabled) Enable/disable Customize Grid button- Parameters:
enabled
-
-
enableArchive
public void enableArchive(boolean enabled) Enable/disable Archive button- Parameters:
enabled
-
-
enableZoomAcross
public void enableZoomAcross(boolean enabled) Enable/disable Zoom Across button- Parameters:
enabled
-
-
enableActiveWorkflows
public void enableActiveWorkflows(boolean enabled) Enable/disable Active Workflows button- Parameters:
enabled
-
-
enableRequests
public void enableRequests(boolean enabled) Enable/disable Requests button- Parameters:
enabled
-
-
enableQuickForm
public void enableQuickForm(boolean enabled) Enable/disable Quick Form button- Parameters:
enabled
-
-
lock
public void lock(boolean locked) Turn on/off Lock button (Pressed=On, Not Pressed=Off)- Parameters:
locked
-
-
enablePostIt
public void enablePostIt(boolean enabled) Enable/disable Post It Note button- Parameters:
enabled
-
-
enableLabel
public void enableLabel(boolean enabled) Enable/disable Label record button- Parameters:
enabled
-
-
getEvent
public org.zkoss.zk.ui.event.Event getEvent()Get source event- Returns:
- ON_Click event that's being handle
-
setVisibleAll
public void setVisibleAll(boolean visible) Make all toolbar buttons visible- Parameters:
visible
-
-
setVisible
- Parameters:
buttonName
-visible
-
-
setWindowNo
public void setWindowNo(int windowNo) - Parameters:
windowNo
-
-
enableExport
public void enableExport(boolean b) Enable/disable Export button- Parameters:
b
-
-
enableFileImport
public void enableFileImport(boolean b) Enable/disable File Import button- Parameters:
b
-
-
enableCSVImport
public void enableCSVImport(boolean b) Enable/disable CSV Import button- Parameters:
b
-
-
updateToolbarAccess
public void updateToolbarAccess()Initialise the accessibility state of toolbar buttons -
hasWorkflow
btnActiveWorkflow should be disabled when table has no workflow defined- Parameters:
gridTab
-- Returns:
- true if has workflow define for gridTab
-
enableProcessButton
public void enableProcessButton(boolean b) Enable/disable Process button- Parameters:
b
- boolean
-
dynamicDisplay
public void dynamicDisplay()Dynamic update of each toolbar button state (Check restrictions).
For custom button, callToolbarCustomButton.dynamicDisplay()
, process pressedLogic and readOnlyLogic. -
onPageDetached
public void onPageDetached(org.zkoss.zk.ui.Page page) - Specified by:
onPageDetached
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
onPageDetached
in classorg.zkoss.zk.ui.AbstractComponent
-
onPageAttached
public void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage) - Specified by:
onPageAttached
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
onPageAttached
in classorg.zkoss.zk.ui.AbstractComponent
-
onPostAfterSize
public void onPostAfterSize()Post after size event handler for mobile client.
Calculate which toolbar buttons should overflow to show more popup. -
setPressed
Set button to pressed/not pressed state- Parameters:
buttonName
-pressed
-
-
getQuickFormTabHrchyLevel
public int getQuickFormTabHrchyLevel()Get parent tab level for quick form- Returns:
- parent tab level for quick form
-
setQuickFormTabHrchyLevel
public void setQuickFormTabHrchyLevel(int quickFormHrchyTabLevel) Set parent tab level for quick form- Parameters:
quickFormHrchyTabLevel
-
-
refreshUserQuery
public void refreshUserQuery(int AD_Tab_ID, int AD_UserQuery_ID) Reload user queries and set selected item to AD_UserQuery_ID- Parameters:
AD_Tab_ID
-AD_UserQuery_ID
-
-
setSelectedUserQuery
public void setSelectedUserQuery(int AD_UserQuery_ID) Set selected user query- Parameters:
AD_UserQuery_ID
-
-
setSelectedUserQuery
Set selected user query- Parameters:
selectedUserQuery
-
-
getAD_UserQuery_ID
public int getAD_UserQuery_ID()- Returns:
- AD_UserQuery_ID of selected user query
-
initDefaultQuery
public boolean initDefaultQuery()Set selected user query to first default user query (if any)- Returns:
- true if there's a default user query
-