Example usage for javafx.scene.paint Color FORESTGREEN

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

Introduction

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

Prototype

Color FORESTGREEN

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

Click Source Link

Document

The color forest green with an RGB value of #228B22

Usage

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @param iLargeur//from   www  .ja  v  a2 s.  c o  m
 * @param iHauteur
 * @param bMasqueZones
 */
private static void afficheBarrePersonnalisee(int iLargeur, int iHauteur, boolean bMasqueZones) {
    apImgBarrePersonnalisee.getChildren().clear();
    apZoneBarrePersonnalisee.getChildren().clear();
    ImageView ivBarrePersonnalisee = new ImageView(imgBarrePersonnalisee);
    apImgBarrePersonnalisee.getChildren().add(ivBarrePersonnalisee);
    apImgBarrePersonnalisee.setPrefWidth(imgBarrePersonnalisee.getWidth());
    apImgBarrePersonnalisee.setPrefHeight(imgBarrePersonnalisee.getHeight());
    apImgBarrePersonnalisee.setCursor(Cursor.CROSSHAIR);
    apImgBarrePersonnalisee.setLayoutX((iLargeur - 300 - apImgBarrePersonnalisee.getPrefWidth()) / 2.d);
    apImgBarrePersonnalisee.setLayoutY((iHauteur - apImgBarrePersonnalisee.getPrefHeight()) / 2.d);
    if ((iNombreZones > 0) && !bMasqueZones) {
        for (int i = 0; i < iNombreZones; i++) {
            ZoneTelecommande zone = zones[i];
            String[] strPoints = zone.getStrCoordonneesZone().split(",");
            double[] points = new double[strPoints.length];
            for (int ij = 0; ij < strPoints.length; ij++) {
                points[ij] = Double.parseDouble(strPoints[ij]);
            }
            final String strIdZone = zone.getStrTypeZone() + "-" + i;

            switch (zone.getStrTypeZone()) {
            case "circle":
                Circle cercle = new Circle(points[0], points[1], points[2]);
                cercle.setFill(Color.rgb(255, 255, 0, 0.5));
                cercle.setStroke(Color.FORESTGREEN);
                cercle.setCursor(Cursor.DEFAULT);
                apImgBarrePersonnalisee.getChildren().add(cercle);
                cercle.setId(strIdZone);
                cercle.setOnMouseClicked((t) -> {
                    choixZone(iLargeur, iHauteur, bMasqueZones, strIdZone, t);
                    t.consume();
                });
                break;
            case "rect":
                double largRect = points[2] - points[0];
                double hautRect = points[3] - points[1];
                Rectangle rect = new Rectangle(points[0], points[1], largRect, hautRect);
                rect.setFill(Color.rgb(255, 255, 0, 0.5));
                rect.setStroke(Color.FORESTGREEN);
                rect.setCursor(Cursor.DEFAULT);
                apImgBarrePersonnalisee.getChildren().add(rect);
                rect.setId(strIdZone);
                rect.setOnMouseClicked((t) -> {
                    choixZone(iLargeur, iHauteur, bMasqueZones, strIdZone, t);
                    t.consume();
                });
                break;
            case "poly":
                Polygon poly = new Polygon(points);
                poly.setFill(Color.rgb(255, 255, 0, 0.5));
                poly.setStroke(Color.FORESTGREEN);
                poly.setStrokeWidth(3);
                poly.setCursor(Cursor.DEFAULT);
                poly.setStrokeLineCap(StrokeLineCap.ROUND);
                poly.setId(strIdZone);
                apImgBarrePersonnalisee.getChildren().add(poly);
                poly.setOnMouseClicked((t) -> {
                    choixZone(iLargeur, iHauteur, bMasqueZones, strIdZone, t);
                    t.consume();
                });
                break;
            }
        }
    }
}

From source file:org.openbase.display.DisplayView.java

/**
 * {@inheritDoc}/* w  w  w.  ja v a 2s  .c  om*/
 *
 * @param presetId
 * @throws org.openbase.jul.exception.CouldNotPerformException
 */
@Override
public Future<Void> showInfoText(final String presetId) throws CouldNotPerformException {
    return displayHTML(htmlLoader.loadTextView(presetId, Color.FORESTGREEN.darker()), true);
}

From source file:org.openbase.display.DisplayView.java

/**
 * {@inheritDoc}/* w  w w .  j  a  v a  2 s . c o m*/
 *
 * @param presetId
 * @throws org.openbase.jul.exception.CouldNotPerformException
 */
@Override
public Future<Void> setInfoText(final String presetId) throws CouldNotPerformException {
    return displayHTML(htmlLoader.loadTextView(presetId, Color.FORESTGREEN.darker()), false);
}