List of usage examples for javafx.geometry Bounds getMinX
public final double getMinX()
From source file:Main.java
private void playLocalBoundsPathTransition() { Bounds b = mainRect.getBoundsInLocal(); Path path = new Path(); path.getElements().add(new MoveTo(b.getMinX(), b.getMinY())); //path.getElements().add(new LineTo(b.getMinX(), b.getMinY())); path.getElements().add(new LineTo(b.getMaxX(), b.getMinY())); path.getElements().add(new LineTo(b.getMaxX(), b.getMaxY())); path.getElements().add(new LineTo(b.getMinX(), b.getMaxY())); path.getElements().add(new LineTo(b.getMinX(), b.getMinY())); LOCAL_BOUNDS_PATH_TRANSITION.setPath(path); LOCAL_BOUNDS_PATH_TRANSITION.play(); }
From source file:Main.java
private void playParentBoundsPathTransition() { Bounds b = mainRect.getBoundsInParent(); Path path = new Path(); path.getElements().add(new MoveTo(b.getMinX(), b.getMinY())); path.getElements().add(new LineTo(b.getMaxX(), b.getMinY())); path.getElements().add(new LineTo(b.getMaxX(), b.getMaxY())); path.getElements().add(new LineTo(b.getMinX(), b.getMaxY())); path.getElements().add(new LineTo(b.getMinX(), b.getMinY())); PARENT_BOUNDS_PATH_TRANSITION.setPath(path); PARENT_BOUNDS_PATH_TRANSITION.play(); }
From source file:org.geopoke.WorldMap.java
/** * Get a snapshot of the current map as an image. * <p/>/* w w w. ja va 2s.co m*/ * @return the current snapshot of the map. */ public BufferedImage getSnapshot() { BufferedImage image = SwingFXUtils.fromFXImage(getScene().snapshot(null), null); Bounds bounds = localToScene(getLayoutBounds()); return image.getSubimage((int) bounds.getMinX(), (int) bounds.getMinY(), (int) getWidth(), (int) getHeight()); }
From source file:view.EditorView.java
@FXML void insertRoomOnMouseDragged(MouseEvent event) { Bounds scrollPaneBounds = scrollPaneContainer.localToScene(scrollPane.getBoundsInLocal()); if (event.getSceneX() >= scrollPaneBounds.getMinX() && event.getSceneX() <= scrollPaneBounds.getMaxX() && event.getSceneY() >= scrollPaneBounds.getMinY() && event.getSceneY() <= scrollPaneBounds.getMaxY()) { // we're in the scroll pane if (!isMouseOverDrawing) { scrollPaneOnMouseEntered(event); }//www . j av a2s .c o m } else { if (isMouseOverDrawing) { scrollPaneOnMouseExited(event); } } scrollPaneOnMouseMoved(event); }