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 implementISupportMask
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
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.Component
getMaskComponent()
return self if is a component or return component it manage ifAbstractUIPart
is implement this interface, returnUIPart.getComponent()
Mask
getMaskObj()
return cache object or make new object and returnstatic boolean
hasFlagShowMask(org.zkoss.zk.ui.Component comp)
check flagISupportMask.READY_SHOW_MASK_FLAG
ready in scope Component.REQUEST_SCOPEvoid
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_FLAG
at scopeComponent.REQUEST_SCOPE
in attribute by callLayoutUtils
if exists flag, don't hidden maskstatic 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 callComponent.setAttribute(String, Object, int)
with key isISupportMask.READY_SHOW_MASK_FLAG
value is Integer(1) and scope isComponent.REQUEST_SCOPE
by 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_FLAG
value is Integer(1) and scope isComponent.REQUEST_SCOPE
by callLayoutUtils
- Specified by:
showMask
in 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_FLAG
at scopeComponent.REQUEST_SCOPE
in attribute by callLayoutUtils
if exists flag, don't hidden mask- Specified by:
hideMask
in interfaceISupportMask
-
getMaskObj
public Mask getMaskObj()
return cache object or make new object and return return newMask
when mask is not yet create- Specified by:
getMaskObj
in interfaceISupportMask
- Returns:
-
getMaskComponent
public org.zkoss.zk.ui.Component getMaskComponent()
return self if is a component or return component it manage ifAbstractUIPart
is implement this interface, returnUIPart.getComponent()
- Specified by:
getMaskComponent
in interfaceISupportMask
- Returns:
-
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
ready in scope Component.REQUEST_SCOPE- Parameters:
comp
-- Returns:
-
-