Exemplo n.º 1
0
  private Group createButtonArea(final Scene scene) {
    // create button area
    final Group buttonGroup = new Group();
    // rounded rect
    Rectangle buttonArea =
        RectangleBuilder.create()
            .arcWidth(15)
            .arcHeight(20)
            .fill(new Color(0, 0, 0, .55))
            .x(0)
            .y(0)
            .width(60)
            .height(30)
            .stroke(Color.rgb(255, 255, 255, .70))
            .build();
    buttonGroup.getChildren().add(buttonArea);

    // move button group when scene is resized
    buttonGroup
        .translateXProperty()
        .bind(scene.widthProperty().subtract(buttonArea.getWidth() + 6));
    buttonGroup
        .translateYProperty()
        .bind(scene.heightProperty().subtract(buttonArea.getHeight() + 6));
    return buttonGroup;
  }
Exemplo n.º 2
0
 private Node createBackground(Scene scene) {
   // application area
   Rectangle applicationArea =
       RectangleBuilder.create()
           .arcWidth(20)
           .arcHeight(20)
           .fill(Color.rgb(0, 0, 0, .80))
           .x(0)
           .y(0)
           .strokeWidth(2)
           .stroke(Color.rgb(255, 255, 255, .70))
           .build();
   applicationArea.widthProperty().bind(scene.widthProperty());
   applicationArea.heightProperty().bind(scene.heightProperty());
   return applicationArea;
 }
Exemplo n.º 3
0
  private Node createStopControl() {
    // stop audio control
    Rectangle stopButton =
        RectangleBuilder.create()
            .arcWidth(5)
            .arcHeight(5)
            .fill(Color.rgb(255, 255, 255, .80))
            .x(0)
            .y(0)
            .width(10)
            .height(10)
            .translateX(15)
            .translateY(10)
            .stroke(Color.rgb(255, 255, 255, .70))
            .build();

    return stopButton;
  }