Package org.adempiere.webui
Class ShowMaskWrapper
java.lang.Object
org.adempiere.webui.ShowMaskWrapper
- All Implemented Interfaces:
ISupportMask
Helper class for
ISupportMask
implementation.
Just make a instance of this class and let it do everything.- Author:
- hieplq
-
Field Summary
Fields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG
-
Constructor Summary
ConstructorDescriptionShowMaskWrapper
(UIPart uiPart) this mask will show over component fromUIPart.getComponent()
ShowMaskWrapper
(org.zkoss.zk.ui.Component comp) comp is component that implement ISupportMask -
Method Summary
Modifier and TypeMethodDescriptionorg.zkoss.zk.ui.Component
Return self if is a component or return component it manage.
AbstractUIPart
subclasses that implement this interface should returnUIPart.getComponent()
.Return cache Mask or create new Mask and return.static boolean
hasFlagShowMask
(org.zkoss.zk.ui.Component comp) check flagISupportMask.READY_SHOW_MASK_FLAG
exists in scope Component.REQUEST_SCOPEvoid
hideMask()
Hide mask.static void
setFlagShowMask
(org.zkoss.zk.ui.Component comp) Set flagISupportMask.READY_SHOW_MASK_FLAG
to Component.REQUEST_SCOPEvoid
showMask()
Show mask over this component.
When override, remember to callComponent.setAttribute(String, Object, int)
with nameISupportMask.READY_SHOW_MASK_FLAG
, value Integer(1) and scopeComponent.REQUEST_SCOPE
.
Call byLayoutUtils
.
-
Constructor Details
-
ShowMaskWrapper
public ShowMaskWrapper(org.zkoss.zk.ui.Component comp) comp is component that implement ISupportMask- Parameters:
comp
-
-
ShowMaskWrapper
this mask will show over component fromUIPart.getComponent()
- Parameters:
uiPart
-
-
-
Method Details
-
showMask
public void showMask()Show mask over this component.
When override, remember to callComponent.setAttribute(String, Object, int)
with nameISupportMask.READY_SHOW_MASK_FLAG
, value Integer(1) and scopeComponent.REQUEST_SCOPE
.
Call byLayoutUtils
.- Specified by:
showMask
in interfaceISupportMask
-
hideMask
public void hideMask()Hide mask. With ISupportMask return from showMask, call this function in handle close event of window.
When override, remember check exists of keyISupportMask.READY_SHOW_MASK_FLAG
at scopeComponent.REQUEST_SCOPE
in attribute. If flag exists, don't hide mask.
Call byLayoutUtils
.- Specified by:
hideMask
in interfaceISupportMask
-
getMaskObj
Return cache Mask or create new Mask and return. return newMask
when mask is not yet create- Specified by:
getMaskObj
in interfaceISupportMask
- Returns:
Mask
-
getMaskComponent
public org.zkoss.zk.ui.Component getMaskComponent()Return self if is a component or return component it manage.
AbstractUIPart
subclasses that implement this interface should returnUIPart.getComponent()
.- Specified by:
getMaskComponent
in interfaceISupportMask
- Returns:
Component
-
setFlagShowMask
public static void setFlagShowMask(org.zkoss.zk.ui.Component comp) Set flagISupportMask.READY_SHOW_MASK_FLAG
to Component.REQUEST_SCOPE- Parameters:
comp
-
-
hasFlagShowMask
public static boolean hasFlagShowMask(org.zkoss.zk.ui.Component comp) check flagISupportMask.READY_SHOW_MASK_FLAG
exists in scope Component.REQUEST_SCOPE- Parameters:
comp
-- Returns:
- true if flag exists
-