Class CmsListCollectorEditor
- 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
-
- org.opencms.ade.containerpage.client.ui.CmsListCollectorEditor
-
- 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
public class CmsListCollectorEditor extends A_CmsDirectEditButtons
Class to provide direct edit buttons within list collector elements.- 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 inherited from class org.opencms.gwt.client.ui.A_CmsDirectEditButtons
m_delete, m_edit, m_editableData, m_expiredOverlay, m_highlighting, m_markerTag, m_new, m_parentResourceId, m_position
-
Fields inherited from interface org.opencms.gwt.client.I_CmsElementToolbarContext
ELEMENT_OPTION_BAR_CSS_CLASS
-
-
Constructor Summary
Constructors Constructor Description CmsListCollectorEditor(com.google.gwt.dom.client.Element editable, java.lang.String parentId)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsPushButton
createFavButton()
Creates the button to add an element to the user's favorites.protected void
defaultNew()
Handles the 'default case' when using the new function on an editable element.protected void
deleteElement()
Delete the editable element from page and VFS.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.protected java.lang.String
getUploadButtonTitle(java.lang.String uploadFolder)
Gets the upload button title.boolean
isVisibleInCurrentView()
Returns true if the element view of the element is compatible with the currently set element view in the container page editor.protected void
onClickDelete()
This method should be executed when the "delete" direct edit button is clicked.protected void
onClickEdit()
This method should be executed when the "edit" direct edit button is clicked.protected 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.protected void
openEditDialog(boolean isNew, java.lang.String mode, org.opencms.ade.contenteditor.shared.CmsEditHandlerData handlerDataForNew)
Opens the content editor.protected void
openWarningDialog()
Shows the delete warning dialog.void
setParentHasDimensions(boolean parentHasDimensions)
Sets the 'parentHasDimensions' flag.void
setPosition(CmsPositionBean position, com.google.gwt.dom.client.Element containerElement)
Sets the position.void
updateVisibility(boolean editableContainer)
Shows or hides the widget depending on the current view and whether the parent element has width or height.-
Methods inherited from class org.opencms.gwt.client.ui.A_CmsDirectEditButtons
activateToolbarContext, addHighlightingAndBar, addMouseOutHandler, addMouseOverHandler, createInfoButton, deactivateToolbarContext, getMarkerTag, highlightElement, isValid, onDeactivate, removeFromParent, removeHighlighting, removeHighlightingAndBar, updateExpiredOverlayPosition
-
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
-
-
-
-
Constructor Detail
-
CmsListCollectorEditor
public CmsListCollectorEditor(com.google.gwt.dom.client.Element editable, java.lang.String parentId)
Creates a new instance.- Parameters:
editable
- the editable elementparentId
- the parent id
-
-
Method Detail
-
createFavButton
public CmsPushButton createFavButton()
Creates the button to add an element to the user's favorites.- Returns:
- the created button
-
isVisibleInCurrentView
public boolean isVisibleInCurrentView()
Returns true if the element view of the element is compatible with the currently set element view in the container page editor.- Returns:
- true if the element should be visible in the current mode
-
setParentHasDimensions
public void setParentHasDimensions(boolean parentHasDimensions)
Sets the 'parentHasDimensions' flag.- Parameters:
parentHasDimensions
- the new value of the flag
-
setPosition
public void setPosition(CmsPositionBean position, com.google.gwt.dom.client.Element containerElement)
Description copied from class:A_CmsDirectEditButtons
Sets the position. Make sure the widget is attached to the DOM.- Overrides:
setPosition
in classA_CmsDirectEditButtons
- Parameters:
position
- the absolute positioncontainerElement
- the parent container element- See Also:
A_CmsDirectEditButtons.setPosition(org.opencms.gwt.client.util.CmsPositionBean, com.google.gwt.dom.client.Element)
-
updateVisibility
public void updateVisibility(boolean editableContainer)
Shows or hides the widget depending on the current view and whether the parent element has width or height.- Parameters:
editableContainer
- true if this list element is part of an element in an editable container
-
defaultNew
protected void defaultNew()
Handles the 'default case' when using the new function on an editable element.
-
deleteElement
protected void deleteElement()
Delete the editable element from page and VFS.
-
getAdditionalButtons
protected java.util.Map<java.lang.Integer,CmsPushButton> getAdditionalButtons()
Description copied from class:A_CmsDirectEditButtons
Returns a map of additional buttons in a map, with the button position as key (buttons will be ordered by their position).- Overrides:
getAdditionalButtons
in classA_CmsDirectEditButtons
- Returns:
- the map of additional buttons
- See Also:
A_CmsDirectEditButtons.getAdditionalButtons()
-
getInfoContext
protected java.util.Map<java.lang.String,java.lang.String> getInfoContext()
Description copied from class:A_CmsDirectEditButtons
Provides context parameters for the resource info dialog.- Overrides:
getInfoContext
in classA_CmsDirectEditButtons
- Returns:
- the map of context parameters
- See Also:
A_CmsDirectEditButtons.getInfoContext()
-
getUploadButtonTitle
protected java.lang.String getUploadButtonTitle(java.lang.String uploadFolder)
Description copied from class:A_CmsDirectEditButtons
Gets the upload button title.- Specified by:
getUploadButtonTitle
in classA_CmsDirectEditButtons
- Parameters:
uploadFolder
- the upload folder- Returns:
- the upload button title
- See Also:
A_CmsDirectEditButtons.getUploadButtonTitle(java.lang.String)
-
onClickDelete
protected void onClickDelete()
Description copied from class:A_CmsDirectEditButtons
This method should be executed when the "delete" direct edit button is clicked.- Specified by:
onClickDelete
in classA_CmsDirectEditButtons
- See Also:
A_CmsDirectEditButtons.onClickDelete()
-
onClickEdit
protected void onClickEdit()
Description copied from class:A_CmsDirectEditButtons
This method should be executed when the "edit" direct edit button is clicked.- Specified by:
onClickEdit
in classA_CmsDirectEditButtons
- See Also:
A_CmsDirectEditButtons.onClickEdit()
-
onClickNew
protected void onClickNew(boolean askCreateMode)
Description copied from class:A_CmsDirectEditButtons
This method should be executed when the "new" direct edit button is clicked.- Specified by:
onClickNew
in classA_CmsDirectEditButtons
- Parameters:
askCreateMode
- true if the user should be asked for the 'content create mode'- See Also:
A_CmsDirectEditButtons.onClickNew(boolean)
-
onClickUpload
protected void onClickUpload()
Description copied from class:A_CmsDirectEditButtons
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.- Overrides:
onClickUpload
in classA_CmsDirectEditButtons
- See Also:
A_CmsDirectEditButtons.onClickUpload()
-
openEditDialog
protected void openEditDialog(boolean isNew, java.lang.String mode, org.opencms.ade.contenteditor.shared.CmsEditHandlerData handlerDataForNew)
Opens the content editor.- Parameters:
isNew
-true
to create and edit a new resourcemode
- the content creation modehandlerDataForNew
- the data for the edit handler if it is used for the 'new' function
-
openWarningDialog
protected void openWarningDialog()
Shows the delete warning dialog.
-
-