Interface I_CmsDropContainer
- All Superinterfaces:
I_CmsDropTarget
,I_CmsNestedDropTarget
- All Known Implementing Classes:
CmsContainerPageContainer
,CmsGroupContainerElementPanel
Interface for container page drop targets like containers and group-containers.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(com.google.gwt.user.client.ui.Widget w) Adds a new child widget.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
Checks the maximum number of allowed elements and hides overflowing elements.void
Checks the maximum number of allowed elements and displays formerly hidden elements.void
Clears the list of child drop targets.Returns the container id.Returns the current position info.int
Gets the number of child widgets in this panel.int
getWidgetIndex
(com.google.gwt.user.client.ui.Widget w) Gets the index of the specified child widget.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 addSeparators) Puts a highlighting border around the container content using the given dimensions.void
insert
(com.google.gwt.user.client.ui.Widget w, int beforeIndex) Inserts a child widget before the specified index.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.void
onConsumeChildren
(List<CmsContainerPageElementPanel> children) This is called when the elements of this container/group have been processed into CmsContainerPageElementPanels.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
setPlaceholderVisibility
(boolean visible) Sets the placeholder visibility.void
Shows list collector direct edit buttons (old direct edit style), if present.void
Updates the cached position info.Methods inherited from interface org.opencms.gwt.client.dnd.I_CmsDropTarget
checkPosition, getElement, getPlaceholderIndex, insertPlaceholder, onDrop, removePlaceholder, repositionPlaceholder
Methods inherited from interface org.opencms.gwt.client.dnd.I_CmsNestedDropTarget
getDnDChildren, hasDnDChildren
-
Method Details
-
add
Adds a new child widget.- Parameters:
w
- the widget- See Also:
-
HasWidgets.add(com.google.gwt.user.client.ui.Widget)
-
addDndChild
Registers a child drop target.- Parameters:
child
- the child
-
adoptElement
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.- Parameters:
containerElement
- the element to adopt
-
checkMaxElementsOnEnter
void checkMaxElementsOnEnter()Checks the maximum number of allowed elements and hides overflowing elements. -
checkMaxElementsOnLeave
void checkMaxElementsOnLeave()Checks the maximum number of allowed elements and displays formerly hidden elements. -
clearDnDChildren
void clearDnDChildren()Clears the list of child drop targets. -
getContainerId
Returns the container id.- Returns:
- the container id
-
getPositionInfo
Returns the current position info.- Returns:
- the position info
-
getWidgetCount
int getWidgetCount()Gets the number of child widgets in this panel.- Returns:
- the number of child widgets
-
getWidgetIndex
Gets the index of the specified child widget.- Parameters:
w
- the widget- Returns:
- the index
-
hideEditableListButtons
void hideEditableListButtons()Hides list collector direct edit buttons, if present. -
highlightContainer
Puts a highlighting border around the container content. -
highlightContainer
Puts a highlighting border around the container content using the given dimensions.- Parameters:
positionInfo
- the highlighting position to use
-
insert
Inserts 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.- Parameters:
w
- the new childbeforeIndex
- the before index
-
isDetailOnly
boolean isDetailOnly()Returnstrue
if this container is a detail view only container.- Returns:
true
if this container is a detail view only container
-
isDetailView
boolean isDetailView()Returnstrue
if this container is being currently used to display a detail view.- Returns:
true
if this container is used to display a detail view
-
isEditable
boolean isEditable()Returns if the container is editable by the current user.- Returns:
true
if the container is editable by the current user
-
onConsumeChildren
This is called when the elements of this container/group have been processed into CmsContainerPageElementPanels.- Parameters:
children
- the processed children
-
refreshHighlighting
void refreshHighlighting()Refreshes position and dimension of the highlighting border. Call when anything changed during the drag process. -
refreshHighlighting
Refreshes position and dimension of the highlighting border. Call when anything changed during the drag process.- Parameters:
positionInfo
- the position info to use
-
removeHighlighting
void removeHighlighting()Removes the highlighting border. -
setPlaceholderVisibility
Sets the placeholder visibility.- Parameters:
visible
-true
to set the place holder visible
-
showEditableListButtons
void showEditableListButtons()Shows list collector direct edit buttons (old direct edit style), if present. -
updatePositionInfo
void updatePositionInfo()Updates the cached position info.
-