| 69 | this.properties.put(Boxes.dontSave, true); |
| 70 | this.properties.put(Box.name, "TimeSlider"); |
| 71 | |
| 72 | this.properties.computeIfAbsent(frameDrawing, this::defaultdrawsLines); |
| 73 | this.properties.put(velocity, 0d); |
| 74 | } |
| 75 | |
| 76 | protected boolean swiper() { |
| 77 | if (was == null) { |
| 78 | this.properties.put(velocity, 0d); |
| 79 | was = this.properties.get(frame).duplicate(); |
| 80 | } else { |
| 81 | Rect now = this.properties.get(frame); |
| 82 | if (now.x == was.x) { |
| 83 | this.properties.put(velocity, 0d); |
| 84 | } else { |
| 85 | this.properties.put(velocity, (double) (now.x - was.x)); |
| 86 | perform(was, now); |
| 87 | } |
| 88 | was = now.duplicate(); |
| 89 | } |
| 90 | |