Package org.adempiere.webui
Class ShowMaskWrapper
- java.lang.Object
-
- org.adempiere.webui.ShowMaskWrapper
-
- All Implemented Interfaces:
ISupportMask
public class ShowMaskWrapper extends Object implements ISupportMask
Helper class for any component want implementISupportMaskJust 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
Constructors Constructor Description ShowMaskWrapper(UIPart uiPart)this mask will show over component fromUIPart.getComponent()ShowMaskWrapper(org.zkoss.zk.ui.Component comp)comp is component want implement this interface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.zkoss.zk.ui.ComponentgetMaskComponent()return self if is a component or return component it manage ifAbstractUIPartis implement this interface, returnUIPart.getComponent()MaskgetMaskObj()return cache object or make new object and returnstatic booleanhasFlagShowMask(org.zkoss.zk.ui.Component comp)check flagISupportMask.READY_SHOW_MASK_FLAGready in scope Component.REQUEST_SCOPEvoidhideMask()Hide mask. at code call showMask will hand reference to this object. and call this function in handle close event of window when override, remember check exists of keyISupportMask.READY_SHOW_MASK_FLAGat scopeComponent.REQUEST_SCOPEin attribute by callLayoutUtilsif exists flag, don't hidden maskstatic voidsetFlagShowMask(org.zkoss.zk.ui.Component comp)Set flagISupportMask.READY_SHOW_MASK_FLAGto Component.REQUEST_SCOPEvoidshowMask()show mask over this component when override, remember callComponent.setAttribute(String, Object, int)with key isISupportMask.READY_SHOW_MASK_FLAGvalue is Integer(1) and scope isComponent.REQUEST_SCOPEby callLayoutUtils
-
-
-
Constructor Detail
-
ShowMaskWrapper
public ShowMaskWrapper(org.zkoss.zk.ui.Component comp)
comp is component want implement this interface- Parameters:
comp-
-
ShowMaskWrapper
public ShowMaskWrapper(UIPart uiPart)
this mask will show over component fromUIPart.getComponent()- Parameters:
uiPart-
-
-
Method Detail
-
showMask
public void showMask()
show mask over this component when override, remember callComponent.setAttribute(String, Object, int)with key isISupportMask.READY_SHOW_MASK_FLAGvalue is Integer(1) and scope isComponent.REQUEST_SCOPEby callLayoutUtils- Specified by:
showMaskin interfaceISupportMask
-
hideMask
public void hideMask()
Hide mask. at code call showMask will hand reference to this object. and call this function in handle close event of window when override, remember check exists of keyISupportMask.READY_SHOW_MASK_FLAGat scopeComponent.REQUEST_SCOPEin attribute by callLayoutUtilsif exists flag, don't hidden mask- Specified by:
hideMaskin interfaceISupportMask
-
getMaskObj
public Mask getMaskObj()
return cache object or make new object and return return newMaskwhen mask is not yet create- Specified by:
getMaskObjin interfaceISupportMask- Returns:
-
getMaskComponent
public org.zkoss.zk.ui.Component getMaskComponent()
return self if is a component or return component it manage ifAbstractUIPartis implement this interface, returnUIPart.getComponent()- Specified by:
getMaskComponentin interfaceISupportMask- Returns:
-
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_FLAGready in scope Component.REQUEST_SCOPE- Parameters:
comp-- Returns:
-
-