Package org.adempiere.webui.part
Class AbstractUIPart
java.lang.Object
org.adempiere.webui.part.AbstractUIPart
- All Implemented Interfaces:
ISupportMask
,UIPart
- Direct Known Subclasses:
AbstractADTabbox
,AbstractADWindowContent
,AbstractDesktop
,ADWindow
,MultiTabPart
,WindowContainer
,WLogin
Abstract base class for UI block controller
- Author:
- Low Heng Sin
-
Field Summary
Fields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.zkoss.zk.ui.Component
createPart
(Object parent) Create UI block hosted by parentprotected abstract org.zkoss.zk.ui.Component
doCreatePart
(org.zkoss.zk.ui.Component parent) Sub class override this to create root UI block or child UI blockorg.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.void
hideMask()
Hide mask.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
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.adempiere.webui.part.UIPart
getComponent
-
Field Details
-
page
protected org.zkoss.zk.ui.Page page -
showMaskWrapper
-
-
Constructor Details
-
AbstractUIPart
public AbstractUIPart()
-
-
Method Details
-
createPart
Create UI block hosted by parent- Specified by:
createPart
in interfaceUIPart
- Parameters:
parent
- Component or Page- Returns:
- Component
-
doCreatePart
protected abstract org.zkoss.zk.ui.Component doCreatePart(org.zkoss.zk.ui.Component parent) Sub class override this to create root UI block or child UI block- Parameters:
parent
- parent Component or null for root UI block- Returns:
- Component
-
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.- 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()
. knowIssue: becauseIDesktop.getComponent()
returnBorderLayout
, don't append window to child list of it, in this case we must get parent of BorderLayout- Specified by:
getMaskComponent
in interfaceISupportMask
- Returns:
Component
-