MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / collapse

Method collapse

src/main/java/fieldbox/boxes/plugins/BoxGroup.java:189–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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);

Callers 8

BoxGroupMethod · 0.95
codemirror.jsFile · 0.80
restoreSelectionFunction · 0.80
restoreSelectionFunction · 0.80
removeInnerFunction · 0.80
collapseFunction · 0.80
showPrimarySelectionMethod · 0.80
dom.jsFile · 0.80

Calls 10

connectMethod · 0.95
dirtyMethod · 0.95
childrenMethod · 0.80
getMethod · 0.65
findMethod · 0.45
bothMethod · 0.45
putMethod · 0.45
forEachMethod · 0.45
streamMethod · 0.45
getOrConstructMethod · 0.45

Tested by

no test coverage detected