Package org.opencms.gwt.client.ui
Class A_CmsDirectEditButtons
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.google.gwt.user.client.ui.FlowPanel
org.opencms.gwt.client.ui.A_CmsDirectEditButtons
- 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.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IndexedPanel,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget,com.google.gwt.user.client.ui.InsertPanel,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,Iterable<com.google.gwt.user.client.ui.Widget>,I_CmsElementToolbarContext,I_CmsUniqueActiveItem
- Direct Known Subclasses:
CmsDirectEditButtons,CmsListCollectorEditor
public abstract class A_CmsDirectEditButtons
extends com.google.gwt.user.client.ui.FlowPanel
implements com.google.gwt.event.dom.client.HasMouseOverHandlers, com.google.gwt.event.dom.client.HasMouseOutHandlers, I_CmsUniqueActiveItem, I_CmsElementToolbarContext
Class to provide direct edit buttons.
- Since:
- 8.0.0
-
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.DebugIdImplEnabledNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidgetNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidgetNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CmsPushButtonThe delete button.protected CmsPushButtonThe edit button.protected CmsEditableDataJSOThe editable data.protected com.google.gwt.dom.client.ElementThe expired resources overlay element.protected CmsHighlightingBorderHighlighting border for this element.protected com.google.gwt.dom.client.ElementThe editable marker tag.protected CmsPushButtonThe new button.protected StringThe parent element id.protected CmsPositionBeanThe editable element position.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
ConstructorsConstructorDescriptionA_CmsDirectEditButtons(com.google.gwt.dom.client.Element editable, String parentId) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidShow the toolbar.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) Creates the button for displaying element information.voidHide the toolbar.protected Map<Integer, CmsPushButton> Returns a map of additional buttons in a map, with the button position as key (buttons will be ordered by their position).Provides context parameters for the resource info dialog.com.google.gwt.dom.client.ElementReturns the marker tag.protected abstract StringgetUploadButtonTitle(String uploadFolder) Gets the upload button title.voidPuts a highlighting border around the element.booleanisValid()Returns if this edit button is still valid.protected abstract voidThis method should be executed when the "delete" direct edit button is clicked.protected abstract voidThis method should be executed when the "edit" direct edit button is clicked.protected abstract voidonClickNew(boolean askCreateMode) This method should be executed when the "new" direct edit button is clicked.protected voidMethod to be executed when the "new" direct edit button is clicked, and the corresponding file has a type for which the upload dialog should be triggered.voidThis method is called when the item is removed from a container.voidvoidRemoves the highlighting border.protected voidRemoves the highlighting and option bar.voidsetPosition(CmsPositionBean position, com.google.gwt.dom.client.Element containerElement) Sets the position.protected voidupdateExpiredOverlayPosition(com.google.gwt.dom.client.Element positioningParent) Updates the position of the expired resources overlay if present.Methods inherited from class com.google.gwt.user.client.ui.FlowPanel
add, clear, insert, insertMethods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeMethods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, doAttachChildren, doDetachChildren, orphan, removeMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, 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, resolvePotentialElement, 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
fireEventMethods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, removeMethods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndexMethods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
addMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
m_delete
The delete button. -
m_edit
The edit button. -
m_editableData
The editable data. -
m_expiredOverlay
The expired resources overlay element. -
m_highlighting
Highlighting border for this element. -
m_markerTag
The editable marker tag. -
m_new
The new button. -
m_parentResourceId
The parent element id. -
m_position
The editable element position.
-
-
Constructor Details
-
A_CmsDirectEditButtons
Constructor.- Parameters:
editable- the editable marker tagparentId- the parent element id
-
-
Method Details
-
activateToolbarContext
Description copied from interface:I_CmsElementToolbarContextShow the toolbar.- Specified by:
activateToolbarContextin interfaceI_CmsElementToolbarContext- See Also:
-
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:
-
createInfoButton
Creates the button for displaying element information.- Returns:
- the created button
-
deactivateToolbarContext
Description copied from interface:I_CmsElementToolbarContextHide the toolbar.- Specified by:
deactivateToolbarContextin interfaceI_CmsElementToolbarContext- See Also:
-
getMarkerTag
Returns the marker tag.- Returns:
- the marker tag
-
highlightElement
Puts a highlighting border around the element. -
isValid
Returns if this edit button is still valid.- Returns:
trueif this edit button is valid
-
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:
-
removeFromParent
- Overrides:
removeFromParentin classcom.google.gwt.user.client.ui.Widget- See Also:
-
removeHighlighting
Removes the highlighting border. -
setPosition
public void setPosition(CmsPositionBean position, com.google.gwt.dom.client.Element containerElement) Sets the position. Make sure the widget is attached to the DOM.- Parameters:
position- the absolute positioncontainerElement- the parent container element
-
addHighlightingAndBar
Adds the highlighting and option bar. -
getAdditionalButtons
Returns a map of additional buttons in a map, with the button position as key (buttons will be ordered by their position).- Returns:
- the map of additional buttons
-
getInfoContext
Provides context parameters for the resource info dialog.- Returns:
- the map of context parameters
-
getUploadButtonTitle
Gets the upload button title.- Parameters:
uploadFolder- the upload folder- Returns:
- the upload button title
-
onClickDelete
This method should be executed when the "delete" direct edit button is clicked. -
onClickEdit
This method should be executed when the "edit" direct edit button is clicked. -
onClickNew
This method should be executed when the "new" direct edit button is clicked.- Parameters:
askCreateMode- true if the user should be asked for the 'content create mode'
-
onClickUpload
Method to be executed when the "new" direct edit button is clicked, and the corresponding file has a type for which the upload dialog should be triggered. -
removeHighlightingAndBar
Removes the highlighting and option bar. -
updateExpiredOverlayPosition
Updates the position of the expired resources overlay if present.- Parameters:
positioningParent- the positioning parent element
-