Java Code Examples for javafx.scene.shape.Circle#relocate()

The following examples show how to use javafx.scene.shape.Circle#relocate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CatchBall.java    From games_oop_javafx with Apache License 2.0 5 votes vote down vote up
private List<Circle> generateApples() {
    List<Circle> apples = new ArrayList<>();
    Random rn = new Random();
    for (int i = 0; i < 10; i++) {
        Circle apple = new Circle(10, Color.GREEN);
        apple.relocate(rn.nextInt(500), rn.nextInt(500));
        apples.add(apple);
    }
    return apples;
}
 
Example 2
Source File: ScrollBarSample.java    From marathonv5 with Apache License 2.0 4 votes vote down vote up
private void setScrollValueX(double v, Circle circle) {
    this.xscrollValue = v;
    circle.relocate(xscrollValue, yscrollValue);
}
 
Example 3
Source File: ScrollBarSample.java    From marathonv5 with Apache License 2.0 4 votes vote down vote up
private void setScrollValueY(double v, Circle circle) {
    this.yscrollValue = v+xBarHeight;
    circle.relocate(xscrollValue, yscrollValue);
}
 
Example 4
Source File: ScrollBarSample.java    From marathonv5 with Apache License 2.0 4 votes vote down vote up
private void setScrollValueX(double v, Circle circle) {
    this.xscrollValue = v;
    circle.relocate(xscrollValue, yscrollValue);
}
 
Example 5
Source File: ScrollBarSample.java    From marathonv5 with Apache License 2.0 4 votes vote down vote up
private void setScrollValueY(double v, Circle circle) {
    this.yscrollValue = v+xBarHeight;
    circle.relocate(xscrollValue, yscrollValue);
}