]> gerrit.simantics Code Review - simantics/interop.git/blobdiff - org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateNode.java
Use ArrayList (instead of HashSet) to store changes
[simantics/interop.git] / org.simantics.interop.update / src / org / simantics / interop / update / model / UpdateNode.java
index cc996a28239159d5ef94d666f49f2a9c1bae6f1f..3a7953174bd3ffb6b080af45cbe8f039ed5ced72 100644 (file)
@@ -16,6 +16,7 @@ public class UpdateNode {
        private UpdateOp op;
        private Resource r;
        private String label;
+       private boolean visible = true;
        
        
        private Collection<UpdateNode> children = new ArrayList<UpdateNode>();
@@ -30,7 +31,7 @@ public class UpdateNode {
                this.status = status;
                this.op = op;
                this.r = op.getResource();
-               this.label = getLabel(g, r);
+               init(g);
        }
        
        public UpdateNode(ReadGraph g, UpdateStatus status, Resource r) throws DatabaseException {
@@ -38,6 +39,10 @@ public class UpdateNode {
                this.status = status;
                this.op = null;
                this.r = r;
+               init(g);
+       }
+       
+       protected void init(ReadGraph g) throws DatabaseException {
                this.label = getLabel(g, r);
        }
        
@@ -97,5 +102,15 @@ public class UpdateNode {
        public UpdateOp getOp() {
                return op;
        }
+       
+       public boolean isVisible() {
+               return visible;
+       }
+       
+       public void setVisible(boolean visible) {
+               this.visible = visible;
+               if (op != null)
+                       op.visible = visible;
+       }
 
 }