Class A_CmsDirectEditButtons

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.HasMouseOutHandlers, com.google.gwt.event.dom.client.HasMouseOverHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.InsertPanel, com.google.gwt.user.client.ui.InsertPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>, I_CmsElementToolbarContext, I_CmsUniqueActiveItem
    Direct Known Subclasses:
    CmsDirectEditButtons, CmsListCollectorEditor

    public abstract class A_CmsDirectEditButtons
    extends com.google.gwt.user.client.ui.FlowPanel
    implements com.google.gwt.event.dom.client.HasMouseOverHandlers, com.google.gwt.event.dom.client.HasMouseOutHandlers, I_CmsUniqueActiveItem, I_CmsElementToolbarContext
    Class to provide direct edit buttons.

    Since:
    8.0.0
    • Nested Class Summary

      • 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
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

        com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel

        com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel

        com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
    • Constructor Summary

      Constructors 
      Constructor Description
      A_CmsDirectEditButtons​(com.google.gwt.dom.client.Element editable, java.lang.String parentId)
      Constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void activateToolbarContext()
      Show the toolbar.
      protected void addHighlightingAndBar()
      Adds the highlighting and option bar.
      com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler​(com.google.gwt.event.dom.client.MouseOutHandler handler)  
      com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler​(com.google.gwt.event.dom.client.MouseOverHandler handler)  
      CmsPushButton createInfoButton()
      Creates the button for displaying element information.
      void deactivateToolbarContext()
      Hide the toolbar.
      protected java.util.Map<java.lang.Integer,​CmsPushButton> getAdditionalButtons()
      Returns a map of additional buttons in a map, with the button position as key (buttons will be ordered by their position).
      protected java.util.Map<java.lang.String,​java.lang.String> getInfoContext()
      Provides context parameters for the resource info dialog.
      com.google.gwt.dom.client.Element getMarkerTag()
      Returns the marker tag.
      protected abstract java.lang.String getUploadButtonTitle​(java.lang.String uploadFolder)
      Gets the upload button title.
      void highlightElement()
      Puts a highlighting border around the element.
      boolean isValid()
      Returns if this edit button is still valid.
      protected abstract void onClickDelete()
      This method should be executed when the "delete" direct edit button is clicked.
      protected abstract void onClickEdit()
      This method should be executed when the "edit" direct edit button is clicked.
      protected abstract void onClickNew​(boolean askCreateMode)
      This method should be executed when the "new" direct edit button is clicked.
      protected void onClickUpload()
      Method to be executed when the "new" direct edit button is clicked, and the corresponding file has a type for which the upload dialog should be triggered.
      void onDeactivate()
      This method is called when the item is removed from a container.
      void removeFromParent()  
      void removeHighlighting()
      Removes the highlighting border.
      protected void removeHighlightingAndBar()
      Removes the highlighting and option bar.
      void setPosition​(CmsPositionBean position, com.google.gwt.dom.client.Element containerElement)
      Sets the position.
      protected void updateExpiredOverlayPosition​(com.google.gwt.dom.client.Element positioningParent)
      Updates the position of the expired resources overlay if present.
      • Methods inherited from class com.google.gwt.user.client.ui.FlowPanel

        add, clear, insert, insert
      • Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel

        add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
      • Methods inherited from class com.google.gwt.user.client.ui.Panel

        add, adopt, doAttachChildren, doDetachChildren, orphan, remove
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, 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, resolvePotentialElement, 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.IndexedPanel

        getWidget, getWidgetCount, getWidgetIndex, remove
      • Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget

        getWidgetIndex
      • Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget

        add
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • A_CmsDirectEditButtons

        public A_CmsDirectEditButtons​(com.google.gwt.dom.client.Element editable,
                                      java.lang.String parentId)
        Constructor.

        Parameters:
        editable - the editable marker tag
        parentId - the parent element id
    • Method Detail

      • addMouseOutHandler

        public com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler​(com.google.gwt.event.dom.client.MouseOutHandler handler)
        Specified by:
        addMouseOutHandler in interface com.google.gwt.event.dom.client.HasMouseOutHandlers
        See Also:
        HasMouseOutHandlers.addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler)
      • addMouseOverHandler

        public com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler​(com.google.gwt.event.dom.client.MouseOverHandler handler)
        Specified by:
        addMouseOverHandler in interface com.google.gwt.event.dom.client.HasMouseOverHandlers
        See Also:
        HasMouseOverHandlers.addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler)
      • getMarkerTag

        public com.google.gwt.dom.client.Element getMarkerTag()
        Returns the marker tag.

        Returns:
        the marker tag
      • highlightElement

        public void highlightElement()
        Puts a highlighting border around the element.

      • isValid

        public boolean isValid()
        Returns if this edit button is still valid.

        Returns:
        true if this edit button is valid
      • removeFromParent

        public void removeFromParent()
        Overrides:
        removeFromParent in class com.google.gwt.user.client.ui.Widget
        See Also:
        Widget.removeFromParent()
      • setPosition

        public void setPosition​(CmsPositionBean position,
                                com.google.gwt.dom.client.Element containerElement)
        Sets the position. Make sure the widget is attached to the DOM.

        Parameters:
        position - the absolute position
        containerElement - the parent container element
      • getAdditionalButtons

        protected java.util.Map<java.lang.Integer,​CmsPushButtongetAdditionalButtons()
        Returns a map of additional buttons in a map, with the button position as key (buttons will be ordered by their position).

        Returns:
        the map of additional buttons
      • getInfoContext

        protected java.util.Map<java.lang.String,​java.lang.String> getInfoContext()
        Provides context parameters for the resource info dialog.

        Returns:
        the map of context parameters
      • getUploadButtonTitle

        protected abstract java.lang.String getUploadButtonTitle​(java.lang.String uploadFolder)
        Gets the upload button title.
        Parameters:
        uploadFolder - the upload folder
        Returns:
        the upload button title
      • onClickDelete

        protected abstract void onClickDelete()
        This method should be executed when the "delete" direct edit button is clicked.

      • onClickEdit

        protected abstract void onClickEdit()
        This method should be executed when the "edit" direct edit button is clicked.

      • onClickNew

        protected abstract void onClickNew​(boolean askCreateMode)
        This method should be executed when the "new" direct edit button is clicked.

        Parameters:
        askCreateMode - true if the user should be asked for the 'content create mode'
      • onClickUpload

        protected void onClickUpload()
        Method to be executed when the "new" direct edit button is clicked, and the corresponding file has a type for which the upload dialog should be triggered.
      • updateExpiredOverlayPosition

        protected void updateExpiredOverlayPosition​(com.google.gwt.dom.client.Element positioningParent)
        Updates the position of the expired resources overlay if present.

        Parameters:
        positioningParent - the positioning parent element