Example usage for javafx.scene.paint Color LIGHTBLUE

List of usage examples for javafx.scene.paint Color LIGHTBLUE

Introduction

In this page you can find the example usage for javafx.scene.paint Color LIGHTBLUE.

Prototype

Color LIGHTBLUE

To view the source code for javafx.scene.paint Color LIGHTBLUE.

Click Source Link

Document

The color light blue with an RGB value of #ADD8E6

Usage

From source file:org.noroomattheinn.visibletesla.LocationController.java

private Animation animateBlip() {
    final Circle core = new Circle(572, 360, 5);
    final Circle blip = new Circle(572, 360, 5);
    final Circle outline = new Circle(572, 360, 5);
    Duration blipTime = Duration.seconds(1.5);
    Duration interBlipTime = Duration.seconds(0.5);

    core.setFill(Color.BLUE);/*ww w  .j  ava2 s  . c  om*/
    blip.setFill(Color.LIGHTBLUE);
    outline.setFill(Color.TRANSPARENT);
    outline.setStroke(Color.DARKBLUE);
    outline.setStrokeWidth(0.25);

    root.getChildren().addAll(blip, core, outline);

    FadeTransition fadeBlip = new FadeTransition(blipTime, blip);
    fadeBlip.setFromValue(0.8);
    fadeBlip.setToValue(0.0);

    ScaleTransition scaleBlip = new ScaleTransition(blipTime, blip);
    scaleBlip.setFromX(1);
    scaleBlip.setToX(4);
    scaleBlip.setFromY(1);
    scaleBlip.setToY(4);

    FadeTransition fadeOutline = new FadeTransition(blipTime, outline);
    fadeOutline.setFromValue(1.0);
    fadeOutline.setToValue(0.0);

    ScaleTransition scaleOutline = new ScaleTransition(blipTime, outline);
    scaleOutline.setFromX(1);
    scaleOutline.setToX(4);
    scaleOutline.setFromY(1);
    scaleOutline.setToY(4);

    SequentialTransition sequence = new SequentialTransition(
            new ParallelTransition(fadeBlip, scaleBlip, scaleOutline, fadeOutline),
            new PauseTransition(interBlipTime));
    sequence.setCycleCount(Timeline.INDEFINITE);
    sequence.setOnFinished(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent t) {
            core.setVisible(false);
            blip.setVisible(false);
            outline.setVisible(false);
        }
    });

    sequence.play();
    return sequence;
}

From source file:ui.main.MainViewController.java

private synchronized void paintSendMessage(String msg, String time) {
    Task<HBox> recievedMessages = new Task<HBox>() {
        @Override//from  www . ja  va 2 s. c  o m
        protected HBox call() throws Exception {
            VBox vbox = new VBox(); //to add text

            ImageView imageRec = new ImageView(myAvatar.getImage());
            imageRec.setFitHeight(60);
            imageRec.setFitWidth(50);

            Label myName = new Label(name.getText());
            myName.setDisable(true);

            Label timeL = new Label(time);
            timeL.setDisable(true);
            timeL.setFont(new Font("Arial", 10));

            BubbledLabel bbl = new BubbledLabel();
            bbl.setText(msg);
            bbl.setBackground(new Background(new BackgroundFill(Color.LIGHTBLUE, null, null)));
            HBox hbox = new HBox();
            hbox.setAlignment(Pos.TOP_RIGHT);
            bbl.setBubbleSpec(BubbleSpec.FACE_RIGHT_CENTER);

            vbox.getChildren().addAll(myName, bbl, timeL);

            hbox.getChildren().addAll(vbox, imageRec);
            return hbox;
        }
    };

    recievedMessages.setOnSucceeded(event -> {
        chatList.getChildren().add(recievedMessages.getValue());
    });
    Thread t = new Thread(recievedMessages);
    t.setDaemon(true);
    t.start();
    try {
        t.join();
    } catch (InterruptedException ex) {
        Logger.getLogger(MainViewController.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:view.FXApplicationController.java

final public void computeKCfeatures() {

    overlay4.getChildren().clear();/*from   ww w .  j  av a 2 s  .  c  o m*/

    kcDetector.detect(displayBuffer[featureModel.getFeatureChannel()]);
    double percentageSum = kcDetector.getPercentageSum();
    Set<Range<Integer>> kcPlotRanges = kcDetector.getKcRanges();

    kComplexLabel.setVisible(true);
    kComplexLabel.setText("K-Complex: " + Math.round(percentageSum) + "%");

    //draw yellow rectangles for every pair of coordinates in kcPlotRanges
    double start;
    double stop;

    for (Range<Integer> next : kcPlotRanges) {
        start = next.lowerEndpoint();
        stop = next.upperEndpoint();

        Rectangle r = new Rectangle();
        r.layoutXProperty()
                .bind(this.xAxis.widthProperty().multiply((start + 1.) / (double) this.displayBuffer[0].length)
                        .add(this.xAxis.layoutXProperty()));

        r.setLayoutY(0);
        r.widthProperty()
                .bind(xAxis.widthProperty().multiply((stop - start) / (double) this.displayBuffer[0].length));

        r.heightProperty().bind(overlay4.heightProperty());
        r.fillProperty().setValue(Color.LIGHTBLUE);
        r.opacityProperty().set(0.5);

        overlay4.getChildren().add(r);

    }

    lineChart.requestFocus();
}