Package javafx.geometry

Examples of javafx.geometry.Bounds


    }

    @Test
    public void boundsInWindowFor_primaryScene() {
        // when:
        Bounds bounds = boundsLocator.boundsInWindowFor(primaryScene);

        // then:
        assertThat(bounds, equalTo(boundsWithOffset(0, 0, 600, 400, windowInsets)));
    }
View Full Code Here


    }

    @Test
    public void boundsInWindowFor_boundsInsideOfScene() {
        // when:
        Bounds bounds = boundsLocator.boundsInWindowFor(boundsInsideOfScene, primaryScene);

        // then:
        assertThat(bounds, equalTo(boundsWithOffset(50, 50, 100, 100, windowInsets)));
    }
View Full Code Here

    }

    @Test
    public void boundsInWindowFor_boundsPartyOutsideOfScene() {
        // when:
        Bounds bounds = boundsLocator.boundsInWindowFor(boundsPartyOutsideOfScene, primaryScene);

        // then:
        assertThat(bounds, not(equalTo(boundsWithOffset(550, 350, 100, 100, windowInsets))));
        assertThat(bounds, equalTo(boundsWithOffset(550, 350, 50, 50, windowInsets)));
    }
View Full Code Here

    }

    @Test(expected=BoundsLocatorException.class)
    public void boundsInWindowFor_boundsOutsideOfScene() {
        // when:
        Bounds bounds = boundsLocator.boundsInWindowFor(boundsOutsideOfScene, primaryScene);

        // then:
        assertThat(bounds, equalTo(null));
    }
View Full Code Here

    }

    @Test
    public void boundsOnScreenFor_primaryWindow() {
        // when:
        Bounds bounds = boundsLocator.boundsOnScreenFor(primaryWindow);

        // then:
        assertThat(bounds, equalTo(boundsWithInsets(100, 100, 600, 400, windowInsets)));
    }
View Full Code Here

    }

    @Test
    public void boundsOnScreenFor_primaryScene() {
        // when:
        Bounds bounds = boundsLocator.boundsOnScreenFor(primaryScene);

        // then:
        assertThat(bounds, equalTo(boundsWithOffset(100, 100, 600, 400, windowInsets)));
    }
View Full Code Here

    }

    @Test
    public void boundsOnScreenFor_boundsInsideOfScene() {
        // when:
        Bounds bounds = boundsLocator.boundsOnScreenFor(boundsInsideOfScene, primaryScene);

        // then:
        assertThat(bounds, equalTo(boundsWithOffset(100 + 50, 100 + 50, 100, 100, windowInsets)));
    }
View Full Code Here

    }

    @Test
    public void boundsOnScreenFor_boundsPartyOutsideOfScene() {
        // when:
        Bounds bounds = boundsLocator.boundsOnScreenFor(boundsPartyOutsideOfScene, primaryScene);

        // then:
        assertThat(bounds, not(equalTo(boundsWithOffset(100 + 550, 100 + 350, 100, 100,
            windowInsets))));
        assertThat(bounds, equalTo(boundsWithOffset(100 + 550, 100 + 350, 50, 50, windowInsets)));
View Full Code Here

    }

    @Test(expected=BoundsLocatorException.class)
    public void boundsOnScreenFor_boundsOutsideOfScene() {
        // when:
        Bounds bounds = boundsLocator.boundsOnScreenFor(boundsOutsideOfScene, primaryScene);

        // then:
        assertThat(bounds, equalTo(null));
    }
View Full Code Here

    public Bounds bounds(double x, double y, double width, double height) {
        return new BoundingBox(x, y, width, height);
    }

    public Bounds boundsWithOffset(double x, double y, double width, double height, Insets insets) {
        Bounds bounds = bounds(x, y, width, height);
        return withOffset(bounds, insets);
    }
View Full Code Here

TOP

Related Classes of javafx.geometry.Bounds

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.