Class CmsCategoryWidget

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.lang.String>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.TakesValue<java.lang.String>, com.google.gwt.user.client.ui.HasValue<java.lang.String>, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, I_CmsEditWidget, I_CmsHasResizeOnShow

    public class CmsCategoryWidget
    extends com.google.gwt.user.client.ui.Composite
    implements I_CmsEditWidget, I_CmsHasResizeOnShow
    Provides a standard HTML form category widget, for use on a widget dialog.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  CmsCategoryWidget.CloseEventPreviewHandler
      Drag and drop event preview handler.
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected CmsCategoryField m_categoryField
      Category widget.
      protected com.google.gwt.event.shared.HandlerRegistration m_previewHandlerRegistration
      The priview handler.
      protected java.util.List<org.opencms.gwt.shared.CmsCategoryTreeEntry> m_resultList
      List of all category folder.
      protected int m_xcoordspopup
      The x-coords of the popup.
      protected int m_ycoordspopup
      The y-coords of the popup.
      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsCategoryWidget​(java.lang.String config)
      Constructs an CmsComboWidget with the in XSD schema declared configuration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gwt.event.shared.HandlerRegistration addFocusHandler​(com.google.gwt.event.dom.client.FocusHandler handler)  
      com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler​(com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.String> handler)  
      protected void closePopup()
      Is called to close the popup and show the new values.
      void fireChangeEvent()
      Represents a value change event.
      java.lang.String getValue()  
      boolean isActive()
      Returns if the widget is active.
      void onAttachWidget()
      This method is called when a widget is attached to the browser's document.
      protected void openPopup()
      Is called to open the popup.
      boolean owns​(com.google.gwt.dom.client.Element element)
      Returns true if the element should be logically counted as part of the widget for the purpose of determining whether a mouse click is "outside".
      void resizeOnShow()
      Adjusts widget's size once it's visible.
      void setActive​(boolean active)
      Sets the widget active/inactive.
      protected void setHeight()
      Generates the right height for the view.
      void setName​(java.lang.String name)
      Sets the name of input fields.
      void setValue​(java.lang.String value)  
      void setValue​(java.lang.String value, boolean fireEvents)  
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class com.google.gwt.user.client.ui.UIObject

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent
      • Methods inherited from interface com.google.gwt.user.client.ui.IsWidget

        asWidget
    • Constructor Detail

      • CmsCategoryWidget

        public CmsCategoryWidget​(java.lang.String config)
        Constructs an CmsComboWidget with the in XSD schema declared configuration.

        Parameters:
        config - The configuration string given from OpenCms XSD
    • Method Detail

      • addFocusHandler

        public com.google.gwt.event.shared.HandlerRegistration addFocusHandler​(com.google.gwt.event.dom.client.FocusHandler handler)
        Specified by:
        addFocusHandler in interface com.google.gwt.event.dom.client.HasFocusHandlers
        See Also:
        HasFocusHandlers.addFocusHandler(com.google.gwt.event.dom.client.FocusHandler)
      • addValueChangeHandler

        public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler​(com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.String> handler)
        Specified by:
        addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.lang.String>
        Specified by:
        addValueChangeHandler in interface I_CmsEditWidget
        See Also:
        HasValueChangeHandlers.addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler)
      • fireChangeEvent

        public void fireChangeEvent()
        Represents a value change event.

      • getValue

        public java.lang.String getValue()
        Specified by:
        getValue in interface com.google.gwt.user.client.ui.HasValue<java.lang.String>
        Specified by:
        getValue in interface com.google.gwt.user.client.TakesValue<java.lang.String>
        See Also:
        HasValue.getValue()
      • owns

        public boolean owns​(com.google.gwt.dom.client.Element element)
        Description copied from interface: I_CmsEditWidget
        Returns true if the element should be logically counted as part of the widget for the purpose of determining whether a mouse click is "outside". For example, this is needed if the widget uses a popup.
        Specified by:
        owns in interface I_CmsEditWidget
        Parameters:
        element - the element to check
        Returns:
        true if the element counts as part of the widget
        See Also:
        I_CmsEditWidget.owns(com.google.gwt.dom.client.Element)
      • setValue

        public void setValue​(java.lang.String value)
        Specified by:
        setValue in interface com.google.gwt.user.client.ui.HasValue<java.lang.String>
        Specified by:
        setValue in interface com.google.gwt.user.client.TakesValue<java.lang.String>
        See Also:
        HasValue.setValue(java.lang.Object)
      • setValue

        public void setValue​(java.lang.String value,
                             boolean fireEvents)
        Specified by:
        setValue in interface com.google.gwt.user.client.ui.HasValue<java.lang.String>
        Specified by:
        setValue in interface I_CmsEditWidget
        See Also:
        HasValue.setValue(java.lang.Object, boolean)
      • closePopup

        protected void closePopup()
        Is called to close the popup and show the new values.

      • openPopup

        protected void openPopup()
        Is called to open the popup.

      • setHeight

        protected void setHeight()
        Generates the right height for the view.