Package jfxtras.scene.layout

Examples of jfxtras.scene.layout.CircularPane$AnimationInterpolation


      lFlowPane.setPrefWrapLength(primaryScreenBounds.getWidth());
      
    for (int j = 0; j < 10; j++)
//int j = 2;
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setShowDebug(Color.GREEN);
      lCircularPane.setArc(90.0);
      for (int i = 0; i < j; i++) {
        javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(15,15);
        //c.setStroke(Color.RED);
        lCircularPane.add(c);
      }
      lFlowPane.getChildren().add(lCircularPane);
    }

        // setup scene
View Full Code Here


      Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
      lFlowPane.setPrefWrapLength(primaryScreenBounds.getWidth());
      
    for (int j = 0; j < 360; j += 10)
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setStyle("-fx-border-color:black;");
      //lCircularPane.setAnimate(true);
      lCircularPane.setShowDebug(Color.GREEN);
      lCircularPane.setStartAngle( (double)j );
      for (int i = 0; i < 2; i++) {
        javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(15,15);
        //c.setStroke(Color.RED);
        lCircularPane.add(c);
      }
      lFlowPane.getChildren().add(lCircularPane);
    }

        // setup scene
View Full Code Here

    label = new Label();
    label.setLayoutY(lPane.getMinHeight() - 20);
    lPane.getChildren().add(label);   
   
    // add the circularePane (this is what we want to test)
    circularPane = new CircularPane();
    circularPane.setShowDebug(Color.GREEN);
    lPane.getChildren().add(circularPane);   
    circularPane.setStyle("-fx-border-color:black;");
    return lPane;
  }
