Example usage for javafx.geometry Bounds getMaxX

List of usage examples for javafx.geometry Bounds getMaxX

Introduction

In this page you can find the example usage for javafx.geometry Bounds getMaxX.

Prototype

public final double getMaxX() 

Source Link

Document

The x coordinate of the lower-right corner of this Bounds .

Usage

From source file:Main.java

private void playLayoutBoundsPathTransition() {
    Bounds b = mainRect.getLayoutBounds();
    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()));

    LAYOUT_BOUNDS_PATH_TRANSITION.setPath(path);
    LAYOUT_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: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: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);
        }//  ww w . j av  a 2s  . co m
    } else {
        if (isMouseOverDrawing) {
            scrollPaneOnMouseExited(event);
        }
    }
    scrollPaneOnMouseMoved(event);
}