Interface I_CmsDropContainer
-
- All Superinterfaces:
I_CmsDropTarget
,I_CmsNestedDropTarget
- All Known Implementing Classes:
CmsContainerPageContainer
,CmsGroupContainerElementPanel
public interface I_CmsDropContainer extends I_CmsNestedDropTarget
Interface for container page drop targets like containers and group-containers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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
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.void
clearDnDChildren()
Clears the list of child drop targets.java.lang.String
getContainerId()
Returns the container id.CmsPositionBean
getPositionInfo()
Returns the current position info.int
getWidgetCount()
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
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
insert(com.google.gwt.user.client.ui.Widget w, int beforeIndex)
Inserts a child widget before the specified index.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.void
onConsumeChildren(java.util.List<CmsContainerPageElementPanel> children)
This is called when the elements of this container/group have been processed into CmsContainerPageElementPanels.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
setPlaceholderVisibility(boolean visible)
Sets the placeholder visibility.void
showEditableListButtons()
Shows list collector direct edit buttons (old direct edit style), if present.void
updatePositionInfo()
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 Detail
-
add
void add(com.google.gwt.user.client.ui.Widget w)
Adds a new child widget.- Parameters:
w
- the widget- See Also:
HasWidgets.add(com.google.gwt.user.client.ui.Widget)
-
addDndChild
void addDndChild(I_CmsDropTarget child)
Registers a child drop target.- Parameters:
child
- the child
-
adoptElement
void adoptElement(CmsContainerPageElementPanel containerElement)
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
java.lang.String getContainerId()
Returns the container id.- Returns:
- the container id
-
getPositionInfo
CmsPositionBean 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
int getWidgetIndex(com.google.gwt.user.client.ui.Widget w)
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
void highlightContainer()
Puts a highlighting border around the container content.
-
highlightContainer
void highlightContainer(CmsPositionBean positionInfo)
Puts a highlighting border around the container content using the given dimensions.- Parameters:
positionInfo
- the highlighting position to use
-
insert
void insert(com.google.gwt.user.client.ui.Widget w, int beforeIndex)
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
void onConsumeChildren(java.util.List<CmsContainerPageElementPanel> children)
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
void refreshHighlighting(CmsPositionBean positionInfo)
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
void setPlaceholderVisibility(boolean visible)
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.
-
-