Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Handle JavaFX gestures, pinch-to-zoom, panning, and multi-touch interaction with explicit transform ownership.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 49% | 0% |
| case-02 | ✓→✓ | = Same ✓ | -6% | 0% |
| case-04 | ✓→✓ | = Same ✓ | -3% | 0% |
Use this skill when the UI needs touch-aware interaction: zoomable viewports, pannable canvases, or multi-touch surfaces. Libraries such as GestureFX and TuioFX are useful once gestures become central to the product.
javaimport javafx.application.ConditionalFeature; import javafx.application.Platform; import javafx.scene.image.ImageView; import javafx.scene.input.ScrollEvent; import javafx.scene.layout.StackPane; public class ZoomPane extends StackPane { public ZoomPane(ImageView imageView) { getChildren().add(imageView); addEventFilter(ScrollEvent.SCROLL, event -> { if (!event.isControlDown()) { return; } double factor = event.getDeltaY() > 0 ? 1.1 : 0.9; imageView.setScaleX(imageView.getScaleX() * factor); imageView.setScaleY(imageView.getScaleY() * factor); event.consume(); }); if (Platform.isSupported(ConditionalFeature.INPUT_TOUCH)) { setStyle("-fx-background-color: derive(cornflowerblue, 80%);"); } } }
Other measured skills in the registry, with their headline benchmark lift.