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

Method abutV

src/main/java/fieldbox/boxes/plugins/Alignment.java:158–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156 }
157
158 private void abutV() {
159 List<Box> s = selected().sorted((a, b) -> Float.compare(a.properties.get(Box.frame).y, b.properties.get(Box.frame).y))
160 .collect(Collectors.toList());
161 float ax = s.get(0).properties.get(Box.frame).y + s.get(0).properties.get(Box.frame).h;
162 for (int i = 1; i < s.size(); i++) {
163 final float finalAx = ax;
164 set(s.get(i), z -> {
165 z.y = finalAx;
166 });
167
168 ax = s.get(i).properties.get(Box.frame).y + s.get(i).properties.get(Box.frame).h;
169 }
170 }
171
172 protected void left() {
173 selected().map(a -> a.properties.get(Box.frame).x)

Callers

nothing calls this directly

Calls 6

selectedMethod · 0.95
setMethod · 0.95
collectMethod · 0.80
getMethod · 0.65
compareMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected