Class CmsContainerPageElementPanel
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
- 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_CmsDraggable
- Direct Known Subclasses:
CmsGroupContainerElementPanel
public class CmsContainerPageElementPanel
extends com.google.gwt.user.client.ui.AbsolutePanel
implements I_CmsDraggable, com.google.gwt.event.dom.client.HasClickHandlers, I_CmsInlineFormParent
Content element within a container-page.
- Since:
- 8.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Parses CSS classess of the form 'oc-point-TY_LX', where X and Y are strings of decimal digits possibly preceded by a minus sign.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
Modifier and TypeFieldDescriptionprotected CmsHighlightingBorder
Highlighting border for this element.static final String
Property used to mark an element as belonging to this widget.static final String
The is model group property key.static final String
The former copy model property.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionCmsContainerPageElementPanel
(com.google.gwt.dom.client.Element element, I_CmsDropContainer parent, String clientId, String sitePath, String noEditReason, org.opencms.ade.containerpage.shared.CmsElementLockInfo lockInfo, String title, String subTitle, String resourceType, boolean hasSettings, boolean hasViewPermission, boolean hasWritePermission, boolean releasedAndNotExpired, boolean disableNewEditor, boolean hasEditHandler, org.opencms.util.CmsUUID modelGroupId, boolean wasModelGroup, org.opencms.util.CmsUUID elementView, String iconClasses, boolean isReused) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.event.shared.HandlerRegistration
addClickHandler
(com.google.gwt.event.dom.client.ClickHandler handler) void
adoptWidget
(com.google.gwt.user.client.ui.IsWidget widget) Adopts the given widget as a child widget.protected void
Checks for changes in the list collector direct edit content.com.google.common.base.Optional<int[]>
Gets an optional pair of integers which are to be used as an "offset delta" for the drag and drop process.com.google.gwt.dom.client.Element
getDragHelper
(I_CmsDropTarget target) Creates the drag helper element and attaches it into the DOM.protected List<com.google.gwt.dom.client.Element>
Gets the editable list elements.Returns the option bar of this element.org.opencms.util.CmsUUID
Returns the elements element view.getId()
Returns the draggable id.org.opencms.ade.containerpage.shared.CmsInheritanceInfo
Returns the inheritance info for this element.org.opencms.ade.containerpage.shared.CmsElementLockInfo
Gets the lock information.org.opencms.util.CmsUUID
Returns the model group id.Returns the new element type.Returns the no edit reason.Gets the random id identifying this widget.Returns the parent drop target ornull
if there is none.com.google.gwt.dom.client.Element
getPlaceholder
(I_CmsDropTarget target) Creates the drag placeholder element.boolean
Returns if the element resource is currently released and not expired.Returns the element resource type name.Returns the site-path.org.opencms.util.CmsUUID
Returns the structure id of the element.protected boolean
Returns if the list collector direct edit content has changed.boolean
Indicates an edit handler is configured for the element resource type.boolean
Returns whether this element has a model group parent.boolean
In case the inner HTML contains the reload marker.boolean
Returns true if the element has settings to edit.boolean
Returns if the current user has view permissions for the element resource.boolean
Returns if the user has write permission.void
Hides list collector direct edit buttons, if present.void
Puts a highlighting border around the element.void
initInlineEditor
(CmsContainerpageController controller) Initializes the editor click handler.boolean
Checks if this element has 'createNew' status, i.e.boolean
Returns whether the element is used as a model group.boolean
isNew()
Returns if this is e newly created element.boolean
Returns true if the new content editor is disabled for this element.static boolean
isOverlay
(com.google.gwt.dom.client.Element element) Checks if the element is an overlay for a container page element.boolean
isReused()
Checks if this element is marked as reused.protected void
onDetach()
void
Executed on drag cancel.void
onDrop
(I_CmsDropTarget target) Executed on drop.protected void
onLoad()
void
onStartDrag
(I_CmsDropTarget target) Executed on drag start.protected void
Removes the inline editor handler.void
void
Removes the highlighting border.void
Removes the inline editor.void
replaceHtml
(String html) Replaces the inner HTML of widget to reflect content data changes.void
setCreateNew
(boolean createNew) Sets the 'create new' status of the element.void
setElementOptionBar
(CmsElementOptionBar elementOptionBar) Sets the element option bar.void
Sets the element id.void
setInheritanceInfo
(org.opencms.ade.containerpage.shared.CmsInheritanceInfo inheritanceInfo) Sets the inheritance info for this element.void
setNewType
(String newType) Sets the new-type of the element.void
setNoEditReason
(String noEditReason) Sets the no edit reason.void
setReleasedAndNotExpired
(boolean releasedAndNotExpired) Sets if the element resource is currently released and not expired.void
setSitePath
(String sitePath) Sets the site path.void
setViewPermission
(boolean viewPermission) Sets if the current user has view permissions for the element resource.void
setWritePermission
(boolean writePermission) Sets the user write permission.void
Shows list collector direct edit buttons (old direct edit style), if present.void
Updates the option bar position.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.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
-
Field Details
-
PROP_ELEMENT_OBJECT_ID
Property used to mark an element as belonging to this widget.- See Also:
-
PROP_IS_MODEL_GROUP
The is model group property key.- See Also:
-
PROP_WAS_MODEL_GROUP
The former copy model property.- See Also:
-
m_highlighting
Highlighting border for this element.
-
-
Constructor Details
-
Method Details
-
isOverlay
Checks if the element is an overlay for a container page element.- Parameters:
element
- the element to check- Returns:
- true if the element is an overlay
-
addClickHandler
public com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler) - Specified by:
addClickHandler
in interfacecom.google.gwt.event.dom.client.HasClickHandlers
- See Also:
-
HasClickHandlers.addClickHandler(com.google.gwt.event.dom.client.ClickHandler)
-
adoptWidget
Description copied from interface:I_CmsInlineFormParent
Adopts the given widget as a child widget.This assumes the widget element is already attached to the DOM and is a child or descendant of this widget element.
- Specified by:
adoptWidget
in interfaceI_CmsInlineFormParent
- Parameters:
widget
- the widget to adopt- See Also:
-
getCursorOffsetDelta
Description copied from interface:I_CmsDraggable
Gets an optional pair of integers which are to be used as an "offset delta" for the drag and drop process.- Specified by:
getCursorOffsetDelta
in interfaceI_CmsDraggable
- Returns:
- an optional array containing exactly 2 entries [x,y]
- See Also:
-
getDragHelper
Description copied from interface:I_CmsDraggable
Creates the drag helper element and attaches it into the DOM.- Specified by:
getDragHelper
in interfaceI_CmsDraggable
- Parameters:
target
- the drop target- Returns:
- the drag helper element
- See Also:
-
getElementOptionBar
Returns the option bar of this element.- Returns:
- the option bar widget
-
getElementView
Returns the elements element view.- Returns:
- the element view
-
getId
Description copied from interface:I_CmsDraggable
Returns the draggable id.- Specified by:
getId
in interfaceI_CmsDraggable
- Returns:
- the id
- See Also:
-
getInheritanceInfo
Returns the inheritance info for this element.- Returns:
- the inheritance info for this element
-
getLockInfo
Gets the lock information.- Returns:
- the lock information
-
getModelGroupId
Returns the model group id.- Returns:
- the model group id
-
getNewType
Returns the new element type.- Returns:
- the new element type
-
getNoEditReason
Returns the no edit reason.- Returns:
- the no edit reason
-
getObjectId
Gets the random id identifying this widget.The id is also stored in the element_object_id property of the DOM element for this widget.
- Returns:
- the random id identifying this widget
-
getParentTarget
Description copied from interface:I_CmsDraggable
Returns the parent drop target ornull
if there is none.- Specified by:
getParentTarget
in interfaceI_CmsDraggable
- Returns:
- the parent drop target
- See Also:
-
getPlaceholder
Description copied from interface:I_CmsDraggable
Creates the drag placeholder element.- Specified by:
getPlaceholder
in interfaceI_CmsDraggable
- Parameters:
target
- the drop target- Returns:
- the drag placeholder element
- See Also:
-
getReleasedAndNotExpired
Returns if the element resource is currently released and not expired.- Returns:
true
if the element resource is currently released and not expired
-
getResourceType
Returns the element resource type name.- Returns:
- the resource type name
-
getSitePath
Returns the site-path.- Returns:
- the site-path
-
getStructureId
Returns the structure id of the element.- Returns:
- the structure id of the element
-
hasEditHandler
Indicates an edit handler is configured for the element resource type.- Returns:
- indicates an edit handler is configured for the element resource type
-
hasModelGroupParent
Returns whether this element has a model group parent.- Returns:
true
if this element has a model group parent
-
hasReloadMarker
In case the inner HTML contains the reload marker.- Returns:
true
in case the inner HTML contains the reload marker
-
hasSettings
Returns true if the element has settings to edit.- Returns:
- true if the element has settings to edit
-
hasViewPermission
Returns if the current user has view permissions for the element resource.- Returns:
true
if the current user has view permissions for the element resource
-
hasWritePermission
Returns if the user has write permission.- Returns:
true
if the user has write permission
-
hideEditableListButtons
Hides list collector direct edit buttons, if present. -
highlightElement
Puts a highlighting border around the element. -
initInlineEditor
Initializes the editor click handler.- Parameters:
controller
- the container page controller instance
-
isCreateNew
Checks if this element has 'createNew' status, i.e. will be copied when using this page as a model for a new container page.- Returns:
- true if this element has createNew status
-
isModelGroup
Returns whether the element is used as a model group.- Returns:
true
if the element is used as a model group
-
isNew
Returns if this is e newly created element.- Returns:
true
if the element is new
-
isNewEditorDisabled
Returns true if the new content editor is disabled for this element.- Returns:
- true if the new editor is disabled for this element
-
isReused
Checks if this element is marked as reused.- Returns:
- true if the element is marked as reused
-
onDragCancel
Description copied from interface:I_CmsDraggable
Executed on drag cancel.- Specified by:
onDragCancel
in interfaceI_CmsDraggable
- See Also:
-
onDrop
Description copied from interface:I_CmsDraggable
Executed on drop.- Specified by:
onDrop
in interfaceI_CmsDraggable
- Parameters:
target
- the drop target- See Also:
-
onStartDrag
Description copied from interface:I_CmsDraggable
Executed on drag start.- Specified by:
onStartDrag
in interfaceI_CmsDraggable
- Parameters:
target
- the current drop target- See Also:
-
removeFromParent
- Overrides:
removeFromParent
in classcom.google.gwt.user.client.ui.Widget
- See Also:
-
Widget.removeFromParent()
-
removeHighlighting
Removes the highlighting border. -
removeInlineEditor
Removes the inline editor. -
replaceHtml
Description copied from interface:I_CmsInlineFormParent
Replaces the inner HTML of widget to reflect content data changes.- Specified by:
replaceHtml
in interfaceI_CmsInlineFormParent
- Parameters:
html
- the element HTML- See Also:
-
setCreateNew
Sets the 'create new' status of the element.- Parameters:
createNew
- the new value for the 'create new' status
-
setElementOptionBar
Sets the element option bar.- Parameters:
elementOptionBar
- the element option bar to set
-
setId
Sets the element id.- Parameters:
id
- the id
-
setNewType
Sets the new-type of the element.- Parameters:
newType
- the new-type
-
setNoEditReason
Sets the no edit reason.- Parameters:
noEditReason
- the no edit reason to set
-
setReleasedAndNotExpired
Sets if the element resource is currently released and not expired.- Parameters:
releasedAndNotExpired
-true
if the element resource is currently released and not expired
-
setSitePath
Sets the site path.- Parameters:
sitePath
- the site path to set
-
setViewPermission
Sets if the current user has view permissions for the element resource.- Parameters:
viewPermission
- the view permission to set
-
setWritePermission
Sets the user write permission.- Parameters:
writePermission
- the user write permission to set
-
showEditableListButtons
Shows list collector direct edit buttons (old direct edit style), if present. -
updateOptionBarPosition
Updates the option bar position. -
checkForEditableChanges
Checks for changes in the list collector direct edit content. -
getEditableElements
Gets the editable list elements.- Returns:
- the editable list elements
-
hasChangedEditables
Returns if the list collector direct edit content has changed.- Returns:
true
if the list collector direct edit content has changed
-
onDetach
- Overrides:
onDetach
in classcom.google.gwt.user.client.ui.Widget
- See Also:
-
Widget.onDetach()
-
onLoad
- Overrides:
onLoad
in classcom.google.gwt.user.client.ui.Widget
- See Also:
-
Widget.onLoad()
-
removeEditorHandler
Removes the inline editor handler.
-