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
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 class
CmsHighlightingBorder.BorderColor
Enumeration of available border colours.
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gwt.dom.client.DivElement
m_borderBottom
The bottom border.protected com.google.gwt.dom.client.DivElement
m_borderLeft
The left border.protected com.google.gwt.dom.client.DivElement
m_borderRight
The right border.protected com.google.gwt.dom.client.DivElement
m_borderTop
The top border.
-
Constructor Summary
Constructors Constructor Description CmsHighlightingBorder(int height, int width, int positionLeft, int positionTop, CmsHighlightingBorder.BorderColor color, int borderOffset)
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enableAnimation(boolean animated)
Enables the border animation.void
hide()
Hides the border.void
resetPosition()
Recalculates the position and dimension when a positioning parent is given.void
setColor(CmsHighlightingBorder.BorderColor color)
Sets the color of the border.void
setPosition(int height, int width, int positionLeft, int positionTop)
Sets the border position.void
setPosition(CmsPositionBean position)
Sets the border position.void
show()
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
-
-
-
-
Field Detail
-
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_borderTop
@UiField protected com.google.gwt.dom.client.DivElement m_borderTop
The top border.
-
-
Constructor Detail
-
CmsHighlightingBorder
public CmsHighlightingBorder(CmsPositionBean position, CmsHighlightingBorder.BorderColor color)
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)
Constructor.- Parameters:
height
- the heightwidth
- the widthpositionLeft
- the absolute left positionpositionTop
- the absolute top positioncolor
- the border colorborderOffset
- the border offset
-
-
Method Detail
-
enableAnimation
public void enableAnimation(boolean animated)
Enables the border animation.(Is enabled by default)
- Parameters:
animated
-true
to enable border animation
-
hide
public void hide()
Hides the border.
-
resetPosition
public void resetPosition()
Recalculates the position and dimension when a positioning parent is given.
-
setColor
public void setColor(CmsHighlightingBorder.BorderColor color)
Sets the color of the border.- Parameters:
color
- the color of the border
-
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 heightwidth
- the widthpositionLeft
- the absolute left positionpositionTop
- the absolute top position
-
show
public void show()
Shows the border.
-
-