Package org.opencms.ade.sitemap.client
Class CmsSitemapTreeItem
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.gwt.client.ui.CmsListItem
org.opencms.gwt.client.ui.tree.CmsTreeItem
org.opencms.gwt.client.ui.tree.CmsLazyTreeItem
org.opencms.ade.sitemap.client.CmsSitemapTreeItem
- 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.IsRenderable,com.google.gwt.user.client.ui.IsWidget,I_CmsDraggable,I_CmsListItem,I_CmsTruncable
Sitemap entry tree item implementation.
- Since:
- 8.0.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classLabel generator for the detail page info label.Nested classes/interfaces inherited from class org.opencms.gwt.client.ui.tree.CmsLazyTreeItem
CmsLazyTreeItem.LoadingItem, CmsLazyTreeItem.LoadStateNested classes/interfaces inherited from class org.opencms.gwt.client.ui.CmsListItem
CmsListItem.MoveHandleNested 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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.opencms.util.CmsUUIDThe current sitemap entry id.Fields inherited from class org.opencms.gwt.client.ui.tree.CmsTreeItem
ANIMATION_DURATION, m_children, m_openerFields inherited from class org.opencms.gwt.client.ui.CmsListItem
m_checkbox, m_decoratedPanel, m_decorationWidgets, m_decorationWidth, m_id, m_listItemWidget, m_mainWidget, m_panel, m_placeholder, m_provisionalParent, MOVE_HANDLE_MARKER_CLASSFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCmsSitemapTreeItem(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidHelper method to add an additional info bean to a list.protected com.google.gwt.user.client.ui.WidgetHelper method for adding the marker widget.getDisplayedUrl(String sitePath) Given the path of a sitemap entry, this method returns the URL which should be displayed to the user.com.google.gwt.dom.client.ElementgetDragHelper(I_CmsDropTarget target) Creates the drag helper element and attaches it into the DOM.org.opencms.util.CmsUUIDReturns the entry id.static CmsSitemapTreeItemgetItemById(org.opencms.util.CmsUUID id) Looks up a sitemap tree item by entry id.Returns the move handle.protected StringReturn the name of this item, which can differ from the entry name for root nodes.getPath()Returns the path of IDs for the this item.org.opencms.ade.sitemap.shared.CmsClientSitemapEntryReturns the sitemap entry.Returns the site path.voidhighlight(boolean highlightOn) Turns the highlighting for this item on or off.voidhighlightTemporarily(int duration, CmsListItemWidget.Background background) Temporarily highlights an item.booleanChecks if dropping is enabled.protected voidHelper method which is called when the list of children changes.voidExecuted on drag cancel.voidonDrop(I_CmsDropTarget target) Executed on drop.voidonStartDrag(I_CmsDropTarget target) Executed on drag start.protected voidHelper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry.voidResets entry appearance.voidsetBackgroundColor(CmsListItemWidget.Background background) Sets the background color of the list item widget.voidsetStateIcon(org.opencms.gwt.shared.CmsListInfoBean.StateIcon icon) Sets the icon.toString()voidUpdates the detail page description.voidUpdates the sitemap editor mode.voidupdateEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Refreshes the displayed data from the given sitemap entry.voidupdateInNavigation(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Updates the in navigation properties of the displayed entry.voidUpdates the site path using the current site entry's data.voidupdateSitePath(String sitePath) Updates the recursively the site path.Methods inherited from class org.opencms.gwt.client.ui.tree.CmsLazyTreeItem
getLoadState, isLoaded, onFinishLoading, onStartLoadingMethods inherited from class org.opencms.gwt.client.ui.tree.CmsTreeItem
add, addChild, adopt, clear, clearChildren, closeAllEmptyChildren, createOpener, executeOpen, fireClose, fireOpen, getChild, getChild, getChildCount, getChildren, getItemPosition, getLastOpenedItem, getParentItem, getParentTarget, getPathLevel, getTree, hideOpeners, insertChild, insertPlaceholderAsLastChild, isOpen, removeChild, removeChild, removeChild, removeOpener, repositionPlaceholder, setDropEnabled, setLeafStyle, setOpen, setOpen, setParentItem, setTree, showOpeners, visitMethods inherited from class org.opencms.gwt.client.ui.CmsListItem
addCheckBox, addDecoration, addDecorationWidget, addMainWidget, cloneForPlaceholder, getCheckBox, getCursorOffsetDelta, getData, getDecorationWidgets, getDndHelperClass, getDndParentClass, getId, getListItemWidget, getMainWidget, getParentList, getPlaceholder, initContent, initContent, initContent, initMoveHandle, initMoveHandle, moveHandleLeft, removeDecorationWidget, setData, setDndHelperClass, setDndParentClass, setId, setSmallView, truncateMethods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, 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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opencms.gwt.client.dnd.I_CmsDraggable
getElement
-
Field Details
-
m_entryId
The current sitemap entry id.
-
-
Constructor Details
-
Method Details
-
getItemById
Looks up a sitemap tree item by entry id.- Parameters:
id- the sitemap entry id- Returns:
- the corresponding sitemap tree item, or null if there is none
-
addInfo
protected static void addInfo(List<org.opencms.gwt.shared.CmsAdditionalInfoBean> infos, String label, String value) Helper method to add an additional info bean to a list.- Parameters:
infos- the list of additional info beanslabel- the label for the new beanvalue- the value for the new bean
-
getDisplayedUrl
Given the path of a sitemap entry, this method returns the URL which should be displayed to the user.- Parameters:
sitePath- the site path of a sitemap entry- Returns:
- the URL which should be displayed to the user
-
getDragHelper
Description copied from interface:I_CmsDraggableCreates the drag helper element and attaches it into the DOM.- Specified by:
getDragHelperin interfaceI_CmsDraggable- Overrides:
getDragHelperin classCmsTreeItem- Parameters:
target- the drop target- Returns:
- the drag helper element
- See Also:
-
getEntryId
Returns the entry id.- Returns:
- the entry id
-
getMoveHandle
Description copied from class:CmsListItemReturns the move handle.- Overrides:
getMoveHandlein classCmsListItem- Returns:
- the move handle
- See Also:
-
getPath
Description copied from class:CmsTreeItemReturns the path of IDs for the this item.- Overrides:
getPathin classCmsTreeItem- Returns:
- a path of IDs separated by slash
- See Also:
-
getSitemapEntry
Returns the sitemap entry.- Returns:
- the sitemap entry
-
getSitePath
Returns the site path.- Returns:
- the site path
-
highlight
Turns the highlighting for this item on or off.- Parameters:
highlightOn- if true, the highlighting is turned on, else off
-
highlightTemporarily
Temporarily highlights an item.- Parameters:
duration- the duration for whichbackground- the background to color to set when finished
-
isDropEnabled
Description copied from class:CmsTreeItemChecks if dropping is enabled.- Overrides:
isDropEnabledin classCmsTreeItem- Returns:
trueif dropping is enabled- See Also:
-
onDragCancel
Description copied from interface:I_CmsDraggableExecuted on drag cancel.- Specified by:
onDragCancelin interfaceI_CmsDraggable- Overrides:
onDragCancelin classCmsTreeItem- See Also:
-
onDrop
Description copied from interface:I_CmsDraggableExecuted on drop.- Specified by:
onDropin interfaceI_CmsDraggable- Overrides:
onDropin classCmsListItem- Parameters:
target- the drop target- See Also:
-
onStartDrag
Description copied from interface:I_CmsDraggableExecuted on drag start.- Specified by:
onStartDragin interfaceI_CmsDraggable- Overrides:
onStartDragin classCmsListItem- Parameters:
target- the current drop target- See Also:
-
resetEntry
Resets entry appearance. -
setBackgroundColor
Sets the background color of the list item widget.If the background is
null, the widget will be shown with its default style.- Parameters:
background- the background color to set
-
toString
- Overrides:
toStringin classcom.google.gwt.user.client.ui.UIObject- See Also:
-
updateDetailPageStatus
Updates the detail page description. -
updateEditorMode
Updates the sitemap editor mode. -
updateSitePath
Updates the site path using the current site entry's data. -
updateSitePath
Updates the recursively the site path.- Parameters:
sitePath- the new site path to set
-
addMarker
Helper method for adding the marker widget.- Parameters:
text- the text for the marker widget- Returns:
- the new marker widget
-
getName
Return the name of this item, which can differ from the entry name for root nodes.- Parameters:
sitePath- the sitemap entry's site path- Returns:
- the name
-
onChangeChildren
Description copied from class:CmsTreeItemHelper method which is called when the list of children changes.- Overrides:
onChangeChildrenin classCmsLazyTreeItem- See Also:
-
removeInvalidChildren
Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry.
-