Class CmsGroupContainerElementPanel
- 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.AbsolutePanel
-
- org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel
-
- org.opencms.ade.containerpage.client.ui.CmsGroupContainerElementPanel
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasClickHandlers
,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_CmsInlineFormParent
,I_CmsDropContainer
,I_CmsDraggable
,I_CmsDropTarget
,I_CmsNestedDropTarget
public class CmsGroupContainerElementPanel extends CmsContainerPageElementPanel implements I_CmsDropContainer
Group-container element. To be used for content elements within a container-page.The group-container acts as a draggable element and if edited as a container.
- Since:
- 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel
CmsContainerPageElementPanel.PointPositioningParser
-
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.ade.containerpage.client.ui.CmsContainerPageElementPanel
m_highlighting, PROP_ELEMENT_OBJECT_ID, PROP_IS_MODEL_GROUP, PROP_WAS_MODEL_GROUP
-
-
Constructor Summary
Constructors Constructor Description CmsGroupContainerElementPanel(com.google.gwt.dom.client.Element element, I_CmsDropContainer parent, java.lang.String clientId, java.lang.String sitePath, java.lang.String resourceType, java.lang.String noEditReason, java.lang.String title, java.lang.String subTitle, boolean hasSettings, boolean hasViewPermission, boolean hasWritePermission, boolean releasedAndNotExpired, org.opencms.util.CmsUUID elementView, java.lang.String iconClasses)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDndChild(I_CmsDropTarget child)
Registers a child drop target.void
adoptElement(CmsContainerPageElementPanel containerElement)
Adopts a container-page element registering it as a child of this container.void
checkMaxElementsOnEnter()
Checks the maximum number of allowed elements and hides overflowing elements.void
checkMaxElementsOnLeave()
Checks the maximum number of allowed elements and displays formerly hidden elements.boolean
checkPosition(int x, int y, CmsDNDHandler.Orientation orientation)
Returns true if the given cursor position is over the drop target.void
clearDnDChildren()
Clears the list of child drop targets.void
clearEditingPlaceholder()
Clears the editing placeholder reference.java.lang.String
getContainerId()
Returns the container id.java.util.List<I_CmsDropTarget>
getDnDChildren()
Returns the list of child drop targets.java.util.List<CmsContainerPageElementPanel>
getGroupChildren()
Gets the consumed group elements.int
getPlaceholderIndex()
Returns the index of the placeholder or -1 if no placeholder is attached.CmsPositionBean
getPositionInfo()
Returns the current position info.boolean
hasDnDChildren()
Checks whether this drop target has any children.void
hideEditableListButtons()
Hides list collector direct edit buttons, if present.void
highlightContainer()
Puts a highlighting border around the container content.void
highlightContainer(CmsPositionBean positionInfo)
Puts a highlighting border around the container content using the given dimensions.void
initInlineEditor(CmsContainerpageController controller)
Initializes the editor click handler.void
insertPlaceholder(com.google.gwt.dom.client.Element placeholder, int x, int y, CmsDNDHandler.Orientation orientation)
Inserts a new placeholder.boolean
isDetailOnly()
Returnstrue
if this container is a detail view only container.boolean
isDetailView()
Returnstrue
if this container is being currently used to display a detail view.boolean
isEditable()
Returns if the container is editable by the current user.boolean
isGroupContainer()
Returns if this element represents a group container.boolean
isInheritContainer()
Returns if this element represents an inherit container.void
onConsumeChildren(java.util.List<CmsContainerPageElementPanel> children)
This is called when the elements of this container/group have been processed into CmsContainerPageElementPanels.void
onDrop(I_CmsDraggable draggable)
Executed on drop.void
refreshHighlighting()
Refreshes position and dimension of the highlighting border.void
refreshHighlighting(CmsPositionBean positionInfo)
Refreshes position and dimension of the highlighting border.void
removeHighlighting()
Removes the highlighting border.void
removePlaceholder()
Removes the placeholder.void
repositionPlaceholder(int x, int y, CmsDNDHandler.Orientation orientation)
Repositions the placeholder.void
setContainerId(java.lang.String containerId)
Sets the container id.void
setEditingMarker(com.google.gwt.dom.client.Element editingMarker)
Sets the editing marker.void
setEditingPlaceholder(com.google.gwt.dom.client.Element editingPlaceholder)
Sets the editing placeholder.void
setPlaceholderVisibility(boolean visible)
Sets the placeholder visibility.void
showEditableListButtons()
Shows list collector direct edit buttons (old direct edit style), if present.void
updateOptionBarPosition()
Updates the option bar position.void
updatePositionInfo()
Updates the cached position info.-
Methods inherited from class org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel
addClickHandler, adoptWidget, checkForEditableChanges, getCursorOffsetDelta, getDragHelper, getEditableElements, getElementOptionBar, getElementView, getId, getInheritanceInfo, getLockInfo, getModelGroupId, getNewType, getNoEditReason, getObjectId, getParentTarget, getPlaceholder, getReleasedAndNotExpired, getResourceType, getSitePath, getStructureId, hasChangedEditables, hasEditHandler, hasModelGroupParent, hasReloadMarker, hasSettings, hasViewPermission, hasWritePermission, highlightElement, isCreateNew, isModelGroup, isNew, isNewEditorDisabled, isOverlay, onDetach, onDragCancel, onDrop, onLoad, onStartDrag, removeEditorHandler, removeFromParent, removeInlineEditor, replaceHtml, setCreateNew, setElementOptionBar, setId, setInheritanceInfo, setNewType, setNoEditReason, setReleasedAndNotExpired, setSitePath, setViewPermission, setWritePermission
-
Methods inherited from class com.google.gwt.user.client.ui.AbsolutePanel
add, add, add, getWidgetLeft, getWidgetTop, insert, insert, insert, remove, setWidgetPosition, setWidgetPositionImpl
-
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
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, 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, 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 org.opencms.gwt.client.dnd.I_CmsDraggable
getElement
-
Methods inherited from interface org.opencms.ade.containerpage.client.ui.I_CmsDropContainer
add, getWidgetCount, getWidgetIndex, insert
-
Methods inherited from interface org.opencms.gwt.client.dnd.I_CmsDropTarget
getElement
-
Methods inherited from interface org.opencms.acacia.client.I_CmsInlineFormParent
getElement
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
-
-
-
-
Constructor Detail
-
CmsGroupContainerElementPanel
public CmsGroupContainerElementPanel(com.google.gwt.dom.client.Element element, I_CmsDropContainer parent, java.lang.String clientId, java.lang.String sitePath, java.lang.String resourceType, java.lang.String noEditReason, java.lang.String title, java.lang.String subTitle, boolean hasSettings, boolean hasViewPermission, boolean hasWritePermission, boolean releasedAndNotExpired, org.opencms.util.CmsUUID elementView, java.lang.String iconClasses)
Constructor.- Parameters:
element
- the DOM elementparent
- the drag parentclientId
- the client idsitePath
- the element site-pathresourceType
- the resource type namenoEditReason
- the no edit reason, if empty, editing is allowedtitle
- the resource titlesubTitle
- the sub titlehasSettings
- should be true if the element has settings which can be editedhasViewPermission
- indicates if the current user has view permissions on the element resourcehasWritePermission
- indicates if the current user has write permissions on the element resourcereleasedAndNotExpired
-true
if the element resource is currently released and not expiredelementView
- the element view of the elementiconClasses
- the resource type icon CSS classes
-
-
Method Detail
-
addDndChild
public void addDndChild(I_CmsDropTarget child)
Description copied from interface:I_CmsDropContainer
Registers a child drop target.- Specified by:
addDndChild
in interfaceI_CmsDropContainer
- Parameters:
child
- the child- See Also:
I_CmsDropContainer.addDndChild(org.opencms.gwt.client.dnd.I_CmsDropTarget)
-
adoptElement
public void adoptElement(CmsContainerPageElementPanel containerElement)
Description copied from interface:I_CmsDropContainer
Adopts a container-page element registering it as a child of this container. Used for elements that are already child nodes of the container-element node in DOM.- Specified by:
adoptElement
in interfaceI_CmsDropContainer
- Parameters:
containerElement
- the element to adopt- See Also:
I_CmsDropContainer.adoptElement(org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel)
-
checkMaxElementsOnEnter
public void checkMaxElementsOnEnter()
Description copied from interface:I_CmsDropContainer
Checks the maximum number of allowed elements and hides overflowing elements.- Specified by:
checkMaxElementsOnEnter
in interfaceI_CmsDropContainer
- See Also:
I_CmsDropContainer.checkMaxElementsOnEnter()
-
checkMaxElementsOnLeave
public void checkMaxElementsOnLeave()
Description copied from interface:I_CmsDropContainer
Checks the maximum number of allowed elements and displays formerly hidden elements.- Specified by:
checkMaxElementsOnLeave
in interfaceI_CmsDropContainer
- See Also:
I_CmsDropContainer.checkMaxElementsOnLeave()
-
checkPosition
public boolean checkPosition(int x, int y, CmsDNDHandler.Orientation orientation)
Description copied from interface:I_CmsDropTarget
Returns true if the given cursor position is over the drop target.- Specified by:
checkPosition
in interfaceI_CmsDropTarget
- Parameters:
x
- the cursor client x positiony
- the cursor client y positionorientation
- the drag and drop orientation- Returns:
true
if the given cursor position is over the drop target- See Also:
I_CmsDropTarget.checkPosition(int, int, Orientation)
-
clearDnDChildren
public void clearDnDChildren()
Description copied from interface:I_CmsDropContainer
Clears the list of child drop targets.- Specified by:
clearDnDChildren
in interfaceI_CmsDropContainer
- See Also:
I_CmsDropContainer.clearDnDChildren()
-
clearEditingPlaceholder
public void clearEditingPlaceholder()
Clears the editing placeholder reference.
-
getContainerId
public java.lang.String getContainerId()
Returns the container id.- Specified by:
getContainerId
in interfaceI_CmsDropContainer
- Returns:
- the container id
-
getDnDChildren
public java.util.List<I_CmsDropTarget> getDnDChildren()
Description copied from interface:I_CmsNestedDropTarget
Returns the list of child drop targets.- Specified by:
getDnDChildren
in interfaceI_CmsNestedDropTarget
- Returns:
- the child drop targets
- See Also:
I_CmsNestedDropTarget.getDnDChildren()
-
getGroupChildren
public java.util.List<CmsContainerPageElementPanel> getGroupChildren()
Gets the consumed group elements.- Returns:
- the list of children
-
getPlaceholderIndex
public int getPlaceholderIndex()
Description copied from interface:I_CmsDropTarget
Returns the index of the placeholder or -1 if no placeholder is attached.- Specified by:
getPlaceholderIndex
in interfaceI_CmsDropTarget
- Returns:
- the index
- See Also:
I_CmsDropTarget.getPlaceholderIndex()
-
getPositionInfo
public CmsPositionBean getPositionInfo()
Description copied from interface:I_CmsDropContainer
Returns the current position info.- Specified by:
getPositionInfo
in interfaceI_CmsDropContainer
- Returns:
- the position info
- See Also:
I_CmsDropContainer.getPositionInfo()
-
hasDnDChildren
public boolean hasDnDChildren()
Description copied from interface:I_CmsNestedDropTarget
Checks whether this drop target has any children.- Specified by:
hasDnDChildren
in interfaceI_CmsNestedDropTarget
- Returns:
true
if this drop target has any children- See Also:
I_CmsNestedDropTarget.hasDnDChildren()
-
hideEditableListButtons
public void hideEditableListButtons()
Description copied from class:CmsContainerPageElementPanel
Hides list collector direct edit buttons, if present.- Specified by:
hideEditableListButtons
in interfaceI_CmsDropContainer
- Overrides:
hideEditableListButtons
in classCmsContainerPageElementPanel
- See Also:
CmsContainerPageElementPanel.hideEditableListButtons()
-
highlightContainer
public void highlightContainer()
Description copied from interface:I_CmsDropContainer
Puts a highlighting border around the container content.- Specified by:
highlightContainer
in interfaceI_CmsDropContainer
- See Also:
I_CmsDropContainer.highlightContainer()
-
highlightContainer
public void highlightContainer(CmsPositionBean positionInfo)
Description copied from interface:I_CmsDropContainer
Puts a highlighting border around the container content using the given dimensions.- Specified by:
highlightContainer
in interfaceI_CmsDropContainer
- Parameters:
positionInfo
- the highlighting position to use- See Also:
I_CmsDropContainer.highlightContainer(org.opencms.gwt.client.util.CmsPositionBean)
-
initInlineEditor
public void initInlineEditor(CmsContainerpageController controller)
Description copied from class:CmsContainerPageElementPanel
Initializes the editor click handler.- Overrides:
initInlineEditor
in classCmsContainerPageElementPanel
- Parameters:
controller
- the container page controller instance- See Also:
CmsContainerPageElementPanel.initInlineEditor(org.opencms.ade.containerpage.client.CmsContainerpageController)
-
insertPlaceholder
public void insertPlaceholder(com.google.gwt.dom.client.Element placeholder, int x, int y, CmsDNDHandler.Orientation orientation)
Description copied from interface:I_CmsDropTarget
Inserts a new placeholder.- Specified by:
insertPlaceholder
in interfaceI_CmsDropTarget
- Parameters:
placeholder
- the placeholder elementx
- the cursor client x positiony
- the cursor client y positionorientation
- the drag and drop orientation- See Also:
I_CmsDropTarget.insertPlaceholder(com.google.gwt.dom.client.Element, int, int, Orientation)
-
isDetailOnly
public boolean isDetailOnly()
Description copied from interface:I_CmsDropContainer
Returnstrue
if this container is a detail view only container.- Specified by:
isDetailOnly
in interfaceI_CmsDropContainer
- Returns:
true
if this container is a detail view only container- See Also:
I_CmsDropContainer.isDetailOnly()
-
isDetailView
public boolean isDetailView()
Description copied from interface:I_CmsDropContainer
Returnstrue
if this container is being currently used to display a detail view.- Specified by:
isDetailView
in interfaceI_CmsDropContainer
- Returns:
true
if this container is used to display a detail view- See Also:
I_CmsDropContainer.isDetailView()
-
isEditable
public boolean isEditable()
Description copied from interface:I_CmsDropContainer
Returns if the container is editable by the current user.- Specified by:
isEditable
in interfaceI_CmsDropContainer
- Returns:
true
if the container is editable by the current user- See Also:
I_CmsDropContainer.isEditable()
-
isGroupContainer
public boolean isGroupContainer()
Returns if this element represents a group container.- Returns:
true
if this element represents a group container
-
isInheritContainer
public boolean isInheritContainer()
Returns if this element represents an inherit container.- Returns:
true
if this element represents an inherit container
-
onConsumeChildren
public void onConsumeChildren(java.util.List<CmsContainerPageElementPanel> children)
Description copied from interface:I_CmsDropContainer
This is called when the elements of this container/group have been processed into CmsContainerPageElementPanels.- Specified by:
onConsumeChildren
in interfaceI_CmsDropContainer
- Parameters:
children
- the processed children- See Also:
I_CmsDropContainer.onConsumeChildren(java.util.List)
-
onDrop
public void onDrop(I_CmsDraggable draggable)
Description copied from interface:I_CmsDropTarget
Executed on drop.- Specified by:
onDrop
in interfaceI_CmsDropTarget
- Parameters:
draggable
- the draggable being dropped- See Also:
I_CmsDropTarget.onDrop(org.opencms.gwt.client.dnd.I_CmsDraggable)
-
refreshHighlighting
public void refreshHighlighting()
Description copied from interface:I_CmsDropContainer
Refreshes position and dimension of the highlighting border. Call when anything changed during the drag process.- Specified by:
refreshHighlighting
in interfaceI_CmsDropContainer
- See Also:
I_CmsDropContainer.refreshHighlighting()
-
refreshHighlighting
public void refreshHighlighting(CmsPositionBean positionInfo)
Description copied from interface:I_CmsDropContainer
Refreshes position and dimension of the highlighting border. Call when anything changed during the drag process.- Specified by:
refreshHighlighting
in interfaceI_CmsDropContainer
- Parameters:
positionInfo
- the position info to use- See Also:
I_CmsDropContainer.refreshHighlighting(org.opencms.gwt.client.util.CmsPositionBean)
-
removeHighlighting
public void removeHighlighting()
Description copied from class:CmsContainerPageElementPanel
Removes the highlighting border.- Specified by:
removeHighlighting
in interfaceI_CmsDropContainer
- Overrides:
removeHighlighting
in classCmsContainerPageElementPanel
- See Also:
CmsContainerPageElementPanel.removeHighlighting()
-
removePlaceholder
public void removePlaceholder()
Description copied from interface:I_CmsDropTarget
Removes the placeholder.- Specified by:
removePlaceholder
in interfaceI_CmsDropTarget
- See Also:
I_CmsDropTarget.removePlaceholder()
-
repositionPlaceholder
public void repositionPlaceholder(int x, int y, CmsDNDHandler.Orientation orientation)
Description copied from interface:I_CmsDropTarget
Repositions the placeholder.- Specified by:
repositionPlaceholder
in interfaceI_CmsDropTarget
- Parameters:
x
- the cursor client x positiony
- the cursor client y positionorientation
- the drag and drop orientation- See Also:
I_CmsDropTarget.repositionPlaceholder(int, int, Orientation)
-
setContainerId
public void setContainerId(java.lang.String containerId)
Sets the container id.- Parameters:
containerId
- the container id to set
-
setEditingMarker
public void setEditingMarker(com.google.gwt.dom.client.Element editingMarker)
Sets the editing marker. Used to highlight the container background while editing.- Parameters:
editingMarker
- the editing marker element
-
setEditingPlaceholder
public void setEditingPlaceholder(com.google.gwt.dom.client.Element editingPlaceholder)
Sets the editing placeholder.- Parameters:
editingPlaceholder
- the editing placeholder element
-
setPlaceholderVisibility
public void setPlaceholderVisibility(boolean visible)
Description copied from interface:I_CmsDropContainer
Sets the placeholder visibility.- Specified by:
setPlaceholderVisibility
in interfaceI_CmsDropContainer
- Parameters:
visible
-true
to set the place holder visible- See Also:
I_CmsDropContainer.setPlaceholderVisibility(boolean)
-
showEditableListButtons
public void showEditableListButtons()
Description copied from class:CmsContainerPageElementPanel
Shows list collector direct edit buttons (old direct edit style), if present.- Specified by:
showEditableListButtons
in interfaceI_CmsDropContainer
- Overrides:
showEditableListButtons
in classCmsContainerPageElementPanel
- See Also:
CmsContainerPageElementPanel.showEditableListButtons()
-
updateOptionBarPosition
public void updateOptionBarPosition()
Description copied from class:CmsContainerPageElementPanel
Updates the option bar position.- Overrides:
updateOptionBarPosition
in classCmsContainerPageElementPanel
- See Also:
CmsContainerPageElementPanel.updateOptionBarPosition()
-
updatePositionInfo
public void updatePositionInfo()
Description copied from interface:I_CmsDropContainer
Updates the cached position info.- Specified by:
updatePositionInfo
in interfaceI_CmsDropContainer
- See Also:
I_CmsDropContainer.updatePositionInfo()
-
-