Class DefaultWidgetUtils

  • All Implemented Interfaces:
    WidgetUtils

    public class DefaultWidgetUtils
    extends java.lang.Object
    implements WidgetUtils
    Default implementation for WidgetUtils. For internal use only.
    • Constructor Detail

      • DefaultWidgetUtils

        public DefaultWidgetUtils()
    • Method Detail

      • 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: WidgetUtils
        Adds an event listener to the global event queue.
        Specified by:
        addGlobalEventListener in interface WidgetUtils
      • dispatchGlobalEvents

        public void dispatchGlobalEvents()
        Description copied from interface: WidgetUtils
        Gets all unprocessed events from the global event queue and notifies subscribers.
        Specified by:
        dispatchGlobalEvents in interface WidgetUtils
      • addNotifierToStack

        public org.zkoss.zk.ui.Component addNotifierToStack​(org.zkoss.zk.ui.Component content)
        Specified by:
        addNotifierToStack in interface WidgetUtils
        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:
        addNotifierToStack in interface WidgetUtils
        Parameters:
        content - content component of the notify entry
        notifierStack - 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​(java.lang.String widgetInstanceId)
        Description copied from interface: WidgetUtils
        Gets the Widgetslot component for the given widgetInstanceId, if it has been registered for the current Desktop.
        Specified by:
        getRegisteredWidgetslot in interface WidgetUtils
      • getDesktopWidgetslotMap

        protected java.util.Map<java.lang.String,​Widgetslot> getDesktopWidgetslotMap()
      • getCockpitRoot

        public org.zkoss.zk.ui.Component getCockpitRoot()
        Description copied from interface: WidgetUtils
        Gets the root of the current desktop.
        Specified by:
        getCockpitRoot in interface WidgetUtils
      • isPartOfComposedWidget

        public boolean isPartOfComposedWidget​(Widget widget)
        Description copied from interface: WidgetUtils
        Checks, if the given widget is has a group widget as ancestor.
        Specified by:
        isPartOfComposedWidget in interface WidgetUtils
      • setXmlBasedWidgetPersistenceService

        public void setXmlBasedWidgetPersistenceService​(XMLWidgetPersistenceService xmlBasedWidgetPersistenceService)
      • setModelBasedWidgetPersistenceService

        public void setModelBasedWidgetPersistenceService​(WidgetPersistenceService modelBasedWidgetPersistenceService)
      • setWidgetService

        public void setWidgetService​(WidgetService widgetService)
      • setWidgetPersistenceService

        public void setWidgetPersistenceService​(WidgetPersistenceService widgetPersistenceService)
      • setCockpitEventQueue

        public void setCockpitEventQueue​(CockpitEventQueue cockpitEventQueue)
      • getElementsToReset

        protected java.util.Set<Resettable> getElementsToReset()
      • setElementsToReset

        public void setElementsToReset​(java.util.Set<Resettable> elementsToReset)