Class A_CmsDirectEditButtons

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.google.gwt.user.client.ui.FlowPanel
org.opencms.gwt.client.ui.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, 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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected CmsPushButton
    The delete button.
    protected CmsPushButton
    The edit button.
    The editable data.
    protected com.google.gwt.dom.client.Element
    The expired resources overlay element.
    Highlighting border for this element.
    protected com.google.gwt.dom.client.Element
    The editable marker tag.
    protected CmsPushButton
    The new button.
    protected String
    The parent element id.
    protected CmsPositionBean
    The editable element position.

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX

    Fields inherited from interface org.opencms.gwt.client.I_CmsElementToolbarContext

    ELEMENT_OPTION_BAR_CSS_CLASS
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
    Show the toolbar.
    protected void
    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)
     
    Creates the button for displaying element information.
    void
    Hide the toolbar.
    Returns a map of additional buttons in a map, with the button position as key (buttons will be ordered by their position).
    protected Map<String,String>
    Provides context parameters for the resource info dialog.
    com.google.gwt.dom.client.Element
    Returns the marker tag.
    protected abstract String
    Gets the upload button title.
    void
    Puts a highlighting border around the element.
    boolean
    Returns if this edit button is still valid.
    protected abstract void
    This method should be executed when the "delete" direct edit button is clicked.
    protected abstract void
    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
    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
    This method is called when the item is removed from a container.
    void
     
    void
    Removes the highlighting border.
    protected void
    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
  • Field Details

  • Constructor Details

    • A_CmsDirectEditButtons

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

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

    • activateToolbarContext

      public void activateToolbarContext()
      Description copied from interface: I_CmsElementToolbarContext
      Show the toolbar.
      Specified by:
      activateToolbarContext in interface I_CmsElementToolbarContext
      See Also:
    • 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)
    • createInfoButton

      Creates the button for displaying element information.

      Returns:
      the created button
    • deactivateToolbarContext

      public void deactivateToolbarContext()
      Description copied from interface: I_CmsElementToolbarContext
      Hide the toolbar.
      Specified by:
      deactivateToolbarContext in interface I_CmsElementToolbarContext
      See Also:
    • 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
    • onDeactivate

      public void onDeactivate()
      Description copied from interface: I_CmsUniqueActiveItem
      This method is called when the item is removed from a container.

      Specified by:
      onDeactivate in interface I_CmsUniqueActiveItem
      See Also:
    • removeFromParent

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

      public void removeHighlighting()
      Removes the highlighting border.

    • 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
    • addHighlightingAndBar

      protected void addHighlightingAndBar()
      Adds the highlighting and option bar.

    • getAdditionalButtons

      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

      Provides context parameters for the resource info dialog.

      Returns:
      the map of context parameters
    • getUploadButtonTitle

      protected abstract String getUploadButtonTitle(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.
    • removeHighlightingAndBar

      protected void removeHighlightingAndBar()
      Removes the highlighting and option bar.

    • 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