org.zkoss.zul.ext
Interface TreeOpenableModel

All Known Implementing Classes:
AbstractTreeModel, DefaultTreeModel

public interface TreeOpenableModel

Indicate an openable collection or components. Generally used with TreeModel and Tree.

Since:
6.0.0
Author:
jumperchen

Method Summary
 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 if path 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 if paths 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 if path 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 in paths are in the open, the TreeDataListeners are notified. This method has no effect if paths 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, the TreeDataListener 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.



Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo