Class CmsHighlightingBorder

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.gwt.client.ui.CmsHighlightingBorder
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 class CmsHighlightingBorder extends com.google.gwt.user.client.ui.Composite
A Widget to display a highlighting border around a specified position.

Since:
8.0.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enumeration of available border colours.

    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.DivElement
    The bottom border.
    protected com.google.gwt.dom.client.DivElement
    The left border.
    protected com.google.gwt.dom.client.DivElement
    The right border.
    protected com.google.gwt.dom.client.DivElement
    The top border.
    protected com.google.gwt.dom.client.DivElement
    The element containing the midpoint separators, if any.
    static final int
    Horizontal offset of the midpoint separators.

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

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    CmsHighlightingBorder(int height, int width, int positionLeft, int positionTop, CmsHighlightingBorder.BorderColor color, int borderOffset, boolean correctTop)
    Constructor.
    CmsHighlightingBorder(com.google.gwt.dom.client.Element positioningParent, CmsHighlightingBorder.BorderColor color)
    Constructor.
    Constructor.
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    enableAnimation(boolean animated)
    Enables the border animation.
    Gets the vertical offsets (relative to the viewport) of the horizontal lines (top, midpoints, bottom, in this order).
    void
    Hides the border.
    void
    Recalculates the position and dimension when a positioning parent is given.
    void
    Sets the color of the border.
    void
    setMidpoints(List<Integer> verticalOffsets)
    Sets the midpoint separators, given a list of their vertical offsets from the top.
    void
    setPosition(int height, int width, int positionLeft, int positionTop)
    Sets the border position.
    void
    Sets the border position.
    void
    Shows the border.

    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

    • SEPARATOR_OFFSET

      public static final int SEPARATOR_OFFSET
      Horizontal offset of the midpoint separators.
      See Also:
    • m_borderBottom

      @UiField protected com.google.gwt.dom.client.DivElement m_borderBottom
      The bottom border.
    • m_borderLeft

      @UiField protected com.google.gwt.dom.client.DivElement m_borderLeft
      The left border.
    • m_borderRight

      @UiField protected com.google.gwt.dom.client.DivElement m_borderRight
      The right border.
    • m_midpoints

      @UiField protected com.google.gwt.dom.client.DivElement m_midpoints
      The element containing the midpoint separators, if any.
    • m_borderTop

      @UiField protected com.google.gwt.dom.client.DivElement m_borderTop
      The top border.
  • Constructor Details

  • Method Details

    • enableAnimation

      public void enableAnimation(boolean animated)
      Enables the border animation.

      (Is enabled by default)

      Parameters:
      animated - true to enable border animation
    • getClientVerticalOffsets

      Gets the vertical offsets (relative to the viewport) of the horizontal lines (top, midpoints, bottom, in this order).
      Returns:
      the vertical offsets of the horizonral lines
    • hide

      public void hide()
      Hides the border.

    • resetPosition

      public void resetPosition()
      Recalculates the position and dimension when a positioning parent is given.

    • setColor

      Sets the color of the border.

      Parameters:
      color - the color of the border
    • setMidpoints

      public void setMidpoints(List<Integer> verticalOffsets)
      Sets the midpoint separators, given a list of their vertical offsets from the top.
      Parameters:
      verticalOffsets - the list of midpoint offsets
    • setPosition

      public void setPosition(CmsPositionBean position)
      Sets the border position.

      Parameters:
      position - the position data
    • setPosition

      public void setPosition(int height, int width, int positionLeft, int positionTop)
      Sets the border position.

      Parameters:
      height - the height
      width - the width
      positionLeft - the absolute left position
      positionTop - the absolute top position
    • show

      public void show()
      Shows the border.