Package org.opencms.gwt.client.util
Class CmsUniqueActiveItemContainer
- java.lang.Object
-
- org.opencms.gwt.client.util.CmsUniqueActiveItemContainer
-
public class CmsUniqueActiveItemContainer extends java.lang.Object
Container which contains at most oneI_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 Constructor Description CmsUniqueActiveItemContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes the current item.void
clearIfMatches(I_CmsUniqueActiveItem item)
Removes the current item only if it is the same object as the given parameter.void
setActiveItem(I_CmsUniqueActiveItem item)
Sets the active item.
-
-
-
Constructor Detail
-
CmsUniqueActiveItemContainer
public CmsUniqueActiveItemContainer()
-
-
Method Detail
-
clear
public void clear()
Removes the current item.
-
clearIfMatches
public void clearIfMatches(I_CmsUniqueActiveItem item)
Removes the current item only if it is the same object as the given parameter.- Parameters:
item
- the item to match
-
setActiveItem
public void setActiveItem(I_CmsUniqueActiveItem item)
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
-
-