Package org.opencms.acacia.client.ui
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
Modifier and TypeFieldDescriptionprotected 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
ConstructorDescriptionCmsInlineEditOverlay
(com.google.gwt.dom.client.Element element) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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) static CmsInlineEditOverlay
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.static CmsInlineEditOverlay
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
Bottom border. -
m_borderLeft
Left border. -
m_borderRight
Right border. -
m_borderTop
Top border. -
m_buttonBar
The button bar element. -
m_overlayBottom
Edit overlay. -
m_overlayLeft
Edit overlay. -
m_overlayRight
Edit overlay. -
m_overlayTop
Edit overlay.
-
-
Constructor Details
-
CmsInlineEditOverlay
Constructor.- Parameters:
element
- the element to surround with the overlay
-
-
Method Details
-
addOverlayForElement
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
Removes all present overlays. -
removeLastOverlay
Removes the last overlay to display the previous or none. -
updateCurrentOverlayPosition
Updates the current overlay's position. -
addButton
Adds a button widget to the button panel.- Parameters:
widget
- the button widgetabsoluteTop
- 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 interfacecom.google.gwt.event.dom.client.HasClickHandlers
- See Also:
-
HasClickHandlers.addClickHandler(com.google.gwt.event.dom.client.ClickHandler)
-
checkZIndex
Increases the overlay z-index if necessary. -
clearButtonPanel
Clears and hides the button panel. -
setButtonPosition
Updates the position of the given button widget.- Parameters:
widget
- the button widgetabsoluteTop
- the top absolute top position
-
setOffset
Sets the overlay offset.- Parameters:
offset
- the offset
-
setVisible
- Specified by:
setVisible
in interfacecom.google.gwt.user.client.ui.HasVisibility
- Overrides:
setVisible
in classcom.google.gwt.user.client.ui.UIObject
- See Also:
-
UIObject.setVisible(boolean)
-
updatePosition
Updates the overlay position.
-