Class DefaultWidgetContainer<T extends Widget>

    • Constructor Detail

      • DefaultWidgetContainer

        public DefaultWidgetContainer​(WidgetFactory factory)
    • Method Detail

      • cleanup

        public void cleanup()
        Description copied from interface: WidgetContainer
        Performs 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:
        cleanup in interface WidgetContainer<T extends Widget>
      • getWidgetMap

        protected java.util.Map<java.lang.String,​T> getWidgetMap()
      • focusWidget

        public void focusWidget​(java.lang.String focusWidgetCode)
        Description copied from interface: WidgetContainer
        Focuses the widget associated with the specified widget code.
        Specified by:
        focusWidget in interface WidgetContainer<T extends Widget>
        Parameters:
        focusWidgetCode - widget code
      • notifyListeners

        protected void notifyListeners​(CockpitEvent event)
      • getFocusedWidgetCode

        public java.lang.String getFocusedWidgetCode()
        Description copied from interface: WidgetContainer
        Returns the widget code of the currently focused widget.
        Specified by:
        getFocusedWidgetCode in interface WidgetContainer<T extends Widget>
        Returns:
        code of the focused widget or null if no widget has focus
      • getWidget

        public T getWidget​(java.lang.String widgetCode)
        Description copied from interface: WidgetContainer
        Returns the widget associated with the specified widget code.
        Specified by:
        getWidget in interface WidgetContainer<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

        public java.util.Map<java.lang.String,​T> initialize​(java.util.Map<java.lang.String,​WidgetConfig> widgetConfigs)
        Description copied from interface: WidgetContainer
        Initializes this container i.e. creates widgets based on the supplied WidgetConfig map.
        Specified by:
        initialize in interface WidgetContainer<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

        protected T createWidget​(WidgetConfig widgetConfig,
                                 java.lang.String widgetCode)
      • getCockpitEventAcceptors

        protected java.util.List<CockpitEventAcceptor> getCockpitEventAcceptors()