|
YAACC - UPNP Client and Server
|
TreeNode is a container for the value to represent a node on the TreeView. More...

Classes | |
| enum | LoadState |
| Whether the children of a folder were read: unknown, being read, or read (then possibly none). More... | |
Public Member Functions | |
| TreeNode (TreeNodeData value, int layoutId) | |
| void | addChild (TreeNode child) |
| void | addChildren (List< TreeNode > newChildren) |
| Adds all children in one go (one array growth, no per-child list work). | |
| TreeNodeData | getValue () |
| void | setParent (TreeNode parent) |
| TreeNode | getParent () |
| List< TreeNode > | getChildren () |
| int | getLayoutId () |
| void | setLevel (int level) |
| int | getLevel () |
| void | setExpanded (boolean expanded) |
| boolean | isExpanded () |
| void | setSelected (boolean selected) |
| boolean | isSelected () |
| int | startLoading () |
| Starts reading the children. | |
| boolean | cancelLoading () |
| Gives up a running load (the user collapsed the node): its result will be ignored. | |
| boolean | finishLoading (int generation, List< TreeNode > loadedChildren) |
| Takes over the children a load has read. | |
| boolean | failLoading (int generation) |
| A load could not read the folder: it stays unknown, so the next click asks again. | |
| boolean | isLoading () |
| boolean | isLoaded () |
| boolean | isKnownEmpty () |
| The folder was read and has no children - the only case in which the expand symbol is hidden. | |
TreeNode is a container for the value to represent a node on the TreeView.
All methods are for the main thread. A folder's children are read on a worker thread and handed over with finishLoading; the load generation makes a result that arrives after the node was collapsed (or loaded again) harmless.
| boolean de.yaacc.upnp.server.configuration.TreeNode.cancelLoading | ( | ) |
Gives up a running load (the user collapsed the node): its result will be ignored.
| boolean de.yaacc.upnp.server.configuration.TreeNode.failLoading | ( | int | generation | ) |
A load could not read the folder: it stays unknown, so the next click asks again.
| boolean de.yaacc.upnp.server.configuration.TreeNode.finishLoading | ( | int | generation, |
| List< TreeNode > | loadedChildren ) |
Takes over the children a load has read.

| int de.yaacc.upnp.server.configuration.TreeNode.startLoading | ( | ) |
Starts reading the children.
finishLoading / failLoading