View Full Code Here

    }

  @Override
  public void start(Stage stage) {

    CircularPane lCircularPane = new CircularPane();
//    lCircularPane.setStyle("-fx-border-color:black;");
    lCircularPane.setShowDebug(Color.GREEN);
//    lCircularPane.setStartAngle(30.0);
    for (int i = 0; i < 20; i++) {
//      javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(10,10);
//      lCircularPane.add(c);
      lCircularPane.add(new javafx.scene.control.Button("X X X"));
    }

        // setup scene
    Scene scene = new Scene(lCircularPane);
    scene.getStylesheets().add(this.getClass().getName().replace(".", "/") + ".css");
View Full Code Here

   
    HBox lHBox = new HBox(20);
    Paint lShowDebug = Color.GREEN;
   
    {
      CircularPane lCircularPane = new CircularPane();
      //lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setStartAngle(360.0 / 12 / 2); // make sure the 12 is on top
      lCircularPane.setChildrenAreCircular(true);
      //lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      final List<Label> labels = new ArrayList<>();
      final List<Circle> circles = new ArrayList<>();
      final AtomicReference<Circle> lastFocus = new AtomicReference<>();
      final AtomicBoolean isPM = new AtomicBoolean(false);
      for (int i = 0; i < 12; i++) {
        javafx.scene.shape.Circle c = new javafx.scene.shape.Circle(10, Color.TRANSPARENT);
        c.getStyleClass().add("timecircle");
        circles.add(c);
        javafx.scene.control.Label t = new javafx.scene.control.Label("" + (i + 1));
        t.getStyleClass().add("time");
        labels.add(t);
        c.setOnMouseEntered( (event) -> {
          int lastFocusIdx = circles.indexOf(lastFocus.get());
          int currentIdx = circles.indexOf( event.getSource() );
         
          if ( (lastFocusIdx == 11 && currentIdx == 0)
            || (lastFocusIdx == 0 && currentIdx == 11)
             ) {
            isPM.set( !isPM.get() );
          }
         
          for (int j = 0; j < 12; j++) {
            labels.get(j).setText( "" + ( (j + 1) + (isPM.get() ? 12 : 0) ) );
          }
        });
        c.setOnMouseExited( (event) -> {
          lastFocus.set( (Circle)event.getSource() );
        });
        StackPane lStackPane = new StackPane();
        lStackPane.setId("" + i);
        lStackPane.getChildren().add(c);
        lStackPane.getChildren().add(t);
        lCircularPane.add(lStackPane);
      }
     
      StackPane lStackPane = new StackPane();
      Circle c = new Circle(1, Color.WHITE);
      c.radiusProperty().bind(lCircularPane.widthProperty().divide(2.0));
      lStackPane.getChildren().add(c);
      lStackPane.getChildren().add(lCircularPane);
      Label l = new Label("H");
      l.getStyleClass().add("center");
      lStackPane.getChildren().add(l);
      lHBox.add(lStackPane);
    }
   
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setStartAngle(-360.0 / 12 / 2);
      lCircularPane.setDiameter(150.0);
      //lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setChildrenAreCircular(true);
      //lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      final List<Label> labels = new ArrayList<>();
      final List<Circle> circles = new ArrayList<>();
      for (int i = 0; i < 12; i++) {
        javafx.scene.shape.Circle c = new javafx.scene.shape.Circle(10, Color.TRANSPARENT);
        circles.add(c);
        javafx.scene.control.Label t = new javafx.scene.control.Label("" + (i * 5));
        t.getStyleClass().add("time");
        labels.add(t);
        StackPane lStackPane = new StackPane();
        lStackPane.getChildren().add(c);
        lStackPane.getChildren().add(t);
        lCircularPane.add(lStackPane);
      }
      StackPane lStackPane = new StackPane();
      Circle c = new Circle(1, Color.WHITE);
      c.radiusProperty().bind(lCircularPane.widthProperty().divide(2.0));
      lStackPane.getChildren().add(c);
      lStackPane.getChildren().add(lCircularPane);
      Label l = new Label("M");
      l.getStyleClass().add("center");
      lStackPane.getChildren().add(l);
      lHBox.add(lStackPane);
    }
   
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setDiameter(90.0);
      //lCircularPane.setStyle("-fx-border-color:black;");
      //lCircularPane.setChildrenAreCircular(true);
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      final List<Label> labels = new ArrayList<>();
      final List<Circle> circles = new ArrayList<>();
      final AtomicReference<Circle> lastFocus = new AtomicReference<>();
      final AtomicBoolean isPM = new AtomicBoolean(false);
      for (int i = 0; i < 12; i++) {
        javafx.scene.shape.Circle c = new javafx.scene.shape.Circle(10, Color.GRAY);
        circles.add(c);
        javafx.scene.control.Label t = new javafx.scene.control.Label("" + (i * 5));
        t.getStyleClass().add("time");
        labels.add(t);
        StackPane lStackPane = new StackPane();
        lStackPane.getChildren().add(c);
        lStackPane.getChildren().add(t);
        lCircularPane.add(lStackPane);
      }
      StackPane lStackPane = new StackPane();
      lStackPane.getChildren().add(lCircularPane);
      Label l = new Label("S");
      l.getStyleClass().add("center");
      lStackPane.getChildren().add(l);
      lHBox.add(lStackPane);
    }
   
    {
      CircularPane lCircularPane = new CircularPane().withId("XX");
      //lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      for (int i = 0; i < 12; i++) {
        javafx.scene.control.Button b = new javafx.scene.control.Button("XX");
//        b.setStyle("-fx-padding:10px;");
        b.setStyle("-fx-margin:10px;");
        lCircularPane.add(b);
      }
      lHBox.add(lCircularPane);
    }
   
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setMinSize(200200);
      //lCircularPane.setStyle("-fx-border-color:black;");
      //lCircularPane.setChildrenAreCircular(true);
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      for (int i = 0; i < 8; i++) {
        javafx.scene.shape.Circle c = new javafx.scene.shape.Circle(10);
        lCircularPane.add(c);
      }
      lHBox.add(lCircularPane);
     
