Package org.opencms.gwt.client.ui
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
A Widget to display a highlighting border around a specified position.
- Since:
- 8.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration 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
FieldsModifier and TypeFieldDescriptionprotected com.google.gwt.dom.client.DivElementThe bottom border.protected com.google.gwt.dom.client.DivElementThe left border.protected com.google.gwt.dom.client.DivElementThe right border.protected com.google.gwt.dom.client.DivElementThe top border.protected com.google.gwt.dom.client.DivElementThe element containing the midpoint separators, if any.static final intHorizontal offset of the midpoint separators.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCmsHighlightingBorder(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.CmsHighlightingBorder(CmsPositionBean position, CmsHighlightingBorder.BorderColor color) Constructor.CmsHighlightingBorder(CmsPositionBean position, CmsHighlightingBorder.BorderColor color, int borderOffset) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidenableAnimation(boolean animated) Enables the border animation.Gets the vertical offsets (relative to the viewport) of the horizontal lines (top, midpoints, bottom, in this order).voidhide()Hides the border.voidRecalculates the position and dimension when a positioning parent is given.voidSets the color of the border.voidsetMidpoints(List<Integer> verticalOffsets) Sets the midpoint separators, given a list of their vertical offsets from the top.voidsetPosition(int height, int width, int positionLeft, int positionTop) Sets the border position.voidsetPosition(CmsPositionBean position) Sets the border position.voidshow()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, setWidgetMethods 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, unsinkEventsMethods 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
-
Field Details
-
SEPARATOR_OFFSET
Horizontal offset of the midpoint separators.- See Also:
-
m_borderBottom
The bottom border. -
m_borderLeft
The left border. -
m_borderRight
The right border. -
m_midpoints
The element containing the midpoint separators, if any. -
m_borderTop
The top border.
-
-
Constructor Details
-
CmsHighlightingBorder
Constructor.- Parameters:
position- the position datacolor- the border color
-
CmsHighlightingBorder
public CmsHighlightingBorder(CmsPositionBean position, CmsHighlightingBorder.BorderColor color, int borderOffset) Constructor.- Parameters:
position- the position datacolor- the border colorborderOffset- the border offset
-
CmsHighlightingBorder
public CmsHighlightingBorder(com.google.gwt.dom.client.Element positioningParent, CmsHighlightingBorder.BorderColor color) Constructor.- Parameters:
positioningParent- the element the border is positioned around, position is set relative to itcolor- the border color
-
CmsHighlightingBorder
public CmsHighlightingBorder(int height, int width, int positionLeft, int positionTop, CmsHighlightingBorder.BorderColor color, int borderOffset, boolean correctTop) Constructor.- Parameters:
height- the heightwidth- the widthpositionLeft- the absolute left positionpositionTop- the absolute top positioncolor- the border colorborderOffset- the border offset
-
-
Method Details
-
enableAnimation
Enables the border animation.(Is enabled by default)
- Parameters:
animated-trueto 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
Hides the border. -
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
Sets the midpoint separators, given a list of their vertical offsets from the top.- Parameters:
verticalOffsets- the list of midpoint offsets
-
setPosition
Sets the border position.- Parameters:
position- the position data
-
setPosition
Sets the border position.- Parameters:
height- the heightwidth- the widthpositionLeft- the absolute left positionpositionTop- the absolute top position
-
show
Shows the border.
-