Package javafx.scene.effect

Examples of javafx.scene.effect.ColorAdjust


 
  private ImageView newTitleBarButton(final String imageName, final double enterBrightness, final double exitedBrightness) {
      final ImageView btn = RS.imgView(imageName);
      btn.setId("title-menu");
      HBox.setMargin(btn, new Insets(TOP_BORDER_HEIGHT / 2 + TOP_MIN_MAX_CLOSE_ADJUSTMENT, 0, 0, 0));
        final ColorAdjust btnEffect = new ColorAdjust();
        //btnEffect.setContrast(enterBrightness);
        btnEffect.setBrightness(exitedBrightness);
        btn.setEffect(btnEffect);
      btn.setOnMouseEntered(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent event) {
            btnEffect.setBrightness(enterBrightness);
            //btnEffect.setContrast(exitedBrightness);
      }
    });
      btn.setOnMouseExited(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent event) {
            btnEffect.setBrightness(exitedBrightness);
            //btnEffect.setContrast(enterBrightness);
      }
    });
      return btn;
  }
View Full Code Here


            final ToggleButton button = new ToggleButton(tool.getName().replace(' ', '\n'));
            ImageView icon = new ImageView(tool.getIcon());
            icon.effectProperty().bind(new ObjectBinding<Effect>() {
                { bind(button.selectedProperty()); }
                @Override protected Effect computeValue() {
                    return button.isSelected() ? null : new ColorAdjust(0, -1, 0, 0);
                }
            });
            button.setGraphic(icon);
            button.setContentDisplay(ContentDisplay.TOP);
            if (i==0) button.setSelected(true);
View Full Code Here

                int value = maker.strong(password, "SensibleEditor hashcode: " + this.hashCode());

                vpwd_lbl.setText(value + "%");
                prog_pwd.setProgress(value * 0.01);

                ColorAdjust adjust = new ColorAdjust();
                adjust.setHue(130.0);
                prog_pwd.setEffect(adjust);

                if (!hbox_pwd.isVisible() && effect) {
                    EffectFX.fadeOut(hbox_pwd, 250).play();
                }
View Full Code Here

                int value = maker.strong(password, "SensibleEditor hashcode: " + this.hashCode());

                vpwd_lbl.setText(value + "%");
                prog_pwd.setProgress(value * 0.01);

                ColorAdjust adjust = new ColorAdjust();
                adjust.setHue(130.0);
                prog_pwd.setEffect(adjust);

                if (!hbox_pwd.isVisible() && effect) {
                    EffectFX.fadeOut(hbox_pwd, 250).play();
                }
View Full Code Here

        InnerShadow is = new InnerShadow();
        node.setEffect(is);
    }

    public static void colorAdjustProg(@Nonnull ProgressBar prog) {
        ColorAdjust c_adj = new ColorAdjust();
        c_adj.setHue(130.0);
        prog.setEffect(c_adj);
    }
View Full Code Here

                int value = maker.strong(password, "SensibleEditor hashcode: " + this.hashCode());

                vpwd_lbl.setText(value + "%");
                prog_pwd.setProgress(value * 0.01);

                ColorAdjust adjust = new ColorAdjust();
                adjust.setHue(130.0);
                prog_pwd.setEffect(adjust);

                if (!hbox_pwd.isVisible() && effect) {
                    EffectFX.fadeOut(hbox_pwd, 250).play();
                }
View Full Code Here

        InnerShadow is = new InnerShadow();
        node.setEffect(is);
    }

    public static void colorAdjustProg(@Nonnull ProgressBar prog) {
        ColorAdjust c_adj = new ColorAdjust();
        c_adj.setHue(130.0);
        prog.setEffect(c_adj);
    }
View Full Code Here

            case CAN_CLAIM:
                actionButton.setText("Claim");
                break;
            case CLAIMED:
                actionButton.setText("View claim transaction");
                ColorAdjust effect = new ColorAdjust();
                coverImage.setEffect(effect);
                if (priorMode != Mode.CLAIMED) {
                    Timeline timeline = new Timeline(new KeyFrame(GuiUtils.UI_ANIMATION_TIME.multiply(3), new KeyValue(effect.saturationProperty(), -0.9)));
                    timeline.play();
                } else {
                    effect.setSaturation(-0.9);
                }
                break;
        }
    }
View Full Code Here

        isLoading = new SimpleBooleanProperty();

        // Make the cover image go grey when claimed and blurred when loading. Make a loading indicator fade in/out.
        final Image image = new Image(project.getCoverImage().newInput());
        ColorAdjust colorAdjust = new ColorAdjust();
        colorAdjust.saturationProperty().bind(when(equal(state, LighthouseBackend.ProjectState.CLAIMED)).then(-0.9).otherwise(0.0));
        if (GuiUtils.isSoftwarePipeline()) {
            // SW pipeline cannot handle gaussian blurs with acceptable performance.
            coverImage.setEffect(colorAdjust);
        } else {
            GaussianBlur blur = new GaussianBlur();
View Full Code Here

    private void setupDefaultCoverImage() {
        // The default image is nice, so a lot of people (including possibly me) will be lazy and not change it. To
        // keep things interesting we randomly recolour the image here.
        try {
            ColorAdjust colorAdjust = new ColorAdjust();
            double randomHueAdjust = Math.random() * 2 - 1.0;
            colorAdjust.setHue(randomHueAdjust);
            // Draw into a canvas and then apply the effect, because if we snapshotted the image view, we'd end up
            // with the rounded corners which we don't want.
            Image image = new Image(getResource("default-cover-image.png").openStream());
            Canvas canvas = new Canvas(image.getWidth(), image.getHeight());
            GraphicsContext gc = canvas.getGraphicsContext2D();
View Full Code Here

TOP

Related Classes of javafx.scene.effect.ColorAdjust

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.