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:
-
CmsLazyTreeItem
CmsClientSitemapEntry
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Label generator for the detail page info label.Nested classes/interfaces inherited from class org.opencms.gwt.client.ui.tree.CmsLazyTreeItem
CmsLazyTreeItem.LoadingItem, CmsLazyTreeItem.LoadState
Nested classes/interfaces inherited from class org.opencms.gwt.client.ui.CmsListItem
CmsListItem.MoveHandle
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
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.opencms.util.CmsUUID
The current sitemap entry id.Fields inherited from class org.opencms.gwt.client.ui.tree.CmsTreeItem
ANIMATION_DURATION, m_children, m_opener
Fields 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_CLASS
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionCmsSitemapTreeItem
(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
Helper method to add an additional info bean to a list.protected com.google.gwt.user.client.ui.Widget
Helper 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.Element
getDragHelper
(I_CmsDropTarget target) Creates the drag helper element and attaches it into the DOM.org.opencms.util.CmsUUID
Returns the entry id.static CmsSitemapTreeItem
getItemById
(org.opencms.util.CmsUUID id) Looks up a sitemap tree item by entry id.Returns the move handle.protected String
Return 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.CmsClientSitemapEntry
Returns the sitemap entry.Returns the site path.void
highlight
(boolean highlightOn) Turns the highlighting for this item on or off.void
highlightTemporarily
(int duration, CmsListItemWidget.Background background) Temporarily highlights an item.boolean
Checks if dropping is enabled.protected void
Helper method which is called when the list of children changes.void
Executed on drag cancel.void
onDrop
(I_CmsDropTarget target) Executed on drop.void
onStartDrag
(I_CmsDropTarget target) Executed on drag start.protected void
Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry.void
Resets entry appearance.void
setBackgroundColor
(CmsListItemWidget.Background background) Sets the background color of the list item widget.void
setStateIcon
(org.opencms.gwt.shared.CmsListInfoBean.StateIcon icon) Sets the icon.toString()
void
Updates the detail page description.void
Updates the sitemap editor mode.void
updateEntry
(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Refreshes the displayed data from the given sitemap entry.void
updateInNavigation
(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Updates the in navigation properties of the displayed entry.void
Updates the site path using the current site entry's data.void
updateSitePath
(String sitePath) Updates the recursively the site path.Methods inherited from class org.opencms.gwt.client.ui.tree.CmsLazyTreeItem
getLoadState, isLoaded, onFinishLoading, onStartLoading
Methods 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, visit
Methods 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, truncate
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
Methods 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, 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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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_CmsDraggable
Creates the drag helper element and attaches it into the DOM.- Specified by:
getDragHelper
in interfaceI_CmsDraggable
- Overrides:
getDragHelper
in 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:CmsListItem
Returns the move handle.- Overrides:
getMoveHandle
in classCmsListItem
- Returns:
- the move handle
- See Also:
-
getPath
Description copied from class:CmsTreeItem
Returns the path of IDs for the this item.- Overrides:
getPath
in 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:CmsTreeItem
Checks if dropping is enabled.- Overrides:
isDropEnabled
in classCmsTreeItem
- Returns:
true
if dropping is enabled- See Also:
-
onDragCancel
Description copied from interface:I_CmsDraggable
Executed on drag cancel.- Specified by:
onDragCancel
in interfaceI_CmsDraggable
- Overrides:
onDragCancel
in classCmsTreeItem
- See Also:
-
onDrop
Description copied from interface:I_CmsDraggable
Executed on drop.- Specified by:
onDrop
in interfaceI_CmsDraggable
- Overrides:
onDrop
in classCmsListItem
- Parameters:
target
- the drop target- See Also:
-
onStartDrag
Description copied from interface:I_CmsDraggable
Executed on drag start.- Specified by:
onStartDrag
in interfaceI_CmsDraggable
- Overrides:
onStartDrag
in 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:
toString
in classcom.google.gwt.user.client.ui.UIObject
- See Also:
-
UIObject.toString()
-
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:CmsTreeItem
Helper method which is called when the list of children changes.- Overrides:
onChangeChildren
in classCmsLazyTreeItem
- See Also:
-
removeInvalidChildren
Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry.
-