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
,java.lang.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
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsPushButton
m_delete
The delete button.protected CmsPushButton
m_edit
The edit button.protected CmsEditableDataJSO
m_editableData
The editable data.protected com.google.gwt.dom.client.Element
m_expiredOverlay
The expired resources overlay element.protected CmsHighlightingBorder
m_highlighting
Highlighting border for this element.protected com.google.gwt.dom.client.Element
m_markerTag
The editable marker tag.protected CmsPushButton
m_new
The new button.protected java.lang.String
m_parentResourceId
The parent element id.protected CmsPositionBean
m_position
The editable element position.-
Fields inherited from interface org.opencms.gwt.client.I_CmsElementToolbarContext
ELEMENT_OPTION_BAR_CSS_CLASS
-
-
Constructor Summary
Constructors Constructor Description A_CmsDirectEditButtons(com.google.gwt.dom.client.Element editable, java.lang.String parentId)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
activateToolbarContext()
Show the toolbar.protected void
addHighlightingAndBar()
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)
CmsPushButton
createInfoButton()
Creates the button for displaying element information.void
deactivateToolbarContext()
Hide the toolbar.protected java.util.Map<java.lang.Integer,CmsPushButton>
getAdditionalButtons()
Returns a map of additional buttons in a map, with the button position as key (buttons will be ordered by their position).protected java.util.Map<java.lang.String,java.lang.String>
getInfoContext()
Provides context parameters for the resource info dialog.com.google.gwt.dom.client.Element
getMarkerTag()
Returns the marker tag.protected abstract java.lang.String
getUploadButtonTitle(java.lang.String uploadFolder)
Gets the upload button title.void
highlightElement()
Puts a highlighting border around the element.boolean
isValid()
Returns if this edit button is still valid.protected abstract void
onClickDelete()
This method should be executed when the "delete" direct edit button is clicked.protected abstract void
onClickEdit()
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
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.void
onDeactivate()
This method is called when the item is removed from a container.void
removeFromParent()
void
removeHighlighting()
Removes the highlighting border.protected void
removeHighlightingAndBar()
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.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.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
-
-
-
-
Field Detail
-
m_delete
protected CmsPushButton m_delete
The delete button.
-
m_edit
protected CmsPushButton m_edit
The edit button.
-
m_editableData
protected CmsEditableDataJSO m_editableData
The editable data.
-
m_expiredOverlay
protected com.google.gwt.dom.client.Element m_expiredOverlay
The expired resources overlay element.
-
m_highlighting
protected CmsHighlightingBorder m_highlighting
Highlighting border for this element.
-
m_markerTag
protected com.google.gwt.dom.client.Element m_markerTag
The editable marker tag.
-
m_new
protected CmsPushButton m_new
The new button.
-
m_parentResourceId
protected java.lang.String m_parentResourceId
The parent element id.
-
m_position
protected CmsPositionBean m_position
The editable element position.
-
-
Constructor Detail
-
A_CmsDirectEditButtons
public A_CmsDirectEditButtons(com.google.gwt.dom.client.Element editable, java.lang.String parentId)
Constructor.- Parameters:
editable
- the editable marker tagparentId
- the parent element id
-
-
Method Detail
-
activateToolbarContext
public void activateToolbarContext()
Description copied from interface:I_CmsElementToolbarContext
Show the toolbar.- Specified by:
activateToolbarContext
in interfaceI_CmsElementToolbarContext
- See Also:
I_CmsElementToolbarContext.activateToolbarContext()
-
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
public CmsPushButton createInfoButton()
Creates the button for displaying element information.- Returns:
- the created button
-
deactivateToolbarContext
public void deactivateToolbarContext()
Description copied from interface:I_CmsElementToolbarContext
Hide the toolbar.- Specified by:
deactivateToolbarContext
in interfaceI_CmsElementToolbarContext
- See Also:
I_CmsElementToolbarContext.deactivateToolbarContext()
-
getMarkerTag
public com.google.gwt.dom.client.Element getMarkerTag()
Returns the marker tag.- Returns:
- the marker tag
-
highlightElement
public void highlightElement()
Puts a highlighting border around the element.
-
isValid
public boolean isValid()
Returns if this edit button is still valid.- Returns:
true
if this edit button is valid
-
onDeactivate
public void 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:
I_CmsUniqueActiveItem.onDeactivate()
-
removeFromParent
public void removeFromParent()
- Overrides:
removeFromParent
in classcom.google.gwt.user.client.ui.Widget
- See Also:
Widget.removeFromParent()
-
removeHighlighting
public void 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
protected void addHighlightingAndBar()
Adds the highlighting and option bar.
-
getAdditionalButtons
protected java.util.Map<java.lang.Integer,CmsPushButton> 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
protected java.util.Map<java.lang.String,java.lang.String> getInfoContext()
Provides context parameters for the resource info dialog.- Returns:
- the map of context parameters
-
getUploadButtonTitle
protected abstract java.lang.String getUploadButtonTitle(java.lang.String uploadFolder)
Gets the upload button title.- Parameters:
uploadFolder
- the upload folder- Returns:
- the upload button title
-
onClickDelete
protected abstract void onClickDelete()
This method should be executed when the "delete" direct edit button is clicked.
-
onClickEdit
protected abstract void onClickEdit()
This method should be executed when the "edit" direct edit button is clicked.
-
onClickNew
protected abstract void onClickNew(boolean askCreateMode)
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
protected void 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
protected void removeHighlightingAndBar()
Removes the highlighting and option bar.
-
updateExpiredOverlayPosition
protected void updateExpiredOverlayPosition(com.google.gwt.dom.client.Element positioningParent)
Updates the position of the expired resources overlay if present.- Parameters:
positioningParent
- the positioning parent element
-
-