Package com.hybris.cockpitng.util.impl
Class DefaultWidgetUtils
- java.lang.Object
-
- com.hybris.cockpitng.util.impl.DefaultWidgetUtils
-
- All Implemented Interfaces:
WidgetUtils
public class DefaultWidgetUtils extends java.lang.Object implements WidgetUtils
Default implementation forWidgetUtils. For internal use only.
-
-
Field Summary
-
Fields inherited from interface com.hybris.cockpitng.util.WidgetUtils
NOTIFIER_STACK
-
-
Constructor Summary
Constructors Constructor Description DefaultWidgetUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGlobalEventListener(java.lang.String eventName, Widgetslot widget, org.zkoss.zk.ui.event.EventListener eventListener, java.lang.String scope)Adds an event listener to the global event queue.org.zkoss.zk.ui.ComponentaddNotifierToStack(org.zkoss.zk.ui.Component content)org.zkoss.zk.ui.ComponentaddNotifierToStack(org.zkoss.zk.ui.Component content, org.zkoss.zk.ui.Component notifierStack)voidclearWidgetLibrary()voiddispatchGlobalEvents()Gets all unprocessed events from the global event queue and notifies subscribers.org.zkoss.zk.ui.ComponentgetCockpitRoot()Gets the root of the current desktop.protected java.util.Map<java.lang.String,Widgetslot>getDesktopWidgetslotMap()protected java.util.Set<Resettable>getElementsToReset()WidgetPersistenceServicegetModelBasedWidgetPersistenceService()WidgetslotgetRegisteredWidgetslot(WidgetInstance widgetInstance)Gets theWidgetslotcomponent for the givenWidgetInstance, if it has been registered for the currentDesktop.WidgetslotgetRegisteredWidgetslot(java.lang.String widgetInstanceId)Gets theWidgetslotcomponent for the given widgetInstanceId, if it has been registered for the currentDesktop.org.zkoss.zk.ui.ComponentgetRoot()Same asWidgetUtils.getCockpitRoot().protected CockpitSessionServicegetSessionService()protected WidgetPersistenceServicegetWidgetPersistenceService()protected WidgetServicegetWidgetService()XMLWidgetPersistenceServicegetXmlBasedWidgetPersistenceService()booleanisPartOfComposedWidget(Widget widget)Checks, if the given widget is has a group widget as ancestor.voidrefreshWidgetLibrary()voidregisterWidgetslot(Widgetslot widgetslot)Registers aWidgetslotat the currentDesktop.voidsetCockpitEventQueue(CockpitEventQueue cockpitEventQueue)voidsetElementsToReset(java.util.Set<Resettable> elementsToReset)voidsetModelBasedWidgetPersistenceService(WidgetPersistenceService modelBasedWidgetPersistenceService)voidsetSessionService(CockpitSessionService sessionService)voidsetWidgetDefinitionService(CockpitComponentDefinitionService widgetDefinitionService)voidsetWidgetPersistenceService(WidgetPersistenceService widgetPersistenceService)voidsetWidgetService(WidgetService widgetService)voidsetXmlBasedWidgetPersistenceService(XMLWidgetPersistenceService xmlBasedWidgetPersistenceService)
-
-
-
Method Detail
-
refreshWidgetLibrary
public void refreshWidgetLibrary()
- Specified by:
refreshWidgetLibraryin interfaceWidgetUtils
-
clearWidgetLibrary
public void clearWidgetLibrary()
- Specified by:
clearWidgetLibraryin interfaceWidgetUtils
-
addGlobalEventListener
public void addGlobalEventListener(java.lang.String eventName, Widgetslot widget, org.zkoss.zk.ui.event.EventListener eventListener, java.lang.String scope)Description copied from interface:WidgetUtilsAdds an event listener to the global event queue.- Specified by:
addGlobalEventListenerin interfaceWidgetUtils
-
dispatchGlobalEvents
public void dispatchGlobalEvents()
Description copied from interface:WidgetUtilsGets all unprocessed events from the global event queue and notifies subscribers.- Specified by:
dispatchGlobalEventsin interfaceWidgetUtils
-
addNotifierToStack
public org.zkoss.zk.ui.Component addNotifierToStack(org.zkoss.zk.ui.Component content)
- Specified by:
addNotifierToStackin interfaceWidgetUtils- Parameters:
content- content component of the notify entry.- Returns:
- returns a component that represents a notifier entry which will be created in the root notifier component. This component should be detached if not used anymore.
-
addNotifierToStack
public org.zkoss.zk.ui.Component addNotifierToStack(org.zkoss.zk.ui.Component content, org.zkoss.zk.ui.Component notifierStack)- Specified by:
addNotifierToStackin interfaceWidgetUtils- Parameters:
content- content component of the notify entrynotifierStack- All notifiers will be displayed in this component. If null, no notifier entries will be created at all.- Returns:
- returns a component that represents a notifier entry. This component should be detached if not used anymore.
-
getRegisteredWidgetslot
public Widgetslot getRegisteredWidgetslot(WidgetInstance widgetInstance)
Description copied from interface:WidgetUtilsGets theWidgetslotcomponent for the givenWidgetInstance, if it has been registered for the currentDesktop.- Specified by:
getRegisteredWidgetslotin interfaceWidgetUtils
-
getRegisteredWidgetslot
public Widgetslot getRegisteredWidgetslot(java.lang.String widgetInstanceId)
Description copied from interface:WidgetUtilsGets theWidgetslotcomponent for the given widgetInstanceId, if it has been registered for the currentDesktop.- Specified by:
getRegisteredWidgetslotin interfaceWidgetUtils
-
registerWidgetslot
public void registerWidgetslot(Widgetslot widgetslot)
Description copied from interface:WidgetUtilsRegisters aWidgetslotat the currentDesktop.- Specified by:
registerWidgetslotin interfaceWidgetUtils
-
getDesktopWidgetslotMap
protected java.util.Map<java.lang.String,Widgetslot> getDesktopWidgetslotMap()
-
getRoot
public org.zkoss.zk.ui.Component getRoot()
Description copied from interface:WidgetUtilsSame asWidgetUtils.getCockpitRoot().- Specified by:
getRootin interfaceWidgetUtils
-
getCockpitRoot
public org.zkoss.zk.ui.Component getCockpitRoot()
Description copied from interface:WidgetUtilsGets the root of the current desktop.- Specified by:
getCockpitRootin interfaceWidgetUtils
-
isPartOfComposedWidget
public boolean isPartOfComposedWidget(Widget widget)
Description copied from interface:WidgetUtilsChecks, if the given widget is has a group widget as ancestor.- Specified by:
isPartOfComposedWidgetin interfaceWidgetUtils
-
getSessionService
protected CockpitSessionService getSessionService()
-
setSessionService
public void setSessionService(CockpitSessionService sessionService)
-
getXmlBasedWidgetPersistenceService
public XMLWidgetPersistenceService getXmlBasedWidgetPersistenceService()
-
setXmlBasedWidgetPersistenceService
public void setXmlBasedWidgetPersistenceService(XMLWidgetPersistenceService xmlBasedWidgetPersistenceService)
-
getModelBasedWidgetPersistenceService
public WidgetPersistenceService getModelBasedWidgetPersistenceService()
-
setModelBasedWidgetPersistenceService
public void setModelBasedWidgetPersistenceService(WidgetPersistenceService modelBasedWidgetPersistenceService)
-
getWidgetService
protected WidgetService getWidgetService()
-
setWidgetService
public void setWidgetService(WidgetService widgetService)
-
getWidgetPersistenceService
protected WidgetPersistenceService getWidgetPersistenceService()
-
setWidgetPersistenceService
public void setWidgetPersistenceService(WidgetPersistenceService widgetPersistenceService)
-
setWidgetDefinitionService
public void setWidgetDefinitionService(CockpitComponentDefinitionService widgetDefinitionService)
-
setCockpitEventQueue
public void setCockpitEventQueue(CockpitEventQueue cockpitEventQueue)
-
getElementsToReset
protected java.util.Set<Resettable> getElementsToReset()
-
setElementsToReset
public void setElementsToReset(java.util.Set<Resettable> elementsToReset)
-
-