()
| 187 | Map<String, Boolean> collapsedState = new LinkedHashMap<>(); |
| 188 | |
| 189 | private void collapse() { |
| 190 | |
| 191 | // if (this.parents().size()==0) |
| 192 | // { |
| 193 | Box root = this.find(Boxes.root, both()) |
| 194 | .findFirst() |
| 195 | .get(); |
| 196 | root.connect(this); |
| 197 | // } |
| 198 | |
| 199 | this.properties.put(_collapsed, true); |
| 200 | collapsedAt = this.properties.get(Box.frame); |
| 201 | collapsed = true; |
| 202 | // this.breadthFirst(this.downwards()) |
| 203 | this.children().stream() |
| 204 | .filter(x -> x != this) |
| 205 | .forEach(x -> { |
| 206 | collapsedState.put(x.properties.getOrConstruct(IO.id), x.disconnected); |
| 207 | x.disconnected = true; |
| 208 | }); |
| 209 | Drawing.dirty(this, 2); |
| 210 | } |
| 211 | |
| 212 | private void expand() { |
| 213 | this.properties.put(_collapsed, false); |
no test coverage detected