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.PointPositioningParserNested 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.DebugIdImplEnabledNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidgetNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidgetNested 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_GROUPFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCmsGroupContainerElementPanel(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 TypeMethodDescriptionvoidaddDndChild(I_CmsDropTarget child) Registers a child drop target.voidadoptElement(CmsContainerPageElementPanel containerElement) Adopts a container-page element registering it as a child of this container.voidChecks the maximum number of allowed elements and hides overflowing elements.voidChecks the maximum number of allowed elements and displays formerly hidden elements.booleancheckPosition(int x, int y, CmsDNDHandler.Orientation orientation) Returns true if the given cursor position is over the drop target.voidClears the list of child drop targets.voidClears the editing placeholder reference.Returns the container id.Returns the list of child drop targets.Gets the consumed group elements.intReturns the index of the placeholder or -1 if no placeholder is attached.Returns the current position info.booleanChecks whether this drop target has any children.voidHides list collector direct edit buttons, if present.voidhighlightContainer(boolean addSeparators) Puts a highlighting border around the container content.voidhighlightContainer(CmsPositionBean positionInfo, boolean separators) Puts a highlighting border around the container content using the given dimensions.voidinitInlineEditor(CmsContainerpageController controller) Initializes the editor click handler.voidinsertPlaceholder(com.google.gwt.dom.client.Element placeholder, int x, int y, CmsDNDHandler.Orientation orientation) Inserts a new placeholder.booleanReturnstrueif this container is a detail view only container.booleanReturnstrueif this container is being currently used to display a detail view.booleanReturns if the container is editable by the current user.booleanReturns if this element represents a group container.booleanReturns if this element represents an inherit container.voidonConsumeChildren(List<CmsContainerPageElementPanel> children) This is called when the elements of this container/group have been processed into CmsContainerPageElementPanels.voidonDrop(I_CmsDraggable draggable) Executed on drop.voidRefreshes position and dimension of the highlighting border.voidrefreshHighlighting(CmsPositionBean positionInfo) Refreshes position and dimension of the highlighting border.voidRemoves the highlighting border.voidRemoves the placeholder.voidrepositionPlaceholder(int x, int y, CmsDNDHandler.Orientation orientation) Repositions the placeholder.voidsetContainerId(String containerId) Sets the container id.voidsetEditingMarker(com.google.gwt.dom.client.Element editingMarker) Sets the editing marker.voidsetEditingPlaceholder(com.google.gwt.dom.client.Element editingPlaceholder) Sets the editing placeholder.voidsetPlaceholderVisibility(boolean visible) Sets the placeholder visibility.voidShows list collector direct edit buttons (old direct edit style), if present.voidUpdates the option bar position.voidUpdates 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, setWritePermissionMethods inherited from class com.google.gwt.user.client.ui.AbsolutePanel
add, add, add, getWidgetLeft, getWidgetTop, insert, insert, insert, remove, setWidgetPosition, setWidgetPositionImplMethods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, removeMethods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeMethods 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, unsinkEventsMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEventMethods inherited from interface org.opencms.gwt.client.dnd.I_CmsDraggable
getElementMethods inherited from interface org.opencms.ade.containerpage.client.ui.I_CmsDropContainer
add, getWidgetCount, getWidgetIndex, insertMethods inherited from interface org.opencms.gwt.client.dnd.I_CmsDropTarget
getElementMethods inherited from interface org.opencms.acacia.client.I_CmsInlineFormParent
getElementMethods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, removeMethods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndexMethods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
addMethods 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-trueif 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_CmsDropContainerRegisters a child drop target.- Specified by:
addDndChildin interfaceI_CmsDropContainer- Parameters:
child- the child- See Also:
-
adoptElement
Description copied from interface:I_CmsDropContainerAdopts 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:
adoptElementin interfaceI_CmsDropContainer- Parameters:
containerElement- the element to adopt- See Also:
-
checkMaxElementsOnEnter
Description copied from interface:I_CmsDropContainerChecks the maximum number of allowed elements and hides overflowing elements.- Specified by:
checkMaxElementsOnEnterin interfaceI_CmsDropContainer- See Also:
-
checkMaxElementsOnLeave
Description copied from interface:I_CmsDropContainerChecks the maximum number of allowed elements and displays formerly hidden elements.- Specified by:
checkMaxElementsOnLeavein interfaceI_CmsDropContainer- See Also:
-
checkPosition
Description copied from interface:I_CmsDropTargetReturns true if the given cursor position is over the drop target.- Specified by:
checkPositionin interfaceI_CmsDropTarget- Parameters:
x- the cursor client x positiony- the cursor client y positionorientation- the drag and drop orientation- Returns:
trueif the given cursor position is over the drop target- See Also:
-
clearDnDChildren
Description copied from interface:I_CmsDropContainerClears the list of child drop targets.- Specified by:
clearDnDChildrenin interfaceI_CmsDropContainer- See Also:
-
clearEditingPlaceholder
Clears the editing placeholder reference. -
getContainerId
Returns the container id.- Specified by:
getContainerIdin interfaceI_CmsDropContainer- Returns:
- the container id
-
getDnDChildren
Description copied from interface:I_CmsNestedDropTargetReturns the list of child drop targets.- Specified by:
getDnDChildrenin 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_CmsDropTargetReturns the index of the placeholder or -1 if no placeholder is attached.- Specified by:
getPlaceholderIndexin interfaceI_CmsDropTarget- Returns:
- the index
- See Also:
-
getPositionInfo
Description copied from interface:I_CmsDropContainerReturns the current position info.- Specified by:
getPositionInfoin interfaceI_CmsDropContainer- Returns:
- the position info
- See Also:
-
hasDnDChildren
Description copied from interface:I_CmsNestedDropTargetChecks whether this drop target has any children.- Specified by:
hasDnDChildrenin interfaceI_CmsNestedDropTarget- Returns:
trueif this drop target has any children- See Also:
-
hideEditableListButtons
Description copied from class:CmsContainerPageElementPanelHides list collector direct edit buttons, if present.- Specified by:
hideEditableListButtonsin interfaceI_CmsDropContainer- Overrides:
hideEditableListButtonsin classCmsContainerPageElementPanel- See Also:
-
highlightContainer
Description copied from interface:I_CmsDropContainerPuts a highlighting border around the container content.- Specified by:
highlightContainerin interfaceI_CmsDropContainer- See Also:
-
highlightContainer
Description copied from interface:I_CmsDropContainerPuts a highlighting border around the container content using the given dimensions.- Specified by:
highlightContainerin interfaceI_CmsDropContainer- Parameters:
positionInfo- the highlighting position to use- See Also:
-
initInlineEditor
Description copied from class:CmsContainerPageElementPanelInitializes the editor click handler.- Overrides:
initInlineEditorin 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_CmsDropTargetInserts a new placeholder.- Specified by:
insertPlaceholderin 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_CmsDropContainerReturnstrueif this container is a detail view only container.- Specified by:
isDetailOnlyin interfaceI_CmsDropContainer- Returns:
trueif this container is a detail view only container- See Also:
-
isDetailView
Description copied from interface:I_CmsDropContainerReturnstrueif this container is being currently used to display a detail view.- Specified by:
isDetailViewin interfaceI_CmsDropContainer- Returns:
trueif this container is used to display a detail view- See Also:
-
isEditable
Description copied from interface:I_CmsDropContainerReturns if the container is editable by the current user.- Specified by:
isEditablein interfaceI_CmsDropContainer- Returns:
trueif the container is editable by the current user- See Also:
-
isGroupContainer
Returns if this element represents a group container.- Returns:
trueif this element represents a group container
-
isInheritContainer
Returns if this element represents an inherit container.- Returns:
trueif this element represents an inherit container
-
onConsumeChildren
Description copied from interface:I_CmsDropContainerThis is called when the elements of this container/group have been processed into CmsContainerPageElementPanels.- Specified by:
onConsumeChildrenin interfaceI_CmsDropContainer- Parameters:
children- the processed children- See Also:
-
onDrop
Description copied from interface:I_CmsDropTargetExecuted on drop.- Specified by:
onDropin interfaceI_CmsDropTarget- Parameters:
draggable- the draggable being dropped- See Also:
-
refreshHighlighting
Description copied from interface:I_CmsDropContainerRefreshes position and dimension of the highlighting border. Call when anything changed during the drag process.- Specified by:
refreshHighlightingin interfaceI_CmsDropContainer- See Also:
-
refreshHighlighting
Description copied from interface:I_CmsDropContainerRefreshes position and dimension of the highlighting border. Call when anything changed during the drag process.- Specified by:
refreshHighlightingin interfaceI_CmsDropContainer- Parameters:
positionInfo- the position info to use- See Also:
-
removeHighlighting
Description copied from class:CmsContainerPageElementPanelRemoves the highlighting border.- Specified by:
removeHighlightingin interfaceI_CmsDropContainer- Overrides:
removeHighlightingin classCmsContainerPageElementPanel- See Also:
-
removePlaceholder
Description copied from interface:I_CmsDropTargetRemoves the placeholder.- Specified by:
removePlaceholderin interfaceI_CmsDropTarget- See Also:
-
repositionPlaceholder
Description copied from interface:I_CmsDropTargetRepositions the placeholder.- Specified by:
repositionPlaceholderin 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_CmsDropContainerSets the placeholder visibility.- Specified by:
setPlaceholderVisibilityin interfaceI_CmsDropContainer- Parameters:
visible-trueto set the place holder visible- See Also:
-
showEditableListButtons
Description copied from class:CmsContainerPageElementPanelShows list collector direct edit buttons (old direct edit style), if present.- Specified by:
showEditableListButtonsin interfaceI_CmsDropContainer- Overrides:
showEditableListButtonsin classCmsContainerPageElementPanel- See Also:
-
updateOptionBarPosition
Description copied from class:CmsContainerPageElementPanelUpdates the option bar position.- Overrides:
updateOptionBarPositionin classCmsContainerPageElementPanel- See Also:
-
updatePositionInfo
Description copied from interface:I_CmsDropContainerUpdates the cached position info.- Specified by:
updatePositionInfoin interfaceI_CmsDropContainer- See Also:
-