Class CmsElementOptionBar
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.ade.containerpage.client.ui.CmsElementOptionBar
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasMouseOutHandlers,com.google.gwt.event.dom.client.HasMouseOverHandlers,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,I_CmsElementToolbarContext,I_CmsUniqueActiveItem
public class CmsElementOptionBar
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.event.dom.client.HasMouseOverHandlers, com.google.gwt.event.dom.client.HasMouseOutHandlers, I_CmsUniqueActiveItem, I_CmsElementToolbarContext
A panel to be displayed inside a container element to provide optional functions like edit, move, remove...
- Since:
- 8.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classHover handler for option bar.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 inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIXFields inherited from interface org.opencms.gwt.client.I_CmsElementToolbarContext
ELEMENT_OPTION_BAR_CSS_CLASS -
Constructor Summary
ConstructorsConstructorDescriptionCmsElementOptionBar(CmsContainerPageElementPanel containerElement) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidShow the toolbar.voidadd(com.google.gwt.user.client.ui.Widget w) Adds another option button.protected voidAdds the highlighting and option bar.com.google.gwt.event.shared.HandlerRegistrationaddMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler handler) com.google.gwt.event.shared.HandlerRegistrationaddMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler handler) voidclear()Clears the bar.static CmsElementOptionBarcreateOptionBarForElement(CmsContainerPageElementPanel element, CmsDNDHandler dndHandler, A_CmsToolbarOptionButton... buttons) Creates an option-bar for the given drag element.voidHide the toolbar.intReturns the calculated width of the widget.protected CmsContainerPageElementPanelReturns the parent container element.protected voidRemoves the highlighting.Iterator<com.google.gwt.user.client.ui.Widget> iterator()Returns an iterator for the child widgets.voidThis method is called when the item is removed from a container.voidRemoves the highlighting and option bar.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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
CmsElementOptionBar
Constructor.- Parameters:
containerElement- the parent container element
-
-
Method Details
-
createOptionBarForElement
public static CmsElementOptionBar createOptionBarForElement(CmsContainerPageElementPanel element, CmsDNDHandler dndHandler, A_CmsToolbarOptionButton... buttons) Creates an option-bar for the given drag element.- Parameters:
element- the element to create the option-bar fordndHandler- the drag and drop handlerbuttons- the list of buttons to display- Returns:
- the created option-bar
-
activateToolbarContext
Description copied from interface:I_CmsElementToolbarContextShow the toolbar.- Specified by:
activateToolbarContextin interfaceI_CmsElementToolbarContext- See Also:
-
add
Adds another option button.- Parameters:
w- the button to add
-
addMouseOutHandler
public com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler handler) - Specified by:
addMouseOutHandlerin interfacecom.google.gwt.event.dom.client.HasMouseOutHandlers- See Also:
-
addMouseOverHandler
public com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler handler) - Specified by:
addMouseOverHandlerin interfacecom.google.gwt.event.dom.client.HasMouseOverHandlers- See Also:
-
clear
Clears the bar. -
deactivateToolbarContext
Description copied from interface:I_CmsElementToolbarContextHide the toolbar.- Specified by:
deactivateToolbarContextin interfaceI_CmsElementToolbarContext- See Also:
-
getCalculatedWidth
Returns the calculated width of the widget.- Returns:
- the calculated width
-
iterator
Returns an iterator for the child widgets.- Returns:
- the iterator
-
onDeactivate
Description copied from interface:I_CmsUniqueActiveItemThis method is called when the item is removed from a container.- Specified by:
onDeactivatein interfaceI_CmsUniqueActiveItem- See Also:
-
removeHighlighting
Removes the highlighting and option bar. -
addHighlighting
Adds the highlighting and option bar. -
getContainerElement
Returns the parent container element.- Returns:
- the parent container element
-
internalRemoveHighlighting
Removes the highlighting.
-