Class CmsInlineEntityWidget

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.CmsInlineEntityWidget
All Implemented Interfaces:
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 final class CmsInlineEntityWidget extends com.google.gwt.user.client.ui.Composite
Widget allowing form based editing for parts of a content to enhance the in-line editing.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Flow panel with handling descendant resizes to reposition pop-up.
    protected class 
    Timer to update the HTML.

    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
    The add button.
    The attribute choice button.
    protected CmsPushButton
    The down button.
    protected CmsPushButton
    The injected button.
    protected CmsPushButton
    The remove button.
    protected CmsPushButton
    The up button.

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

    DEBUG_ID_PREFIX
  • Method Summary

    Modifier and Type
    Method
    Description
    createWidgetForEntity(com.google.gwt.dom.client.Element element, I_CmsInlineFormParent formParent, org.opencms.acacia.shared.CmsEntity parentEntity, CmsAttributeHandler attributeHandler, int attributeIndex, I_CmsInlineHtmlUpdateHandler htmlUpdateHandler, I_CmsWidgetService widgetService)
    Creates the inline edit widget and injects it next to the context element.
    int
    Returns the attribute value index.
    protected void
    Positions the widget button above the reference element.
    void
    Sets the visibility of the reference element highlighting border.
    void
    updateButtonVisibility(boolean hasEditButton, boolean hasAddButton, boolean hasRemoveButton, boolean hasSortButtons)
    Updates the visibility of the add, remove, up and down buttons.

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

  • Method Details

    • createWidgetForEntity

      public static CmsInlineEntityWidget createWidgetForEntity(com.google.gwt.dom.client.Element element, I_CmsInlineFormParent formParent, org.opencms.acacia.shared.CmsEntity parentEntity, CmsAttributeHandler attributeHandler, int attributeIndex, I_CmsInlineHtmlUpdateHandler htmlUpdateHandler, I_CmsWidgetService widgetService)
      Creates the inline edit widget and injects it next to the context element.

      Parameters:
      element - the context element
      formParent - the parent widget
      parentEntity - the parent entity
      attributeHandler - the attribute handler
      attributeIndex - the attribute value index
      htmlUpdateHandler - handles HTML updates if required
      widgetService - the widget service
      Returns:
      the widget instance
    • getAttributeIndex

      public int getAttributeIndex()
      Returns the attribute value index.

      Returns:
      the attribute value index
    • setContentHighlightingVisible

      public void setContentHighlightingVisible(boolean visible)
      Sets the visibility of the reference element highlighting border.

      Parameters:
      visible - true to show the highlighting
    • updateButtonVisibility

      public void updateButtonVisibility(boolean hasEditButton, boolean hasAddButton, boolean hasRemoveButton, boolean hasSortButtons)
      Updates the visibility of the add, remove, up and down buttons.

      Parameters:
      hasEditButton - true if the edit button should be visible
      hasAddButton - true if the add button should be visible
      hasRemoveButton - true if the remove button should be visible
      hasSortButtons - true if the sort buttons should be visible
    • positionWidget

      protected void positionWidget()
      Positions the widget button above the reference element.