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.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gwt.dom.client.Element
m_borderBottom
Bottom border.protected com.google.gwt.dom.client.Element
m_borderLeft
Left border.protected com.google.gwt.dom.client.Element
m_borderRight
Right border.protected com.google.gwt.dom.client.Element
m_borderTop
Top border.protected com.google.gwt.dom.client.Element
m_buttonBar
The button bar element.protected com.google.gwt.dom.client.Element
m_overlayBottom
Edit overlay.protected com.google.gwt.dom.client.Element
m_overlayLeft
Edit overlay.protected com.google.gwt.dom.client.Element
m_overlayRight
Edit overlay.protected com.google.gwt.dom.client.Element
m_overlayTop
Edit overlay.
-
Constructor Summary
Constructors Constructor Description CmsInlineEditOverlay(com.google.gwt.dom.client.Element element)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
checkZIndex()
Increases the overlay z-index if necessary.void
clearButtonPanel()
Clears and hides the button panel.static CmsInlineEditOverlay
getRootOverlay()
Returns the root overlay if available.static void
removeAll()
Removes all present overlays.static void
removeLastOverlay()
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
updateCurrentOverlayPosition()
Updates the current overlay's position.void
updatePosition()
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
-
-
-
-
Field Detail
-
m_borderBottom
@UiField protected com.google.gwt.dom.client.Element m_borderBottom
Bottom border.
-
m_borderLeft
@UiField protected com.google.gwt.dom.client.Element m_borderLeft
Left border.
-
m_borderRight
@UiField protected com.google.gwt.dom.client.Element m_borderRight
Right border.
-
m_borderTop
@UiField protected com.google.gwt.dom.client.Element m_borderTop
Top border.
-
m_buttonBar
@UiField protected com.google.gwt.dom.client.Element m_buttonBar
The button bar element.
-
m_overlayBottom
@UiField protected com.google.gwt.dom.client.Element m_overlayBottom
Edit overlay.
-
m_overlayLeft
@UiField protected com.google.gwt.dom.client.Element m_overlayLeft
Edit overlay.
-
m_overlayRight
@UiField protected com.google.gwt.dom.client.Element m_overlayRight
Edit overlay.
-
m_overlayTop
@UiField protected com.google.gwt.dom.client.Element m_overlayTop
Edit overlay.
-
-
Constructor Detail
-
CmsInlineEditOverlay
public CmsInlineEditOverlay(com.google.gwt.dom.client.Element element)
Constructor.- Parameters:
element
- the element to surround with the overlay
-
-
Method Detail
-
addOverlayForElement
public static CmsInlineEditOverlay addOverlayForElement(com.google.gwt.dom.client.Element element)
Adds an overlay surrounding the given DOM element.- Parameters:
element
- the element- Returns:
- the overlay widget
-
getRootOverlay
public static CmsInlineEditOverlay getRootOverlay()
Returns the root overlay if available.- Returns:
- the root overlay
-
removeAll
public static void removeAll()
Removes all present overlays.
-
removeLastOverlay
public static void removeLastOverlay()
Removes the last overlay to display the previous or none.
-
updateCurrentOverlayPosition
public static void updateCurrentOverlayPosition()
Updates the current overlay's position.
-
addButton
public void addButton(CmsInlineEntityWidget widget, int absoluteTop)
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
public void checkZIndex()
Increases the overlay z-index if necessary.
-
clearButtonPanel
public void clearButtonPanel()
Clears and hides the button panel.
-
setButtonPosition
public void setButtonPosition(CmsInlineEntityWidget widget, int absoluteTop)
Updates the position of the given button widget.- Parameters:
widget
- the button widgetabsoluteTop
- the top absolute top position
-
setOffset
public void setOffset(int offset)
Sets the overlay offset.- Parameters:
offset
- the offset
-
setVisible
public void setVisible(boolean visible)
- 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
public void updatePosition()
Updates the overlay position.
-
-