Class CmsContainerPageContainer
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
org.opencms.ade.containerpage.client.ui.CmsContainerPageContainer
- All Implemented Interfaces:
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.IsWidget,Iterable<com.google.gwt.user.client.ui.Widget>,I_CmsDropContainer,I_CmsDropTarget,I_CmsNestedDropTarget
public class CmsContainerPageContainer
extends com.google.gwt.user.client.ui.ComplexPanel
implements I_CmsDropContainer
Container page container.
- Since:
- 8.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper class for resizing containers in the drag/drop process when an element is dropped into them that is of lower height than the empty container HTML.protected classElement position info class.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.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.ForIsWidget -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of a special property for the container id.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCmsContainerPageContainer(org.opencms.ade.containerpage.shared.CmsContainer containerData, com.google.gwt.dom.client.Element element) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(com.google.gwt.user.client.ui.Widget w) Adds a new child widget.voidaddDndChild(I_CmsDropTarget child) Registers a child drop target.voidadoptElement(CmsContainerPageElementPanel containerElement) Adopts a container-page element registering it as a child of this container.voidCheck if the empty container content should be displayed or removed.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.static voidClears the static layout change object, resetting it if it's not null.Returns all contained drag elements.intReturns the configured width for this container.Returns the container id.intReturns the container level.Returns the container type.In case of a former copy model, and a max elements setting of one, the id of the overflowing element is returned.Returns the list of child drop targets.com.google.gwt.dom.client.ElementReturns whether this container has a model group parent.Gets the highlighting widget for the container.Returns the parent container id.intReturns the index of the placeholder or -1 if no placeholder is attached.Returns the current position info.Returns the settings presets.booleanChecks whether this drop target has any children.booleanReturns whether this container has a model group parent.voidHides list collector direct edit buttons, if present.voidhighlightContainer(boolean addSeparators) Puts a highlighting border around the container content.voidhighlightContainer(CmsPositionBean positionInfo, boolean addSeparators) Puts a highlighting border around the container content using the given dimensions.voidinsert(com.google.gwt.user.client.ui.Widget w, int beforeIndex) Inserts a child widget before the specified index.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.booleanReturns true if this is a detail view container, being actually used for detail content.booleanChecks if this is a detail view container.booleanReturns if the container is editable by the current user.booleanChecks if the container is showing the empty container element.static intmeasureHeight(com.google.gwt.dom.client.Element elem) Measures the height of the container's element.newResizeHelper(CmsContainerPageContainer container) Creates a new layout helper for resizing containers.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.voidsetContainerLevel(int level) Sets the container level.voidsetEmptyContainerElement(com.google.gwt.dom.client.Element emptyContainerElement) Sets the empty container element.Measures the height of the container and sets its min-height to that value.voidsetPlaceholderIndex(int index) voidsetPlaceholderVisibility(boolean visible) Sets the placeholder visibility.voidShows list collector direct edit buttons (old direct edit style), if present.voidUpdates the option bar positions of the child elements.voidUpdates the cached position info.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, 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, onDetach, onLoad, onUnload, removeFromParent, 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 org.opencms.ade.containerpage.client.ui.I_CmsDropContainer
getWidgetCount, getWidgetIndexMethods inherited from interface org.opencms.gwt.client.dnd.I_CmsDropTarget
getElementMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
PROP_CONTAINER_MARKER
Name of a special property for the container id.- See Also:
-
-
Constructor Details
-
Method Details
-
clearResizeHelper
Clears the static layout change object, resetting it if it's not null. -
measureHeight
Measures the height of the container's element. This sets the overflow-y style property to auto to prevent margin collapsing.- Parameters:
elem- the element- Returns:
- the height
-
newResizeHelper
public static CmsContainerPageContainer.ContainerResizeHelper newResizeHelper(CmsContainerPageContainer container) Creates a new layout helper for resizing containers.The previously created layout changes object (if any) will be reset.
- Parameters:
container- the container- Returns:
- the new layout helper
-
add
Description copied from interface:I_CmsDropContainerAdds a new child widget.- Specified by:
addin interfacecom.google.gwt.user.client.ui.HasWidgets- Specified by:
addin interfaceI_CmsDropContainer- Overrides:
addin classcom.google.gwt.user.client.ui.Panel- Parameters:
w- the widget- See Also:
-
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:
-
checkEmptyContainers
Check if the empty container content should be displayed or removed. -
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:
-
getAllDragElements
Returns all contained drag elements.- Returns:
- the drag elements
-
getConfiguredWidth
Returns the configured width for this container.- Returns:
- the configured width
-
getContainerId
Returns the container id.- Specified by:
getContainerIdin interfaceI_CmsDropContainer- Returns:
- the container id
-
getContainerLevel
Returns the container level.- Returns:
- the container level
-
getContainerType
Returns the container type.- Returns:
- the container type
-
getCopyModelReplaceId
In case of a former copy model, and a max elements setting of one, the id of the overflowing element is returned.- Returns:
- the overflowing element id or
null
-
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:
-
getFormerModelGroupParent
Returns whether this container has a model group parent.- Returns:
trueif this container has a model group parent
-
getHighlighting
Gets the highlighting widget for the container.- Returns:
- the highlighting widget
-
getParentContainerId
Returns the parent container id.- Returns:
- the container parent id
-
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:
-
getSettingPresets
Returns the settings presets.- Returns:
- the presets
-
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:
-
hasModelGroupParent
Returns whether this container has a model group parent.- Returns:
trueif this container has a model group parent
-
hideEditableListButtons
Description copied from interface:I_CmsDropContainerHides list collector direct edit buttons, if present.- Specified by:
hideEditableListButtonsin interfaceI_CmsDropContainer- See Also:
-
highlightContainer
Puts a highlighting border around the container content.- Specified by:
highlightContainerin interfaceI_CmsDropContainer
-
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:
-
insert
Description copied from interface:I_CmsDropContainerInserts a child widget before the specified index. If the widget is already a child of this panel, it will be moved to the specified index.- Specified by:
insertin interfaceI_CmsDropContainer- Parameters:
w- the new childbeforeIndex- the before index- 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
Returns true if this is a detail view container, being actually used for detail content.- Specified by:
isDetailViewin interfaceI_CmsDropContainer- Returns:
- true if this is a detail view container
-
isDetailViewContainer
Checks if this is a detail view container.- Returns:
- true if this is a detail view container
-
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:
-
isShowingEmptyContainerElement
Checks if the container is showing the empty container element.- Returns:
- true if the empty container element is shown in the 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
Refreshes position and dimension of the highlighting border. Call when anything changed during the drag process.- Specified by:
refreshHighlightingin interfaceI_CmsDropContainer
-
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
Removes the highlighting border.- Specified by:
removeHighlightingin interfaceI_CmsDropContainer
-
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:
-
setContainerLevel
Sets the container level.- Parameters:
level- the container level
-
setEmptyContainerElement
Sets the empty container element.- Parameters:
emptyContainerElement- the empty container element
-
setMinHeightToCurrentHeight
Measures the height of the container and sets its min-height to that value.- Returns:
- a runnable used to undo the style changes
-
setPlaceholderIndex
-
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 interface:I_CmsDropContainerShows list collector direct edit buttons (old direct edit style), if present.- Specified by:
showEditableListButtonsin interfaceI_CmsDropContainer- See Also:
-
updateOptionBars
Updates the option bar positions of the child elements. -
updatePositionInfo
Description copied from interface:I_CmsDropContainerUpdates the cached position info.- Specified by:
updatePositionInfoin interfaceI_CmsDropContainer- See Also:
-