Package javafx.scene.paint

Examples of javafx.scene.paint.RadialGradient


      path.setOpacity(0.74);
      path.setSmooth(true);
      final MoveTo mt = new MoveTo(123.143 * scale, 61.088 * scale);
      mt.setAbsolute(true);
      path.getElements().add(mt);
      final RadialGradient rg = new RadialGradient(0, 0, 118.0 * scale, 90.0 * scale, 53.625 * scale, false, CycleMethod.NO_CYCLE,
          new Stop(0.0 * scale, Color.rgb(0xFF, 0xFF, 0xFF, 1.0)),
          new Stop(0.2033 * scale, Color.rgb(0xFE, 0xFF, 0xFD, 1.0)),
          new Stop(0.2765 * scale, Color.rgb(0xFD, 0xFD, 0xF6, 1.0)),
          new Stop(0.3286 * scale, Color.rgb(0xF9, 0xFB, 0xEB, 1.0)),
          new Stop(0.3708 * scale, Color.rgb(0xF4, 0xF7, 0xDA, 1.0)),
View Full Code Here


        }
      }
    };
    this.dialCenterFillProperty = new SimpleObjectProperty<Paint>(
        this.indicatorType == IndicatorType.KNOB ?
            new RadialGradient(0, 0, this.centerX, this.centerY,
                this.dialCenterOuterRadius, false, CycleMethod.NO_CYCLE,
                new Stop(0, Color.DARKGRAY.darker()), new Stop(0.8d, Color.DARKGRAY.darker()),
                new Stop(0.85d, Color.LIGHTGRAY), new Stop(0.97d, Color.DARKGRAY.darker()))
                : Color.BLACK);
    this.minorTickMarkFillProperty = new SimpleObjectProperty<Paint>(Color.GRAY.brighter());
    this.majorTickMarkFillProperty = new SimpleObjectProperty<Paint>(Color.WHITE);
    this.tickMarkLabelFillProperty = new SimpleObjectProperty<Paint>(Color.WHITE);
    this.tickValueDisplayFillProperty = new SimpleObjectProperty<Paint>(new LinearGradient(
        0, 0, 0, 1d, true, CycleMethod.NO_CYCLE,
        new Stop(0, Color.DARKGRAY.darker()), new Stop(0.4d, Color.BLACK)));
    this.tickValueDisplayTextFillProperty = new SimpleObjectProperty<Paint>(Color.WHITE);
    this.outerRimFillProperty = new SimpleObjectProperty<Paint>(Color.BLACK);
    this.outerRimEffectFillProperty = new SimpleObjectProperty<Color>(Color.LIGHTCYAN);
    this.centerGaugeFillProperty = new SimpleObjectProperty<Paint>(
        this.indicatorType == IndicatorType.KNOB ? Color.BLACK :
          new RadialGradient(0, 0, this.centerX, this.centerY,
              this.innerRadius, false, CycleMethod.NO_CYCLE,
              new Stop(0, Color.WHITESMOKE),
              new Stop(0.7d, Color.BLACK)));
    this.indicatorFillProperty = new SimpleObjectProperty<Paint>(
        this.indicatorType == IndicatorType.KNOB ? Color.BLACK : Color.ORANGERED);
View Full Code Here

    intensityIndicator.setRadiusX(radiusX);
    intensityIndicator.setRadiusY(radiusY);
    intensityIndicator.setStartAngle(startAngle);
    intensityIndicator.setLength(arcAngleLength);
    final double stopAmt = (1d - (outerRadius - innerRadius) / outerRadius);
    intensityIndicator.setFill(new RadialGradient(0, 0, centerX, centerY,
        Math.max(intensityIndicator.getRadiusX(), intensityIndicator.getRadiusY()), false, CycleMethod.NO_CYCLE,
         new Stop(stopAmt, Color.TRANSPARENT), new Stop(1, color)));
    intensityIndicator.setOpacity(0.9d);
  }
