Class DefaultWidgetContainer<T extends Widget>
java.lang.Object
de.hybris.platform.cockpit.widgets.impl.DefaultWidgetContainer<T>
- All Implemented Interfaces:
WidgetContainer<T>
- Direct Known Subclasses:
PortalWidgetContainer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCockpitEventAcceptor(CockpitEventAcceptor acceptor) Registers theCockpitEventAcceptoracceptor with this widget container.voidcleanup()Performs widget cleanup i.e.protected TcreateWidget(WidgetConfig widgetConfig, String widgetCode) voidfocusWidget(String focusWidgetCode) Focuses the widget associated with the specified widget code.protected List<CockpitEventAcceptor>Returns the widget code of the currently focused widget.Returns the widget associated with the specified widget code.Returns theWidgetFactoryused for creating widgets.initialize(Map<String, WidgetConfig> widgetConfigs) Initializes this container i.e.protected voidnotifyListeners(CockpitEvent event) voidUnregisters theCockpitEventAcceptoracceptor with this widget container.voidsetWidgetFactory(WidgetFactory widgetFactory) Sets theWidgetFactoryused for creating widgets.
-
Constructor Details
-
DefaultWidgetContainer
-
-
Method Details
-
getWidgetFactory
Description copied from interface:WidgetContainerReturns theWidgetFactoryused for creating widgets.- Specified by:
getWidgetFactoryin interfaceWidgetContainer<T extends Widget>- Returns:
- the widget factory
-
setWidgetFactory
Description copied from interface:WidgetContainerSets theWidgetFactoryused for creating widgets.- Specified by:
setWidgetFactoryin interfaceWidgetContainer<T extends Widget>- Parameters:
widgetFactory- the widget factory
-
cleanup
public void cleanup()Description copied from interface:WidgetContainerPerforms widget cleanup i.e. unregisters any listeners etc. Note: It is very important that this method is called when the widgets are invalidated e.g. when the widgets' parent view component has been detached from the ZK desktop.- Specified by:
cleanupin interfaceWidgetContainer<T extends Widget>
-
getWidgetMap
-
focusWidget
Description copied from interface:WidgetContainerFocuses the widget associated with the specified widget code.- Specified by:
focusWidgetin interfaceWidgetContainer<T extends Widget>- Parameters:
focusWidgetCode- widget code
-
notifyListeners
-
getFocusedWidgetCode
Description copied from interface:WidgetContainerReturns the widget code of the currently focused widget.- Specified by:
getFocusedWidgetCodein interfaceWidgetContainer<T extends Widget>- Returns:
- code of the focused widget or null if no widget has focus
-
getWidget
Description copied from interface:WidgetContainerReturns the widget associated with the specified widget code.- Specified by:
getWidgetin interfaceWidgetContainer<T extends Widget>- Parameters:
widgetCode- widget code- Returns:
- widget mapped to the code or null if no widget is mapped to the supplied key
-
initialize
Description copied from interface:WidgetContainerInitializes this container i.e. creates widgets based on the suppliedWidgetConfigmap.- Specified by:
initializein interfaceWidgetContainer<T extends Widget>- Parameters:
widgetConfigs- map containing widget codes and configurations used when creating the widgets- Returns:
- map containing the created widgets mapped to their widget code
-
createWidget
-
addCockpitEventAcceptor
Description copied from interface:WidgetContainerRegisters theCockpitEventAcceptoracceptor with this widget container.- Specified by:
addCockpitEventAcceptorin interfaceWidgetContainer<T extends Widget>- Parameters:
acceptor- the event acceptor to register
-
removeCockpitEventAcceptor
Description copied from interface:WidgetContainerUnregisters theCockpitEventAcceptoracceptor with this widget container.- Specified by:
removeCockpitEventAcceptorin interfaceWidgetContainer<T extends Widget>- Parameters:
acceptor- the event acceptor to unregister
-
getCockpitEventAcceptors
-