Package javafx.scene.shape

Examples of javafx.scene.shape.Circle


    }
    VBox circleBox;
    Digit digit;
    char c;
    int d;
    Circle circle;
    for (int i=0; i<value.length(); i++) {
      c = value.charAt(i);
      if (remCnt != 0) {
        if (c == '.') {
          circleBox = new VBox();
          circleBox.setCache(true);
          circleBox.setCacheHint(CacheHint.SPEED);
          circleBox.setStyle("-fx-alignment: BOTTOM_LEFT;");
          circle = new Circle(0, 0, 6 * getScale(), onColor);
          circle.setCache(true);
          circle.setSmooth(false);
          circleBox.getChildren().add(circle);
          getChildren().add(circleBox);
        } else {
          d = c == '-' ? Digit.NEGATIVE_SIGN_DIGIT : Integer.valueOf(String.valueOf(c));
          digit = new Digit(getScale(), d, onColor, offColor);
View Full Code Here


      return null;
    }
   
    protected Group createButtonGraphic(final double scale) {
    final Group btnGrp = new Group();
      final Circle circle = new Circle(106.0 * scale, 74.0 * scale, 25.0 * scale);
      circle.setFill(Color.rgb(0xcc, 0xff, 0x00, 1.0));
      circle.setOpacity(0.9);
      circle.setSmooth(true);
      circle.setStroke(Color.rgb(0xa7, 0xd1, 0x00, 1.0));
      circle.setStrokeWidth(2.0 * scale);
      final Path path = new Path();
      path.setStroke(null);
      path.setOpacity(0.74);
      path.setSmooth(true);
      final MoveTo mt = new MoveTo(123.143 * scale, 61.088 * scale);
 
View Full Code Here

      // rotate value text so that it is never upside down
      final double angle = -getGeometericStartAngle();
      if (Math.abs(angle) > 90d && Math.abs(angle) < 270d) {
        val.setRotate(180d);
      }
      final Circle dialCutout = new Circle(centerX, centerY, innerRadius);
      final Circle gaugeCutout = new Circle(centerX, centerY, dialCenterBackgroundRadius
          + rimThickness);
      // create the border rectangle
      final Polygon rec = new Polygon(centerX, offsetY, centerX + width, offsetY,
          centerX + width, offsetY + height, centerX, offsetY + height);
      // carve out outer rim rectangle edge
View Full Code Here

    if (isCircular()) {
      return null;
    }
    final StackPane valContainer = new StackPane();
    final double rimRadius = outerRadius - innerRadius;
    final Circle dialCutout = new Circle(centerX, centerY, innerRadius);
    final Circle gaugeCutout = new Circle(centerX, centerY, dialCenterBackgroundRadius
        + rimRadius);
    // create the opposing background border
    final double offsetX = centerX - innerRadius;
    final double offsetY = centerY + rimRadius;
    final Polygon rec2 = new Polygon(centerX, offsetY, offsetX, offsetY,
View Full Code Here

      final ObjectProperty<Paint> centerGaugeFillProperty,
      final ObjectProperty<Paint> rimStrokeFillProperty,
      final ObjectProperty<Color> backgroundEffectFillProperty) {
    final Effect effect = createBackgroundEffect(backgroundEffectFillProperty);
    if (isCircular()) {
      final Circle ccg = new Circle(centerX, centerY, radius);
      ccg.setCache(true);
      ccg.setCacheHint(CacheHint.QUALITY);
      ccg.setEffect(effect);
      addRimStroke(ccg, rimStrokeFillProperty);
      Bindings.bindBidirectional(ccg.fillProperty(), centerGaugeFillProperty);
      return ccg;
    } else {
      final Arc acg = new Arc(centerX, centerY, radius, radius,
          angleStart, angleLength);
      acg.setType(ArcType.ROUND);
      acg.setCache(true);
      acg.setCacheHint(CacheHint.QUALITY);
      final Shape acf = new Circle(centerX, centerY, dialCenterBackgroundRadius);
      acf.setCache(true);
      final Shape cg = Shape.union(acg, acf);
      cg.setCache(true);
      cg.setEffect(effect);
      addRimStroke(cg, rimStrokeFillProperty);
      Bindings.bindBidirectional(cg.fillProperty(), centerGaugeFillProperty);
View Full Code Here

     * Creates the bolt that hold the indicator in place
     *
     * @return the indicator bolt
     */
    protected Shape createIndicatorBolt() {
    final Shape indicatorBolt = new Circle(centerX, centerY, dialCenterOuterRadius);
//      createSproket(centerX, centerY, 24, dialCenterOuterRadius / 1.1d,
//        dialCenterOuterRadius, angleStart, dialCenterFillProperty);
    indicatorBolt.setCache(true);
    indicatorBolt.setCacheHint(CacheHint.SPEED);
    Bindings.bindBidirectional(indicatorBolt.fillProperty(), dialCenterFillProperty);
    Bindings.bindBidirectional(indicatorBolt.opacityProperty(), dialCenterOpacityProperty);
    return indicatorBolt;
    }
View Full Code Here

    public Bomb(World world) {
        super(world);
        setTranslateZ(1000);
        setTranslateY(1000);
        circle = new Circle(50, Color.web("white", 0.05));
        circle.setStrokeType(StrokeType.OUTSIDE);
        circle.setStroke(Color.web("white", 0.16));
        circle.setStrokeWidth(4);
  
        imageView.setTranslateX(-32);
View Full Code Here

        this.panel = new Pane();
        this.panel.setPrefSize(600, 500);

        this.panel.getStyleClass().add("editor");

        final Circle c = new Circle(200 + 25, Color.BEIGE);
        c.centerXProperty().bind(getRootNode().widthProperty().divide(2)/* .add(70) */);
        c.centerYProperty().bind(getRootNode().heightProperty().divide(2));

        this.panel.getChildren().add(c);

        getRootNode().setContent(this.panel);

View Full Code Here

        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);
    }
   
 
View Full Code Here

    }

    private void initGraphics() {                       
        innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.65), PREFERRED_HEIGHT * 0.1, 0, 0, 0);
        Color color = gradientLookup.getColorAt(getSkinnable().getValue() / (getSkinnable().getMaxValue() - getSkinnable().getMinValue()));
        background = new Circle(0.5 * PREFERRED_WIDTH, 0.5 * PREFERRED_HEIGHT, 0.5 * PREFERRED_WIDTH);
        background.setFill(new LinearGradient(0, 0, 0, PREFERRED_HEIGHT,
                                              false, CycleMethod.NO_CYCLE,
                                              new Stop(0, color.deriveColor(0, 1, 0.8, 1)),
                                              new Stop(1, color.deriveColor(0, 1, 0.6, 1))));
        background.setEffect(innerShadow);
View Full Code Here

TOP

Related Classes of javafx.scene.shape.Circle

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.