View Full Code Here

    protected Group createKnobSurface(final double startAngle, final double centerX,
        final double centerY, final double radiusX, final double radiusY,
        final Color... colors) {
      Group group = new Group();
      final Shape background = new Ellipse(centerX, centerY, radiusX, radiusY);
      background.setFill(new RadialGradient(0, 0, this.centerX, this.centerY,
        Math.max(radiusX, radiusY), false, CycleMethod.NO_CYCLE,
        new Stop(0, Color.BLACK), new Stop(0.95d, Color.DARKGRAY.darker()),
        new Stop(0.97d, Color.GRAY.brighter())));
      group.getChildren().add(background);
      double startRadians = startAngle * 2d * Math.PI;
 
View Full Code Here

        bar.setRadiusY(PREFERRED_HEIGHT * 0.5 - 4);
        bar.setStartAngle(getSkinnable().getStartAngle() - 90);
        bar.setLength(0);
        bar.setStrokeType(StrokeType.CENTERED);
        bar.setStroke(null);
        bar.setFill(new RadialGradient(0, 0,
                                       PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5,
                                       PREFERRED_WIDTH * 0.45, false, CycleMethod.NO_CYCLE,
                                       new Stop(0.0, barColor),
                                       new Stop(0.76, barColor.deriveColor(-5, 1, 1, 1)), // -5 for on the barColorHue)
                                       new Stop(0.79, barColor),
View Full Code Here

        if (getSkinnable().isBarGradientEnabled()) {
            recalculateBarGradient();
            Image image = barGradient.getImage(size, size);
            bar.setFill(new ImagePattern(image, 0, 0, size, size, false));
        } else {
            bar.setFill(new RadialGradient(0, 0,
                                           centerX, centerY,
                                           RADIUS, false, CycleMethod.NO_CYCLE,
                                           new Stop(0.0, barColor),
                                           new Stop(0.76, barColor.deriveColor(-5, 1, 1, 1)), // -5 for on the barColorHue)
                                           new Stop(0.79, barColor),
View Full Code Here

            ctx.fillOval(0.14 * size, 0.14 * size, 0.72 * size, 0.72 * size);
            ctx.restore();
        }

        //highlight
        Paint highlight = new RadialGradient(0, 0,
                                             0.3 * size, 0.3 * size,
                                             0.29 * size,
                                             false, CycleMethod.NO_CYCLE,
                                             new Stop(0.0, Color.WHITE),
                                             new Stop(1.0, Color.TRANSPARENT));
View Full Code Here

            ctx.fillOval(0.14 * size, 0.14 * size, 0.72 * size, 0.72 * size);
            ctx.restore();
        }

        //highlight
        Paint highlight = new RadialGradient(0, 0,
                                             0.3 * size, 0.3 * size,
                                             0.29 * size,
                                             false, CycleMethod.NO_CYCLE,
                                             new Stop(0.0, Color.WHITE),
                                             new Stop(1.0, Color.TRANSPARENT));
View Full Code Here

            public void handle(long now) {

                long elapsedTime = System.currentTimeMillis() - startTime;
                duration=duration+elapsedTime;
                if (duration > 150) {
                    RadialGradient lightColor = RadialGradientBuilder.create()
                            .radius(spotlightRadius)
                            .centerX(x)
                            .centerY(text.getY())
                            .proportional(false)
                            .stops(new Stop(0, Color.WHITE),
View Full Code Here

        // draw the chart data
        ctx.save();
        if (getSkinnable().getGradientStops().isEmpty()) {
            ctx.setFill(getSkinnable().getChartFill());
        } else {           
            ctx.setFill(new RadialGradient(0, 0,
                                           CENTER_X, CENTER_Y,
                                           0.5 * CIRCLE_SIZE,
                                           false, CycleMethod.NO_CYCLE,
                                           gradientStops));
        }
View Full Code Here

TOP

Related Classes of javafx.scene.paint.RadialGradient

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.