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
,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
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
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
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionCmsGroupContainerElementPanel
(com.google.gwt.dom.client.Element element, I_CmsDropContainer parent, String clientId, String sitePath, String resourceType, String noEditReason, String title, String subTitle, boolean hasSettings, boolean hasViewPermission, boolean hasWritePermission, boolean releasedAndNotExpired, org.opencms.util.CmsUUID elementView, String iconClasses) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Checks the maximum number of allowed elements and hides overflowing elements.void
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
Clears the list of child drop targets.void
Clears the editing placeholder reference.Returns the container id.Returns the list of child drop targets.Gets the consumed group elements.int
Returns the index of the placeholder or -1 if no placeholder is attached.Returns the current position info.boolean
Checks whether this drop target has any children.void
Hides list collector direct edit buttons, if present.void
highlightContainer
(boolean addSeparators) Puts a highlighting border around the container content.void
highlightContainer
(CmsPositionBean positionInfo, boolean separators) 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
Returnstrue
if this container is a detail view only container.boolean
Returnstrue
if this container is being currently used to display a detail view.boolean
Returns if the container is editable by the current user.boolean
Returns if this element represents a group container.boolean
Returns if this element represents an inherit container.void
onConsumeChildren
(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
Refreshes position and dimension of the highlighting border.void
refreshHighlighting
(CmsPositionBean positionInfo) Refreshes position and dimension of the highlighting border.void
Removes the highlighting border.void
Removes the placeholder.void
repositionPlaceholder
(int x, int y, CmsDNDHandler.Orientation orientation) Repositions the placeholder.void
setContainerId
(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
Shows list collector direct edit buttons (old direct edit style), if present.void
Updates the option bar position.void
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, isReused, 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 com.google.gwt.event.shared.HasHandlers
fireEvent
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
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
-
Constructor Details
-
CmsGroupContainerElementPanel
public CmsGroupContainerElementPanel(com.google.gwt.dom.client.Element element, I_CmsDropContainer parent, String clientId, String sitePath, String resourceType, String noEditReason, String title, String subTitle, boolean hasSettings, boolean hasViewPermission, boolean hasWritePermission, boolean releasedAndNotExpired, org.opencms.util.CmsUUID elementView, 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 Details
-
addDndChild
Description copied from interface:I_CmsDropContainer
Registers a child drop target.- Specified by:
addDndChild
in interfaceI_CmsDropContainer
- Parameters:
child
- the child- See Also:
-
adoptElement
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:
-
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:
-
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:
-
checkPosition
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:
-
clearDnDChildren
Description copied from interface:I_CmsDropContainer
Clears the list of child drop targets.- Specified by:
clearDnDChildren
in interfaceI_CmsDropContainer
- See Also:
-
clearEditingPlaceholder
Clears the editing placeholder reference. -
getContainerId
Returns the container id.- Specified by:
getContainerId
in interfaceI_CmsDropContainer
- Returns:
- the container id
-
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:
-
getGroupChildren
Gets the consumed group elements.- Returns:
- the list of children
-
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:
-
getPositionInfo
Description copied from interface:I_CmsDropContainer
Returns the current position info.- Specified by:
getPositionInfo
in interfaceI_CmsDropContainer
- Returns:
- the position info
- See Also:
-
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:
-
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:
-
highlightContainer
Description copied from interface:I_CmsDropContainer
Puts a highlighting border around the container content.- Specified by:
highlightContainer
in interfaceI_CmsDropContainer
- See Also:
-
org.opencms.ade.containerpage.client.ui.I_CmsDropContainer#highlightContainer()
-
highlightContainer
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:
-
org.opencms.ade.containerpage.client.ui.I_CmsDropContainer#highlightContainer(org.opencms.gwt.client.util.CmsPositionBean)
-
initInlineEditor
Description copied from class:CmsContainerPageElementPanel
Initializes the editor click handler.- Overrides:
initInlineEditor
in classCmsContainerPageElementPanel
- Parameters:
controller
- the container page controller instance- See Also:
-
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:
-
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:
-
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:
-
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:
-
isGroupContainer
Returns if this element represents a group container.- Returns:
true
if this element represents a group container
-
isInheritContainer
Returns if this element represents an inherit container.- Returns:
true
if this element represents an inherit container
-
onConsumeChildren
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:
-
onDrop
Description copied from interface:I_CmsDropTarget
Executed on drop.- Specified by:
onDrop
in interfaceI_CmsDropTarget
- Parameters:
draggable
- the draggable being dropped- See Also:
-
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:
-
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
- Parameters:
positionInfo
- the position info to use- See Also:
-
removeHighlighting
Description copied from class:CmsContainerPageElementPanel
Removes the highlighting border.- Specified by:
removeHighlighting
in interfaceI_CmsDropContainer
- Overrides:
removeHighlighting
in classCmsContainerPageElementPanel
- See Also:
-
removePlaceholder
Description copied from interface:I_CmsDropTarget
Removes the placeholder.- Specified by:
removePlaceholder
in interfaceI_CmsDropTarget
- See Also:
-
repositionPlaceholder
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:
-
setContainerId
Sets the container id.- Parameters:
containerId
- the container id to set
-
setEditingMarker
Sets the editing marker. Used to highlight the container background while editing.- Parameters:
editingMarker
- the editing marker element
-
setEditingPlaceholder
Sets the editing placeholder.- Parameters:
editingPlaceholder
- the editing placeholder element
-
setPlaceholderVisibility
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:
-
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:
-
updateOptionBarPosition
Description copied from class:CmsContainerPageElementPanel
Updates the option bar position.- Overrides:
updateOptionBarPosition
in classCmsContainerPageElementPanel
- See Also:
-
updatePositionInfo
Description copied from interface:I_CmsDropContainer
Updates the cached position info.- Specified by:
updatePositionInfo
in interfaceI_CmsDropContainer
- See Also:
-