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
ConstructorsConstructorDescriptionShowMaskWrapper(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.ComponentReturn self if is a component or return component it manage.
AbstractUIPartsubclasses that implement this interface should returnUIPart.getComponent().Return cache Mask or create new Mask and return.static booleanhasFlagShowMask(org.zkoss.zk.ui.Component comp) check flagISupportMask.READY_SHOW_MASK_FLAGexists in scope Component.REQUEST_SCOPEvoidhideMask()Hide mask.static voidsetFlagShowMask(org.zkoss.zk.ui.Component comp) Set flagISupportMask.READY_SHOW_MASK_FLAGto Component.REQUEST_SCOPEvoidshowMask()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:
showMaskin 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_FLAGat scopeComponent.REQUEST_SCOPEin attribute. If flag exists, don't hide mask.
Call byLayoutUtils.- Specified by:
hideMaskin interfaceISupportMask
-
getMaskObj
Return cache Mask or create new Mask and return. return newMaskwhen mask is not yet create- Specified by:
getMaskObjin interfaceISupportMask- Returns:
Mask
-
getMaskComponent
public org.zkoss.zk.ui.Component getMaskComponent()Return self if is a component or return component it manage.
AbstractUIPartsubclasses that implement this interface should returnUIPart.getComponent().- Specified by:
getMaskComponentin interfaceISupportMask- Returns:
Component
-
setFlagShowMask
public static void setFlagShowMask(org.zkoss.zk.ui.Component comp) Set flagISupportMask.READY_SHOW_MASK_FLAGto Component.REQUEST_SCOPE- Parameters:
comp-
-
hasFlagShowMask
public static boolean hasFlagShowMask(org.zkoss.zk.ui.Component comp) check flagISupportMask.READY_SHOW_MASK_FLAGexists in scope Component.REQUEST_SCOPE- Parameters:
comp-- Returns:
- true if flag exists
-