Package com.hybris.cockpitng.util
Class CockpitComponentCleanup
- java.lang.Object
-
- com.hybris.cockpitng.util.CockpitComponentCleanup
-
- All Implemented Interfaces:
org.zkoss.zk.ui.util.DesktopCleanup,org.zkoss.zk.ui.util.UiLifeCycle
public class CockpitComponentCleanup extends java.lang.Object implements org.zkoss.zk.ui.util.UiLifeCycle, org.zkoss.zk.ui.util.DesktopCleanupCallsCleanable.cleanup()for each component detached. CallsInitializable.initialize()for each component attached.
-
-
Constructor Summary
Constructors Constructor Description CockpitComponentCleanup()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterComponentAttached(org.zkoss.zk.ui.Component component, org.zkoss.zk.ui.Page page)voidafterComponentDetached(org.zkoss.zk.ui.Component component, org.zkoss.zk.ui.Page page)voidafterComponentMoved(org.zkoss.zk.ui.Component component, org.zkoss.zk.ui.Component component1, org.zkoss.zk.ui.Component component2)voidafterPageAttached(org.zkoss.zk.ui.Page page, org.zkoss.zk.ui.Desktop desktop)voidafterPageDetached(org.zkoss.zk.ui.Page page, org.zkoss.zk.ui.Desktop desktop)voidafterShadowAttached(org.zkoss.zk.ui.ShadowElement shadowElement, org.zkoss.zk.ui.Component component)voidafterShadowDetached(org.zkoss.zk.ui.ShadowElement shadowElement, org.zkoss.zk.ui.Component component)static voidcleanup(org.zkoss.zk.ui.Component component)CallsCleanable.cleanup()for provided component and allCleanableregistered for it.static voidcleanup(org.zkoss.zk.ui.Component component, boolean nested)CallsCleanable.cleanup()for provided component and allCleanableregistered for it.voidcleanup(org.zkoss.zk.ui.Desktop desktop)static voidinitialize(org.zkoss.zk.ui.Component component)CallsInitializable.initialize()for provided component and allInitializableregistered for it.static voidinitialize(org.zkoss.zk.ui.Component component, boolean nested)CallsInitializable.initialize()for provided component and allInitializableregistered for it.static voidregisterCleanable(org.zkoss.zk.ui.Component component, Cleanable cleanup)Registers a cleanup that should be performed after specified component is detached.static voidregisterInitializable(org.zkoss.zk.ui.Component component, Initializable initialize)Registers a initialize that should be performed before specified component is displayed.static voidunregisterCleanable(org.zkoss.zk.ui.Component component, Cleanable cleanup)Unregisters a cleanup that should not be performed after specified component is detached.
-
-
-
Method Detail
-
registerCleanable
public static void registerCleanable(org.zkoss.zk.ui.Component component, Cleanable cleanup)Registers a cleanup that should be performed after specified component is detached.Cleanup is a one-time event and all cleanups will get unregistered after component is detached. This means that, if component it to be attached and detached multiple times, then a a cleanup needs to be registered every time component is attached.
- Parameters:
component- triggering componentcleanup- cleanup to be performed
-
unregisterCleanable
public static void unregisterCleanable(org.zkoss.zk.ui.Component component, Cleanable cleanup)Unregisters a cleanup that should not be performed after specified component is detached.- Parameters:
component- triggering componentcleanup- cleanup to unregister
-
registerInitializable
public static void registerInitializable(org.zkoss.zk.ui.Component component, Initializable initialize)Registers a initialize that should be performed before specified component is displayed.Initialization is a one-time event and all setups will get unregistered after component is displayed. This means that, if component it to be attached and detached multiple times, then a initialize needs to be registered every time component is detached.
- Parameters:
component- triggering componentinitialize- cleanup to be performed
-
initialize
public static void initialize(org.zkoss.zk.ui.Component component)
CallsInitializable.initialize()for provided component and allInitializableregistered for it. Method is invoked for whole tree of components children.- Parameters:
component- component to be initialized
-
initialize
public static void initialize(org.zkoss.zk.ui.Component component, boolean nested)CallsInitializable.initialize()for provided component and allInitializableregistered for it. Method may be invoked for whole tree of components children, depending on value ofnested.- Parameters:
component- component to be initializednested- iffalsethen only provided component will be initialized, otherwise whole tree
-
cleanup
public static void cleanup(org.zkoss.zk.ui.Component component)
CallsCleanable.cleanup()for provided component and allCleanableregistered for it. Method is invoked for whole tree of components children.- Parameters:
component- component to be cleaned
-
cleanup
public static void cleanup(org.zkoss.zk.ui.Component component, boolean nested)CallsCleanable.cleanup()for provided component and allCleanableregistered for it. Method may be invoked for whole tree of components children, depending on value ofnested.- Parameters:
component- component to be cleanednested- iffalsethen only provided component will be cleaned, otherwise whole tree
-
afterShadowAttached
public void afterShadowAttached(org.zkoss.zk.ui.ShadowElement shadowElement, org.zkoss.zk.ui.Component component)- Specified by:
afterShadowAttachedin interfaceorg.zkoss.zk.ui.util.UiLifeCycle
-
afterShadowDetached
public void afterShadowDetached(org.zkoss.zk.ui.ShadowElement shadowElement, org.zkoss.zk.ui.Component component)- Specified by:
afterShadowDetachedin interfaceorg.zkoss.zk.ui.util.UiLifeCycle
-
afterComponentAttached
public void afterComponentAttached(org.zkoss.zk.ui.Component component, org.zkoss.zk.ui.Page page)- Specified by:
afterComponentAttachedin interfaceorg.zkoss.zk.ui.util.UiLifeCycle
-
afterComponentDetached
public void afterComponentDetached(org.zkoss.zk.ui.Component component, org.zkoss.zk.ui.Page page)- Specified by:
afterComponentDetachedin interfaceorg.zkoss.zk.ui.util.UiLifeCycle
-
afterComponentMoved
public void afterComponentMoved(org.zkoss.zk.ui.Component component, org.zkoss.zk.ui.Component component1, org.zkoss.zk.ui.Component component2)- Specified by:
afterComponentMovedin interfaceorg.zkoss.zk.ui.util.UiLifeCycle
-
afterPageAttached
public void afterPageAttached(org.zkoss.zk.ui.Page page, org.zkoss.zk.ui.Desktop desktop)- Specified by:
afterPageAttachedin interfaceorg.zkoss.zk.ui.util.UiLifeCycle
-
afterPageDetached
public void afterPageDetached(org.zkoss.zk.ui.Page page, org.zkoss.zk.ui.Desktop desktop)- Specified by:
afterPageDetachedin interfaceorg.zkoss.zk.ui.util.UiLifeCycle
-
cleanup
public void cleanup(org.zkoss.zk.ui.Desktop desktop) throws java.lang.Exception- Specified by:
cleanupin interfaceorg.zkoss.zk.ui.util.DesktopCleanup- Throws:
java.lang.Exception
-
-