public class UpdateNode {
+ private UpdateNode parent;
private UpdateStatus status;
private UpdateOp op;
private Resource r;
public void addChild(UpdateNode node) {
children.add(node);
+ node.parent = this;
if (op != null && node.op != null) {
if (!op.getSubOps().contains(node.op)) {
op.addSubOp(node.op);
this.visible = visible;
if (op != null)
op.visible = visible;
+ if (visible) {
+ if (parent != null && !parent.visible)
+ parent.setVisible(true);
+ } else {
+ for (UpdateNode n : children)
+ n.setVisible(false);
+ }
}
+
+ public void setAllVisible(boolean visible) {
+ this.visible = visible;
+ if (op != null)
+ op.visible = visible;
+ for (UpdateNode n : children)
+ n.setAllVisible(visible);
+ }
}