Class CmsInlineEditOverlay

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.acacia.client.ui.CmsInlineEditOverlay
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasClickHandlers, 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.IsRenderable, com.google.gwt.user.client.ui.IsWidget

public class CmsInlineEditOverlay extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.event.dom.client.HasClickHandlers
In-line edit overlay covering rest of the page.

  • 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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.google.gwt.dom.client.Element
    Bottom border.
    protected com.google.gwt.dom.client.Element
    Left border.
    protected com.google.gwt.dom.client.Element
    Right border.
    protected com.google.gwt.dom.client.Element
    Top border.
    protected com.google.gwt.dom.client.Element
    The button bar element.
    protected com.google.gwt.dom.client.Element
    Edit overlay.
    protected com.google.gwt.dom.client.Element
    Edit overlay.
    protected com.google.gwt.dom.client.Element
    Edit overlay.
    protected com.google.gwt.dom.client.Element
    Edit overlay.

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

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    CmsInlineEditOverlay(com.google.gwt.dom.client.Element element)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addButton(CmsInlineEntityWidget widget, int absoluteTop)
    Adds a button widget to the button panel.
    com.google.gwt.event.shared.HandlerRegistration
    addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
     
    addOverlayForElement(com.google.gwt.dom.client.Element element)
    Adds an overlay surrounding the given DOM element.
    void
    Increases the overlay z-index if necessary.
    void
    Clears and hides the button panel.
    Returns the root overlay if available.
    static void
    Removes all present overlays.
    static void
    Removes the last overlay to display the previous or none.
    void
    setButtonPosition(CmsInlineEntityWidget widget, int absoluteTop)
    Updates the position of the given button widget.
    void
    setOffset(int offset)
    Sets the overlay offset.
    void
    setVisible(boolean visible)
     
    static void
    Updates the current overlay's position.
    void
    Updates the overlay position.

    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, 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
  • Field Details

    • m_borderBottom

      @UiField protected com.google.gwt.dom.client.Element m_borderBottom
      Bottom border.
    • m_borderLeft

      @UiField protected com.google.gwt.dom.client.Element m_borderLeft
      Left border.
    • m_borderRight

      @UiField protected com.google.gwt.dom.client.Element m_borderRight
      Right border.
    • m_borderTop

      @UiField protected com.google.gwt.dom.client.Element m_borderTop
      Top border.
    • m_buttonBar

      @UiField protected com.google.gwt.dom.client.Element m_buttonBar
      The button bar element.
    • m_overlayBottom

      @UiField protected com.google.gwt.dom.client.Element m_overlayBottom
      Edit overlay.
    • m_overlayLeft

      @UiField protected com.google.gwt.dom.client.Element m_overlayLeft
      Edit overlay.
    • m_overlayRight

      @UiField protected com.google.gwt.dom.client.Element m_overlayRight
      Edit overlay.
    • m_overlayTop

      @UiField protected com.google.gwt.dom.client.Element m_overlayTop
      Edit overlay.
  • Constructor Details

    • CmsInlineEditOverlay

      public CmsInlineEditOverlay(com.google.gwt.dom.client.Element element)
      Constructor.

      Parameters:
      element - the element to surround with the overlay
  • Method Details

    • addOverlayForElement

      public static CmsInlineEditOverlay addOverlayForElement(com.google.gwt.dom.client.Element element)
      Adds an overlay surrounding the given DOM element.

      Parameters:
      element - the element
      Returns:
      the overlay widget
    • getRootOverlay

      Returns the root overlay if available.

      Returns:
      the root overlay
    • removeAll

      public static void removeAll()
      Removes all present overlays.

    • removeLastOverlay

      public static void removeLastOverlay()
      Removes the last overlay to display the previous or none.

    • updateCurrentOverlayPosition

      public static void updateCurrentOverlayPosition()
      Updates the current overlay's position.

    • addButton

      public void addButton(CmsInlineEntityWidget widget, int absoluteTop)
      Adds a button widget to the button panel.

      Parameters:
      widget - the button widget
      absoluteTop - the absolute top position
    • addClickHandler

      public com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
      Specified by:
      addClickHandler in interface com.google.gwt.event.dom.client.HasClickHandlers
      See Also:
      • HasClickHandlers.addClickHandler(com.google.gwt.event.dom.client.ClickHandler)
    • checkZIndex

      public void checkZIndex()
      Increases the overlay z-index if necessary.

    • clearButtonPanel

      public void clearButtonPanel()
      Clears and hides the button panel.

    • setButtonPosition

      public void setButtonPosition(CmsInlineEntityWidget widget, int absoluteTop)
      Updates the position of the given button widget.

      Parameters:
      widget - the button widget
      absoluteTop - the top absolute top position
    • setOffset

      public void setOffset(int offset)
      Sets the overlay offset.

      Parameters:
      offset - the offset
    • setVisible

      public void setVisible(boolean visible)
      Specified by:
      setVisible in interface com.google.gwt.user.client.ui.HasVisibility
      Overrides:
      setVisible in class com.google.gwt.user.client.ui.UIObject
      See Also:
      • UIObject.setVisible(boolean)
    • updatePosition

      public void updatePosition()
      Updates the overlay position.