X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fui%2FDataNode.java;h=b4dbe7bb04130bf69e4e67ca12ea330b812544ef;hb=601003e69e1dc81774243c6eadf7982b6b563b33;hp=2d3ac267842325333484b68886998471981d8135;hpb=60ee255638ef6e151a18ee1a93dd9a6c0e9ee1a7;p=fanfix.git diff --git a/src/be/nikiroo/utils/ui/DataNode.java b/src/be/nikiroo/utils/ui/DataNode.java index 2d3ac26..b4dbe7b 100644 --- a/src/be/nikiroo/utils/ui/DataNode.java +++ b/src/be/nikiroo/utils/ui/DataNode.java @@ -78,8 +78,14 @@ public class DataNode { return userData; } - protected int count() { - int s = 0; + /** + * The total number of nodes present in this {@link DataNode} (including + * itself and descendants). + * + * @return the number + */ + public int count() { + int s = 1; for (DataNode child : children) { s += child.count(); }