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.DebugIdImplEnabled
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
Nested 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 CmsPushButton
The delete button.protected CmsPushButton
The edit button.protected CmsEditableDataJSO
The editable data.protected com.google.gwt.dom.client.Element
The expired resources overlay element.protected CmsHighlightingBorder
Highlighting border for this element.protected com.google.gwt.dom.client.Element
The editable marker tag.protected CmsPushButton
The new button.protected String
The parent element id.protected CmsPositionBean
The editable element position.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
Fields 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 TypeMethodDescriptionvoid
Show the toolbar.protected void
Adds the highlighting and option bar.com.google.gwt.event.shared.HandlerRegistration
addMouseOutHandler
(com.google.gwt.event.dom.client.MouseOutHandler handler) com.google.gwt.event.shared.HandlerRegistration
addMouseOverHandler
(com.google.gwt.event.dom.client.MouseOverHandler handler) Creates the button for displaying element information.void
Hide 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.Element
Returns the marker tag.protected abstract String
getUploadButtonTitle
(String uploadFolder) Gets the upload button title.void
Puts a highlighting border around the element.boolean
isValid()
Returns if this edit button is still valid.protected abstract void
This method should be executed when the "delete" direct edit button is clicked.protected abstract void
This method should be executed when the "edit" direct edit button is clicked.protected abstract void
onClickNew
(boolean askCreateMode) This method should be executed when the "new" direct edit button is clicked.protected void
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.void
This method is called when the item is removed from a container.void
void
Removes the highlighting border.protected void
Removes the highlighting and option bar.void
setPosition
(CmsPositionBean position, com.google.gwt.dom.client.Element containerElement) Sets the position.protected void
updateExpiredOverlayPosition
(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, insert
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
Methods 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, 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, 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
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
add
Methods 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_CmsElementToolbarContext
Show the toolbar.- Specified by:
activateToolbarContext
in interfaceI_CmsElementToolbarContext
- See Also:
-
addMouseOutHandler
public com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler handler) - Specified by:
addMouseOutHandler
in interfacecom.google.gwt.event.dom.client.HasMouseOutHandlers
- See Also:
-
HasMouseOutHandlers.addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler)
-
addMouseOverHandler
public com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler handler) - Specified by:
addMouseOverHandler
in interfacecom.google.gwt.event.dom.client.HasMouseOverHandlers
- See Also:
-
HasMouseOverHandlers.addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler)
-
createInfoButton
Creates the button for displaying element information.- Returns:
- the created button
-
deactivateToolbarContext
Description copied from interface:I_CmsElementToolbarContext
Hide the toolbar.- Specified by:
deactivateToolbarContext
in 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:
true
if this edit button is valid
-
onDeactivate
Description copied from interface:I_CmsUniqueActiveItem
This method is called when the item is removed from a container.- Specified by:
onDeactivate
in interfaceI_CmsUniqueActiveItem
- See Also:
-
removeFromParent
- Overrides:
removeFromParent
in classcom.google.gwt.user.client.ui.Widget
- See Also:
-
Widget.removeFromParent()
-
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
-