Package org.opencms.gwt.client.util
Class CmsUniqueActiveItemContainer
java.lang.Object
org.opencms.gwt.client.util.CmsUniqueActiveItemContainer
Container which contains at most one
I_CmsUniqueActiveItem
.If a new value is set while this container already contains an item, the previous item is removed and notified of that removal.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes the current item.void
Removes the current item only if it is the same object as the given parameter.void
Sets the active item.
-
Constructor Details
-
CmsUniqueActiveItemContainer
public CmsUniqueActiveItemContainer()
-
-
Method Details
-
clear
Removes the current item. -
clearIfMatches
Removes the current item only if it is the same object as the given parameter.- Parameters:
item
- the item to match
-
setActiveItem
Sets the active item.If this container already contains an item, it is replaced with the given item, and its onDeactivate() method is called.
- Parameters:
item
- the new item
-