Package org.zkoss.zul.ext
Interface Openable<E>
-
- All Known Implementing Classes:
AbstractTreeModel,DefaultTreeModel
public interface Openable<E>Indicate an openable collection.Since 6.0.0,
TreeOpenableModelwas introduced to handle the open state ofTreeModelfor better performance. Thus, for handling tree's open states, please useTreeOpenableModelinstead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddOpenObject(E obj)Add the specified object into the collection of opened objects.voidclearOpen()Clear all open status.java.util.Set<E>getOpenObjects()Returns the objects that are opened.booleanisObjectOpened(java.lang.Object obj)Returns whether the specified object be opened.booleanisOpenEmpty()Returns true if the open is currently empty.booleanremoveOpenObject(java.lang.Object obj)Remove the specified object from selection.voidsetOpenObjects(java.util.Collection<? extends E> opens)Replace the current set of opened objects with the given set.
-
-
-
Method Detail
-
getOpenObjects
java.util.Set<E> getOpenObjects()
Returns the objects that are opened. It is readonly. Don't modify it directly- Since:
- 6.0.0
-
setOpenObjects
void setOpenObjects(java.util.Collection<? extends E> opens)
Replace the current set of opened objects with the given set.- Since:
- 6.0.0
-
isObjectOpened
boolean isObjectOpened(java.lang.Object obj)
Returns whether the specified object be opened.- Parameters:
obj-
-
isOpenEmpty
boolean isOpenEmpty()
Returns true if the open is currently empty.- Since:
- 6.0.0
-
addOpenObject
boolean addOpenObject(E obj)
Add the specified object into the collection of opened objects.- Parameters:
obj- the object to be as selection.- Returns:
- true if it is added successfully; false if
objis not part of the data, or was already opened. - Since:
- 6.0.0
-
removeOpenObject
boolean removeOpenObject(java.lang.Object obj)
Remove the specified object from selection.- Parameters:
obj- the object to be remove from selection.- Returns:
- whether it is removed successfully
- Since:
- 6.0.0
-
clearOpen
void clearOpen()
Clear all open status.Notice that this method is designed to be called by a component (such as
Tree). If it is called by an application, the component's open status won't be changed.
-
-