Package javafx.scene.paint

Examples of javafx.scene.paint.Stop


      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)),
          new Stop(0.4065 * scale, Color.rgb(0xEE, 0xF2, 0xC4, 1.0)),
          new Stop(0.4157 * scale, Color.rgb(0xEC, 0xF1, 0xBD, 1.0)),
          new Stop(1.0 * scale, Color.rgb(0xCC, 0xFF, 0x00, 1.0)));
      path.setFill(rg);
      final CubicCurveTo cct1 = new CubicCurveTo(130.602 * scale, 70.889 * scale, 129.01 * scale,
          84.643 * scale, 119.59 * scale, 91.813 * scale);
      cct1.setAbsolute(true);
      path.getElements().add(cct1);
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);
    this.indicatorOpacityProperty = new SimpleDoubleProperty(1);
    this.dialCenterOpacityProperty = new SimpleDoubleProperty(1);
    this.intensityIndicatorRegionsProperty = new SimpleObjectProperty<Gauge.IntensityIndicatorRegions>(
View Full Code Here

   
    highlight.setCache(true);
    highlight.setCacheHint(CacheHint.SPEED);
    highlight.setOpacity(0.07d);
    highlightFillProperty.set(new LinearGradient(cx, cy, centerX, centerY,
        false, CycleMethod.NO_CYCLE, new Stop(0.8d, Color.WHITE),
        new Stop(1d, Color.TRANSPARENT)));
    Bindings.bindBidirectional(highlight.fillProperty(), highlightFillProperty);
    return highlight;
  }
View Full Code Here

    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

        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;
      //double stepRadians = (2d * Math.PI) / colors.length;
      //double oldX = centerX + Math.cos(startRadians) * radiusX;
      //double oldY = centerY + Math.sin(startRadians) * radiusY;
 
View Full Code Here

   * Updates the toggle switch display to represent on or off
   */
  protected void update() {
        // Create and set a gradient for the inside of the button
        final Stop[] mainStops = new Stop[] {
            new Stop(0.0, boolProperty.get() ? Color.BLUE : Color.GRAY),
            new Stop(1.0, boolProperty.get() ? Color.DODGERBLUE : Color.DARKGRAY)
        };
        final LinearGradient mainLG =
            new LinearGradient(0, 0, 0, 1, true, CycleMethod.NO_CYCLE, mainStops);
        mainRec.setFill(mainLG);
        middleRec.setX(boolProperty.get() ? (mainRec.getWidth() / 2) : mainRec.getX());
View Full Code Here

      middleRec.setArcWidth(REC_ARC);
      middleRec.setArcHeight(REC_ARC);
       
        // Create and set a gradient for the inside of the button
        Stop[] middleStops = new Stop[] {
            new Stop(0.0, Color.WHITE),
            new Stop(1.0, Color.GRAY)
        };
        LinearGradient middleLG =
            new LinearGradient(0, 0, 0, 1, true, CycleMethod.NO_CYCLE, middleStops);
        middleRec.setFill(middleLG);
       
View Full Code Here

        addListeners();
    }

    public static Paint createFill() {
        LinearGradient gradient = new LinearGradient(0f, 0f, 0f, 1f, true, CycleMethod.NO_CYCLE, new Stop[]{
                    new Stop(0.0, Color.web("#64c2f8")),
                    new Stop(1, Color.web("#f8bd55")),});
        return gradient;
    }
View Full Code Here

        for (Double fraction : stops.keySet()) {
            minFraction = Math.min(fraction, minFraction);
            maxFraction = Math.max(fraction, maxFraction);
        }
        if (minFraction > 0) {
            stops.put(0.0, new Stop(0.0, stops.get(minFraction).getColor()));
        }
        if (maxFraction < 1){
            stops.put(1.0, new Stop(1.0, stops.get(maxFraction).getColor()));
        }
    }
View Full Code Here

        final Color COLOR;
        if (stops.size() == 1) {
            final Map<Double, Color> ONE_ENTRY = (Map<Double, Color>) stops.entrySet().iterator().next();
            COLOR = stops.get(ONE_ENTRY.keySet().iterator().next()).getColor();
        } else {
            Stop lowerBound = stops.get(0.0);
            Stop upperBound = stops.get(1.0);
            for (Double fraction : stops.keySet()) {
                if (Double.compare(fraction,POSITION) < 0) {
                    lowerBound = stops.get(fraction);
                }
                if (Double.compare(fraction, POSITION) > 0) {
View Full Code Here

TOP

Related Classes of javafx.scene.paint.Stop

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.