//      final Node n = lCircularPane.getChildren().get(0);       
//      n.layoutXProperty().addListener( (observable) -> {
//        System.out.println("layoutX=" + n.getLayoutX());
//      });   
//      n.layoutYProperty().addListener( (observable) -> {
//        System.out.println("layoutY=" + n.getLayoutY());
//      });   
     
    }
   
    {
      CircularPane lCircularPane = new CircularPane();
      //lCircularPane.setStyle("-fx-border-color:black;");
      //lCircularPane.setChildrenAreCircular(true);
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      for (int i = 0; i < 8; i++) {
        javafx.scene.shape.Circle c = new javafx.scene.shape.Circle(10);
        lCircularPane.add(c);
      }
      lHBox.add(lCircularPane, new HBox.C().hgrow(Priority.ALWAYS));
    }
   
    {
      CircularPane lCircularPane = new CircularPane();
      //lCircularPane.setStyle("-fx-border-color:black;");
      //lCircularPane.setChildrenAreCircular(true);
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      for (int i = 0; i < 8; i++) {
        javafx.scene.shape.Circle c = new javafx.scene.shape.Circle(5 + i);
        lCircularPane.add(c);
      }
      lHBox.add(lCircularPane);
    }

    {
      CircularPane lCircularPane = new CircularPane();
      //lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      for (int i = 0; i < 8; i++) {
        javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(5 + (2*i), 5 + (2*i));
        lCircularPane.add(c);
      }
      lHBox.add(lCircularPane);
    }
   
    {
      CircularPane lCircularPane = new CircularPane();
      //lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateFromTheOrigin);
      for (int i = 0; i < 8; i++) {
        javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(5 + (2*i), 5 + (2*i));
        c.setRotate(45);
        lCircularPane.add(c);
      }
      lHBox.add(lCircularPane);
    }
   
   
    CircularPane lCircularPane = new CircularPane();
    {
      //lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateFromTheOrigin);
//      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      for (int i = 0; i < 10; i++) {
        javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(20, 20);
        c.setRotate(i * 10);
        lCircularPane.add(c);
      }
      lHBox.add(lCircularPane);
    }
   
    Button lButton = new Button("out");
    lButton.setOnAction( (actionEvent) -> {
      lCircularPane.animateOut();
    });
    lCircularPane.setOnAnimateOutFinished( (event) -> {
      lCircularPane.setVisible(false);
      Platform.runLater(() -> {
        TestUtil.sleep(3000);
        lCircularPane.setVisible(true);
        lCircularPane.animateIn();
      });
    });
    lHBox.getChildren().add(lButton);
   
        // setup scene
View Full Code Here

    HBox lHBox = new HBox(0);
    lVBox.getChildren().add(lHBox);

    for (int j = 1; j < 27; j++)
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setShowDebug(Color.GREEN);
      for (int i = 0; i < j; i++) {
        javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(30,30);
        //c.setStroke(Color.RED);
        lCircularPane.add(c);
      }
      lHBox.getChildren().add(lCircularPane);
      if (lHBox.prefWidth(-1) > 1500) {
        lHBox = new HBox(0);
        lVBox.getChildren().add(lHBox);
View Full Code Here

    HBox lHBox = new HBox(0);
    lVBox.getChildren().add(lHBox);

    for (int j = 1; j < 27; j++)
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setStyle("-fx-border-color:black;");
      //lCircularPane.setChildrenAreCircular(true);
      lCircularPane.setShowDebug(Color.GREEN);
      for (int i = 0; i < j; i++) {
        javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(20,20);
        lCircularPane.add(c);
      }
      lHBox.getChildren().add(lCircularPane);
      if (lHBox.prefWidth(-1) > 1000) {
        lHBox = new HBox(0);
        lVBox.getChildren().add(lHBox);
View Full Code Here

      Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
      lFlowPane.setPrefWrapLength(primaryScreenBounds.getWidth());
      
    for (int j = 0; j < 360; j += 10)
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setShowDebug(Color.GREEN);
      lCircularPane.setStartAngle( (double)j );
      lCircularPane.setArc(90.0);
      for (int i = 0; i < 10; i++) {
        javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(15,15);
        //c.setStroke(Color.RED);
        lCircularPane.add(c);
      }
      lFlowPane.getChildren().add(lCircularPane);
    }

        // setup scene
View Full Code Here

    }

  @Override
  public void start(Stage stage) {

    CircularPane lCircularPane = new CircularPane();
    lCircularPane.setStyle("-fx-border-color:black;");
    lCircularPane.setShowDebug(Color.GREEN);
//    lCircularPane.setStartAngle(315.0); lCircularPane.setArc(90.0);
//    lCircularPane.setStartAngle(0.0); lCircularPane.setArc(90.0);
//    lCircularPane.setStartAngle(30.0); lCircularPane.setArc(90.0);
//    lCircularPane.setStartAngle(30.0); lCircularPane.setArc(180.0);
//    lCircularPane.setStartAngle(90.0); lCircularPane.setArc(90.0);
//    lCircularPane.setStartAngle(120.0); lCircularPane.setArc(90.0);
    for (int i = 0; i < 14; i++) {
      javafx.scene.shape.Rectangle c = new javafx.scene.shape.Rectangle(50,50);
      //c.setStroke(Color.RED);
      lCircularPane.add(c);
    }

        // setup scene
    Scene scene = new Scene(lCircularPane);
    scene.getStylesheets().add(this.getClass().getName().replace(".", "/") + ".css");
View Full Code Here

TOP

Related Classes of jfxtras.scene.layout.CircularPane$AnimationInterpolation

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.