TreeMapNode class
Constructors
- TreeMapNode(TreeMapNode? parent, TreeData props, {int deep = 0, int maxDeep = -1, num value = 0})
Properties
- areaRatio → double
-
计算面积比
no setter
- childCount → int
-
no setterinherited
- childIndex → int
-
自身在父节点中的索引 如果为-1表示没有父节点
no setterinherited
-
children
→ List<
TreeMapNode> -
no setterinherited
-
childrenReverse
→ List<
TreeMapNode> -
no setterinherited
- count → int
-
返回后代节点数
调用该方法前必须先调用 computeCount,否则永远返回0
no setterinherited
- cur ↔ NodeProps
-
getter/setter pair
- deep → int
-
no setterinherited
- end ↔ NodeProps
-
getter/setter pair
- expand ↔ bool
-
getter/setter pairinherited
- firstChild → TreeMapNode
-
no setterinherited
- hasChild → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
no setterinherited
- isLeaf → bool
-
no setterinherited
- lastChild → TreeMapNode
-
no setterinherited
- maxDeep ↔ int
-
整颗树最大的深度
getter/setter pairinherited
- notChild → bool
-
no setterinherited
- parent ↔ TreeMapNode?
-
getter/setter pairinherited
- position ↔ Rect
-
getter/setter pair
- props → TreeData
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- select ↔ bool
-
getter/setter pairinherited
- size ↔ Size
-
保存节点大小和位置
getter/setter pairinherited
- start ↔ NodeProps
-
getter/setter pair
- value ↔ double
-
getter/setter pairinherited
- x ↔ num
-
getter/setter pairinherited
- y ↔ num
-
getter/setter pairinherited
Methods
-
add(
TreeMapNode node) → void -
inherited
-
ancestors(
) → List< TreeMapNode> -
返回从当前节点开始的祖先节点
inherited
-
bottom2Top(
) → void -
inherited
-
childAt(
int index) → TreeMapNode -
inherited
-
clear(
) → void -
inherited
-
computeCount(
) → int -
计算当前节点的后代节点数
inherited
-
computeDeep(
TreeMapNode node, [int initDeep = 0]) → void -
inherited
-
computeHeight(
TreeMapNode node, [int initHeight = 0]) → void -
计算树的高度
inherited
-
copy(
TreeMapNode build(TreeMapNode?, TreeMapNode), [int deep = 0]) → TreeMapNode -
从复制当前节点及其后代
复制后的节点没有parent
inherited
-
depthNode(
int depth, [bool only = true]) → List< TreeMapNode> -
从当前节点开始查找深度等于给定深度的节点
广度优先遍历
only==true 只返回对应层次的,否则返回<=inherited -
descendants(
) → List< TreeMapNode> -
返回其所有后代节点
inherited
-
each(
TreeFun< TreeMapNode> callback) → TreeMapNode -
inherited
-
eachAfter(
TreeFun< TreeMapNode> callback) → TreeMapNode -
后序遍历
inherited
-
eachBefore(
TreeFun< TreeMapNode> callback) → TreeMapNode -
先序遍历
inherited
-
find(
TreeFun< TreeMapNode> callback) → TreeMapNode? -
在子节点中查找对应节点
inherited
-
findMaxDeep(
) → int -
inherited
-
getBoundBox(
) → Rect -
inherited
-
iterator(
) → List< TreeMapNode> -
返回其后代所有节点(按照拓扑结构)
inherited
-
leafLeft(
) → TreeMapNode -
返回当前节点下最左边的叶子节点
inherited
-
leafRight(
) → TreeMapNode -
inherited
-
leaves(
) → List< TreeMapNode> -
返回其所有的叶子结点
inherited
-
links(
) → List< Link< TreeMapNode> > -
返回当前节点的后续的所有Link
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
path(
TreeMapNode target) → List< TreeMapNode> -
返回从当前节点到指定节点的最短路径
inherited
-
remove(
TreeMapNode node) → void -
inherited
-
removeAt(
int i) → TreeMapNode -
inherited
-
removeChild(
bool filter(TreeMapNode)) → void -
inherited
-
removeFirst(
) → TreeMapNode -
inherited
-
removeLast(
) → TreeMapNode -
inherited
-
removeWhere(
bool where(TreeMapNode), [bool iterator = false]) → void -
inherited
-
resetDeep(
int deep, [bool iterator = true]) → void -
重新设置深度
inherited
-
right2Left(
) → void -
inherited
-
setExpand(
bool e, [bool iterator = true]) → void -
inherited
-
sort(
int compare(TreeMapNode, TreeMapNode), [bool iterator = true]) → TreeMapNode -
inherited
-
sum(
[num valueCallback(TreeMapNode)?]) → TreeMapNode -
计算当前节点值
如果给定了回调,那么将使用给定的回调进行值统计
否则直接使用 _value 统计
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translate(
num dx, num dy) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited