Package org.zkoss.zul.ext
Interface TreeOpenableModel
-
- All Known Implementing Classes:
AbstractTreeModel
,DefaultTreeModel
,DefaultTristateTreeModel
public interface TreeOpenableModel
- Since:
- 6.0.0
- Author:
- jumperchen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addOpenPath(int[] path)
Adds path to the current open.boolean
addOpenPaths(int[][] paths)
Adds paths to the current Open.void
clearOpen()
Empties the current open path.int
getOpenCount()
Returns the number of paths that are opened.int[]
getOpenPath()
Returns the first path in the open.int[][]
getOpenPaths()
Returns the paths in the open.boolean
isOpenEmpty()
Returns true if the open is currently empty.boolean
isPathOpened(int[] path)
Returns true if the path,path
, is in the current open.boolean
removeOpenPath(int[] path)
Removes path from the open.boolean
removeOpenPaths(int[][] paths)
Removes paths from the open.
-
-
-
Method Detail
-
addOpenPath
boolean addOpenPath(int[] path)
Adds path to the current open. If path is not currently in the open the TreeDataListeners are notified. This has no effect ifpath
is null.- Parameters:
path
- the new path to add to the current open- Returns:
- whether it is added successfully
-
addOpenPaths
boolean addOpenPaths(int[][] paths)
Adds paths to the current Open. If any of the paths in paths are not currently in the Open the TreeDataListeners are notified. This has no effect ifpaths
is null.- Parameters:
paths
- the new paths to add to the current Open- Returns:
- whether an of the paths is added successfully
-
removeOpenPath
boolean removeOpenPath(int[] path)
Removes path from the open. If path is in the open The TreeDataListeners are notified. This has no effect ifpath
is null.- Parameters:
path
- the path to remove from the open- Returns:
- true if it was closed successfully
-
removeOpenPaths
boolean removeOpenPaths(int[][] paths)
Removes paths from the open. If any of the paths inpaths
are in the open, the TreeDataListeners are notified. This method has no effect ifpaths
is null.- Parameters:
paths
- the path to remove from the open- Returns:
- true if one of the paths was closed successfully
-
isPathOpened
boolean isPathOpened(int[] path)
Returns true if the path,path
, is in the current open.
-
isOpenEmpty
boolean isOpenEmpty()
Returns true if the open is currently empty.
-
clearOpen
void clearOpen()
Empties the current open path. If this represents a change in the current open, theTreeDataListener
listeners are notified.
-
getOpenCount
int getOpenCount()
Returns the number of paths that are opened.
-
getOpenPath
int[] getOpenPath()
Returns the first path in the open. How first is defined is up to implementors.
-
getOpenPaths
int[][] getOpenPaths()
Returns the paths in the open. This will return null (or an empty array) if nothing is currently opened.
-
-