******************** Initialization ************************************
491414
@Override protected void initGraphics() {
        // Set initial size
        if (Double.compare(getSkinnable().getPrefWidth(), 0.0) <= 0 || Double.compare(getSkinnable().getPrefHeight(), 0.0) <= 0 ||
            Double.compare(getSkinnable().getWidth(), 0.0) <= 0 || Double.compare(getSkinnable().getHeight(), 0.0) <= 0) {
            if (getSkinnable().getPrefWidth() > 0 && getSkinnable().getPrefHeight() > 0) {
                getSkinnable().setPrefSize(getSkinnable().getPrefWidth(), getSkinnable().getPrefHeight());
            } else {
                getSkinnable().setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
            }
        }

        sectionsAndAreasCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        sectionsAndAreasCtx    = sectionsAndAreasCanvas.getGraphicsContext2D();

        tickCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        tickCtx    = tickCanvas.getGraphicsContext2D();

        alarmPane = new Pane();

        hour = new Rectangle(3, 60);
        hour.setArcHeight(3);
        hour.setArcWidth(3);
        hour.setStroke(getSkinnable().getHourColor());
        hour.getTransforms().setAll(hourRotate);

        minute = new Rectangle(3, 96);
        minute.setArcHeight(3);
        minute.setArcWidth(3);
        minute.setStroke(getSkinnable().getMinuteColor());
        minute.getTransforms().setAll(minuteRotate);

        second = new Rectangle(1, 96);
        second.setArcHeight(1);
        second.setArcWidth(1);
        second.setStroke(getSkinnable().getSecondColor());
        second.getTransforms().setAll(secondRotate);
        second.setVisible(getSkinnable().isSecondsVisible());
        second.setManaged(getSkinnable().isSecondsVisible());

        knob = new Circle(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, 4.5);
        knob.setStroke(Color.web("#282a3280"));

        dropShadow = new DropShadow();
        dropShadow.setColor(Color.rgb(0, 0, 0, 0.25));
        dropShadow.setBlurType(BlurType.TWO_PASS_BOX);
        dropShadow.setRadius(0.015 * PREFERRED_WIDTH);
        dropShadow.setOffsetY(0.015 * PREFERRED_WIDTH);

        shadowGroupHour   = new Group(hour);
        shadowGroupMinute = new Group(minute);
        shadowGroupSecond = new Group(second, knob);

        shadowGroupHour.setEffect(getSkinnable().getShadowsEnabled() ? dropShadow : null);
        shadowGroupMinute.setEffect(getSkinnable().getShadowsEnabled() ? dropShadow : null);
        shadowGroupSecond.setEffect(getSkinnable().getShadowsEnabled() ? dropShadow : null);

        title = new Text("");
        title.setVisible(getSkinnable().isTitleVisible());
        title.setManaged(getSkinnable().isTitleVisible());

        dateText = new Text("");
        dateText.setVisible(getSkinnable().isDateVisible());
        dateText.setManaged(getSkinnable().isDateVisible());

        text = new Text("");
        text.setVisible(getSkinnable().isTextVisible());
        text.setManaged(getSkinnable().isTextVisible());

        pane = new Pane(sectionsAndAreasCanvas, tickCanvas, alarmPane, title, dateText, text, shadowGroupHour, shadowGroupMinute, shadowGroupSecond);
        pane.setBorder(new Border(new BorderStroke(getSkinnable().getBorderPaint(), BorderStrokeStyle.SOLID, new CornerRadii(1024), new BorderWidths(getSkinnable().getBorderWidth()))));
        pane.setBackground(new Background(new BackgroundFill(getSkinnable().getBackgroundPaint(), new CornerRadii(1024), Insets.EMPTY)));

        getChildren().setAll(pane);
    }
360394
@Override protected void initGraphics() {
        // Set initial size
        if (Double.compare(clock.getPrefWidth(), 0.0) <= 0 || Double.compare(clock.getPrefHeight(), 0.0) <= 0 ||
            Double.compare(clock.getWidth(), 0.0) <= 0 || Double.compare(clock.getHeight(), 0.0) <= 0) {
            if (clock.getPrefWidth() > 0 && clock.getPrefHeight() > 0) {
                clock.setPrefSize(clock.getPrefWidth(), clock.getPrefHeight());
            } else {
                clock.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
            }
        }

        ZonedDateTime time = clock.getTime();

        secondBackgroundCircle = new Circle(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.48);
        secondBackgroundCircle.setStrokeWidth(PREFERRED_WIDTH * 0.008);
        secondBackgroundCircle.setStrokeType(StrokeType.CENTERED);
        secondBackgroundCircle.setStrokeLineCap(StrokeLineCap.ROUND);
        secondBackgroundCircle.setFill(null);
        secondBackgroundCircle.setStroke(Helper.getTranslucentColorFrom(clock.getSecondColor(), 0.2));
        secondBackgroundCircle.setVisible(clock.isSecondsVisible());
        secondBackgroundCircle.setManaged(clock.isSecondsVisible());

        dateText = new Text(DATE_TEXT_FORMATTER.format(time));
        dateText.setVisible(clock.isDateVisible());
        dateText.setManaged(clock.isDateVisible());

        hour = new Text(HOUR_FORMATTER.format(time));
        hour.setFill(clock.getHourColor());

        minute = new Text(MINUTE_FORMATTER.format(time));
        minute.setFill(clock.getMinuteColor());

        minuteCircle = new Circle(0.075 * PREFERRED_WIDTH);

        secondArc = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.96, PREFERRED_WIDTH * 0.48, 90, (-6 * clock.getTime().getSecond()));
        secondArc.setStrokeWidth(PREFERRED_WIDTH * 0.008);
        secondArc.setStrokeType(StrokeType.CENTERED);
        secondArc.setStrokeLineCap(StrokeLineCap.BUTT);
        secondArc.setFill(null);
        secondArc.setStroke(clock.getSecondColor());
        secondArc.setVisible(clock.isSecondsVisible());
        secondArc.setManaged(clock.isSecondsVisible());

        pane = new Pane(secondBackgroundCircle, dateText, hour, secondArc, minuteCircle, minute);
        pane.setBackground(new Background(new BackgroundFill(clock.getBackgroundPaint(), new CornerRadii(1024), new Insets(PREFERRED_WIDTH * 0.04))));

        getChildren().setAll(pane);
    }
923523
private void initGraphics() {
        // Set initial size
        if (Double.compare(gauge.getPrefWidth(), 0.0) <= 0 || Double.compare(gauge.getPrefHeight(), 0.0) <= 0 ||
            Double.compare(gauge.getWidth(), 0.0) <= 0 || Double.compare(gauge.getHeight(), 0.0) <= 0) {
            if (gauge.getPrefWidth() > 0 && gauge.getPrefHeight() > 0) {
                gauge.setPrefSize(gauge.getPrefWidth(), gauge.getPrefHeight());
            } else {
                gauge.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
            }
        }

        graphBounds = new Rectangle(PREFERRED_WIDTH * 0.05, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.9, PREFERRED_HEIGHT * 0.45);

        titleText = new Text(gauge.getTitle());
        titleText.setFill(gauge.getTitleColor());
        Helper.enableNode(titleText, !gauge.getTitle().isEmpty());

        valueText = new Text(String.format(locale, formatString, gauge.getValue()));
        valueText.setFill(gauge.getValueColor());
        Helper.enableNode(valueText, gauge.isValueVisible());

        unitText = new Text(gauge.getUnit());
        unitText.setFill(gauge.getUnitColor());
        Helper.enableNode(unitText, !gauge.getUnit().isEmpty());

        averageText = new Text(String.format(locale, formatString, gauge.getAverage()));
        averageText.setFill(gauge.getAverageColor());
        Helper.enableNode(averageText, gauge.isAverageVisible());

        highText = new Text();
        highText.setTextOrigin(VPos.BOTTOM);
        highText.setFill(gauge.getValueColor());

        lowText = new Text();
        lowText.setTextOrigin(VPos.TOP);
        lowText.setFill(gauge.getValueColor());

        subTitleText = new Text(gauge.getSubTitle());
        subTitleText.setTextOrigin(VPos.TOP);
        subTitleText.setFill(gauge.getSubTitleColor());

        stdDeviationArea = new Rectangle();
        Helper.enableNode(stdDeviationArea, gauge.isAverageVisible());

        averageLine = new Line();
        averageLine.setStroke(gauge.getAverageColor());
        averageLine.getStrokeDashArray().addAll(PREFERRED_WIDTH * 0.005, PREFERRED_WIDTH * 0.005);
        Helper.enableNode(averageLine, gauge.isAverageVisible());

        pathElements = new ArrayList<>(noOfDatapoints);
        pathElements.add(0, new MoveTo());
        for (int i = 1 ; i < noOfDatapoints ; i++) { pathElements.add(i, new LineTo()); }

        sparkLine = new Path();
        sparkLine.getElements().addAll(pathElements);
        sparkLine.setFill(null);
        sparkLine.setStroke(gauge.getBarColor());
        sparkLine.setStrokeWidth(PREFERRED_WIDTH * 0.0075);
        sparkLine.setStrokeLineCap(StrokeLineCap.ROUND);
        sparkLine.setStrokeLineJoin(StrokeLineJoin.ROUND);

        dot = new Circle();
        dot.setFill(gauge.getBarColor());

        pane = new Pane(titleText, valueText, unitText, stdDeviationArea, averageLine, sparkLine, dot, averageText, highText, lowText, subTitleText);
        pane.setBorder(new Border(new BorderStroke(gauge.getBorderPaint(), BorderStrokeStyle.SOLID, new CornerRadii(PREFERRED_WIDTH * 0.025), new BorderWidths(gauge.getBorderWidth()))));
        pane.setBackground(new Background(new BackgroundFill(gauge.getBackgroundPaint(), new CornerRadii(PREFERRED_WIDTH * 0.025), Insets.EMPTY)));

        getChildren().setAll(pane);
    }
107758
private void initGraphics() {
        // Set initial size
        if (Double.compare(gauge.getPrefWidth(), 0.0) <= 0 || Double.compare(gauge.getPrefHeight(), 0.0) <= 0 ||
            Double.compare(gauge.getWidth(), 0.0) <= 0 || Double.compare(gauge.getHeight(), 0.0) <= 0) {
            if (gauge.getPrefWidth() > 0 && gauge.getPrefHeight() > 0) {
                gauge.setPrefSize(gauge.getPrefWidth(), gauge.getPrefHeight());
            } else {
                gauge.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
            }
        }

        sectionCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        sectionCtx    = sectionCanvas.getGraphicsContext2D();

        barBackground = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.4, PREFERRED_HEIGHT * 0.4, gauge.getStartAngle() + 150, ANGLE_RANGE);
        barBackground.setType(ArcType.OPEN);
        barBackground.setStroke(gauge.getBarBackgroundColor());
        barBackground.setStrokeWidth(PREFERRED_WIDTH * 0.125);
        barBackground.setStrokeLineCap(StrokeLineCap.BUTT);
        barBackground.setFill(null);

        bar = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.4, PREFERRED_HEIGHT * 0.4, gauge.getStartAngle() + 90, 0);
        bar.setType(ArcType.OPEN);
        bar.setStroke(gauge.getBarColor());
        bar.setStrokeWidth(PREFERRED_WIDTH * 0.125);
        bar.setStrokeLineCap(StrokeLineCap.BUTT);
        bar.setFill(null);

        titleText = new Text(gauge.getTitle());
        titleText.setFill(gauge.getTitleColor());
        Helper.enableNode(titleText, !gauge.getTitle().isEmpty());

        valueText = new Text();
        valueText.setStroke(null);
        valueText.setFill(gauge.getValueColor());
        Helper.enableNode(valueText, gauge.isValueVisible());

        unitText = new Text();
        unitText.setStroke(null);
        unitText.setFill(gauge.getUnitColor());
        Helper.enableNode(unitText, gauge.isValueVisible() && !gauge.getUnit().isEmpty());

        pane = new Pane(barBackground, sectionCanvas, titleText, valueText, unitText, bar);

        getChildren().setAll(pane);
    }
1259417
@PostConstruct
  public void initialize() {

    if (this.initializationState.setInitializing()) {
      if (this.visibility == null) {
        this.visibility = VisibilityModifier.PUBLIC;
      }
      this.initializationState.setInitialized();
    }
  }
202185
@Override protected void initGraphics() {
        super.initGraphics();

        if (tile.isAutoScale()) tile.calcAutoScale();
        minValue             = tile.getMinValue();
        range                = tile.getRange();
        angleStep            = ANGLE_RANGE / range;
        sectionsVisible      = tile.getSectionsVisible();
        sections             = tile.getSections();
        formatString         = new StringBuilder("%.").append(Integer.toString(tile.getDecimals())).append("f").toString();
        locale               = tile.getLocale();
        currentValueListener = o -> setBar(tile.getCurrentValue());

        graphicListener      = (o, ov, nv) -> { if (nv != null) { graphicContainer.getChildren().setAll(tile.getGraphic()); }};

        titleText = new Text();
        titleText.setFill(tile.getTitleColor());
        enableNode(titleText, !tile.getTitle().isEmpty());

        text = new Text(tile.getText());
        text.setFill(tile.getTextColor());
        enableNode(text, tile.isTextVisible());

        barBackground = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.468, PREFERRED_HEIGHT * 0.468, 90, 360);
        barBackground.setType(ArcType.OPEN);
        barBackground.setStroke(tile.getBarBackgroundColor());
        barBackground.setStrokeWidth(PREFERRED_WIDTH * 0.1);
        barBackground.setStrokeLineCap(StrokeLineCap.BUTT);
        barBackground.setFill(null);

        bar = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.468, PREFERRED_HEIGHT * 0.468, 90, 0);
        bar.setType(ArcType.OPEN);
        bar.setStroke(tile.getBarColor());
        bar.setStrokeWidth(PREFERRED_WIDTH * 0.1);
        bar.setStrokeLineCap(StrokeLineCap.BUTT);
        bar.setFill(null);

        separator = new Line(PREFERRED_WIDTH * 0.5, 1, PREFERRED_WIDTH * 0.5, 0.16667 * PREFERRED_HEIGHT);
        separator.setStroke(tile.getBackgroundColor());
        separator.setFill(Color.TRANSPARENT);

        percentageValueText = new Text(String.format(locale, formatString, tile.getCurrentValue()));
        percentageValueText.setFont(Fonts.latoRegular(PREFERRED_WIDTH * 0.27333));
        percentageValueText.setFill(tile.getValueColor());
        percentageValueText.setTextOrigin(VPos.CENTER);

        percentageUnitText = new Text(tile.getUnit());
        percentageUnitText = new Text("\u0025");
        percentageUnitText.setFont(Fonts.latoLight(PREFERRED_WIDTH * 0.08));
        percentageUnitText.setFill(tile.getUnitColor());

        percentageFlow = new TextFlow(percentageValueText, percentageUnitText);
        percentageFlow.setTextAlignment(TextAlignment.CENTER);

        valueText = new Text(String.format(locale, formatString, tile.getCurrentValue()));
        valueText.setFont(Fonts.latoRegular(PREFERRED_WIDTH * 0.27333));
        valueText.setFill(tile.getValueColor());
        valueText.setTextOrigin(VPos.CENTER);
        enableNode(valueText, tile.isValueVisible());

        unitText = new Text(tile.getUnit());
        unitText = new Text("\u0025");
        unitText.setFont(Fonts.latoLight(PREFERRED_WIDTH * 0.08));
        unitText.setFill(tile.getUnitColor());
        enableNode(unitText, !tile.getUnit().isEmpty());

        valueUnitFlow = new TextFlow(valueText, unitText);
        valueUnitFlow.setTextAlignment(TextAlignment.CENTER);

        graphicContainer = new StackPane();
        graphicContainer.setMinSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
        graphicContainer.setMaxSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
        graphicContainer.setPrefSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
        if (null == tile.getGraphic()) {
            enableNode(graphicContainer, false);
        } else {
            graphicContainer.getChildren().setAll(tile.getGraphic());
        }

        getPane().getChildren().addAll(barBackground, bar, separator, titleText, text, graphicContainer, percentageFlow, valueUnitFlow);
    }
71718
@Override protected void initGraphics() {
        super.initGraphics();

        mouseEventHandler = e -> {
            final EventType TYPE = e.getEventType();
            final Object    SRC  = e.getSource();
            if (MouseEvent.MOUSE_PRESSED == TYPE) {
                if (SRC.equals(thumb)) {
                    dragStart = thumb.localToParent(e.getX(), e.getY());
                    formerThumbPos = (tile.getCurrentValue() - minValue) / range;
                    tile.fireTileEvent(VALUE_CHANGING);
                } else if (SRC.equals(switchBorder)) {
                    tile.setActive(!tile.isActive());
                    tile.fireEvent(SWITCH_PRESSED);
                }
            } else if (MouseEvent.MOUSE_DRAGGED == TYPE) {
                Point2D currentPos = thumb.localToParent(e.getX(), e.getY());
                double  dragPos    = currentPos.getX() - dragStart.getX();
                thumbDragged((formerThumbPos + dragPos / trackLength));
            } else if (MouseEvent.MOUSE_RELEASED == TYPE) {
                if (SRC.equals(thumb)) {
                    tile.fireTileEvent(VALUE_CHANGED);
                } else if (SRC.equals(switchBorder)) {
                    tile.fireEvent(SWITCH_RELEASED);
                }
            }
        };
        selectedListener  = o -> moveThumb();
        valueListener     = o -> {
            if (tile.isActive() && tile.getValue() != tile.getMinValue()) {
                thumb.setFill(tile.getBarColor());
            } else {
                thumb.setFill(tile.getForegroundColor());
            }
        };

        timeline = new Timeline();
        timeline.setOnFinished(event -> thumb.setFill(tile.isActive() ? tile.getBarColor() : tile.getForegroundColor()));

        titleText = new Text();
        titleText.setFill(tile.getTitleColor());
        Helper.enableNode(titleText, !tile.getTitle().isEmpty());

        text = new Text(tile.getText());
        text.setFill(tile.getUnitColor());
        Helper.enableNode(text, tile.isTextVisible());

        valueText = new Text(String.format(locale, formatString, ((tile.getValue() - minValue) / range * 100)));
        valueText.setFill(tile.getValueColor());
        Helper.enableNode(valueText, tile.isValueVisible());

        unitText = new Text(tile.getUnit());
        unitText.setFill(tile.getUnitColor());
        Helper.enableNode(unitText, !tile.getUnit().isEmpty());

        valueUnitFlow = new TextFlow(valueText, unitText);
        valueUnitFlow.setTextAlignment(TextAlignment.RIGHT);

        description = new Label(tile.getDescription());
        description.setAlignment(tile.getDescriptionAlignment());
        description.setWrapText(true);
        description.setTextFill(tile.getTextColor());
        Helper.enableNode(description, !tile.getDescription().isEmpty());

        barBackground = new Rectangle(PREFERRED_WIDTH * 0.795, PREFERRED_HEIGHT * 0.0275);

        bar = new Rectangle(0, PREFERRED_HEIGHT * 0.0275);

        thumb = new Circle(PREFERRED_WIDTH * 0.09);
        thumb.setEffect(shadow);

        switchBorder = new Rectangle();

        switchBackground = new Rectangle();
        switchBackground.setMouseTransparent(true);
        switchBackground.setFill(tile.isActive() ? tile.getActiveColor() : tile.getBackgroundColor());

        switchThumb = new Circle();
        switchThumb.setMouseTransparent(true);
        switchThumb.setEffect(shadow);

        getPane().getChildren().addAll(titleText, text, valueUnitFlow, description,
                                       barBackground, bar, thumb,
                                       switchBorder, switchBackground, switchThumb);
    }
1304481
@Override protected void initGraphics() {
        super.initGraphics();

        radarChart = new RadarChart(tile.getChartData());
        radarChart.setMaxValue(tile.getMaxValue());
        radarChart.setUnit(tile.getUnit());
        radarChart.setLegendVisible(true);
        radarChart.setThresholdVisible(tile.isThresholdVisible());
        radarChart.setMode(tile.getRadarChartMode());
        radarChart.setGridColor(tile.getChartGridColor());
        radarChart.setChartTextColor(tile.getTextColor());
        radarChart.setThresholdColor(tile.getThresholdColor());
        radarChart.setGradientStops(tile.getGradientStops());

        chartEventListener = e -> radarChart.redraw();
        tile.getChartData().forEach(chartData -> chartData.addChartDataEventListener(chartEventListener));

        chartDataListener  = c -> {
            while (c.next()) {
                if (c.wasAdded()) {
                    c.getAddedSubList().forEach(addedItem -> addedItem.addChartDataEventListener(chartEventListener));
                } else if (c.wasRemoved()) {
                    c.getRemoved().forEach(removedItem -> removedItem.removeChartDataEventListener(chartEventListener));
                }
            }
            radarChart.redraw();
        };

        titleText = new Text();
        titleText.setFill(tile.getTitleColor());
        Helper.enableNode(titleText, !tile.getTitle().isEmpty());

        text = new Text(tile.getText());
        text.setFill(tile.getTextColor());
        Helper.enableNode(text, tile.isTextVisible());

        getPane().getChildren().addAll(titleText, radarChart, text);
    }
453373
@Override protected void initGraphics() {
        super.initGraphics();

        timeline              = new Timeline();
        characters            = tile.getCharacterList();
        currentSelectionIndex = 0;
        nextSelectionIndex    = 1;

        centerX    = PREFERRED_WIDTH * 0.5;
        centerY    = PREFERRED_HEIGHT * 0.5;

        pane.setBackground(null);
        pane.setBorder(null);

        rotateFlap = new Rotate();
        rotateFlap.setAxis(Rotate.X_AXIS);
        rotateFlap.setAngle(0);

        flapHeight = PREFERRED_HEIGHT * 0.495;

        upperBackground    = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT * 0.495);
        upperBackgroundCtx = upperBackground.getGraphicsContext2D();

        upperBackgroundText    = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT * 0.495);
        upperBackgroundTextCtx = upperBackgroundText.getGraphicsContext2D();
        upperBackgroundTextCtx.setTextBaseline(VPos.CENTER);
        upperBackgroundTextCtx.setTextAlign(TextAlignment.CENTER);

        lowerBackground    = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT * 0.495);
        lowerBackgroundCtx = lowerBackground.getGraphicsContext2D();

        lowerBackgroundText    = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT * 0.495);
        lowerBackgroundTextCtx = lowerBackgroundText.getGraphicsContext2D();
        lowerBackgroundTextCtx.setTextBaseline(VPos.CENTER);
        lowerBackgroundTextCtx.setTextAlign(TextAlignment.CENTER);

        flap = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT * 0.495);
        flap.getTransforms().add(rotateFlap);
        flapCtx = flap.getGraphicsContext2D();

        flapTextFront = new Canvas();
        flapTextFront.getTransforms().add(rotateFlap);
        flapTextFrontCtx = flapTextFront.getGraphicsContext2D();
        flapTextFrontCtx.setTextBaseline(VPos.CENTER);
        flapTextFrontCtx.setTextAlign(TextAlignment.CENTER);

        flapTextBack  = new Canvas();
        flapTextBack.getTransforms().add(rotateFlap);
        flapTextBack.setOpacity(0);
        flapTextBackCtx = flapTextBack.getGraphicsContext2D();
        flapTextBackCtx.setTextBaseline(VPos.CENTER);
        flapTextBackCtx.setTextAlign(TextAlignment.CENTER);

        pane.getChildren().addAll(upperBackground,
                                  lowerBackground,
                                  upperBackgroundText,
                                  lowerBackgroundText,
                                  flap,
                                  flapTextFront,
                                  flapTextBack);
    }
591015
@Override protected void initGraphics() {
        // Set initial size
        if (Double.compare(clock.getPrefWidth(), 0.0) <= 0 || Double.compare(clock.getPrefHeight(), 0.0) <= 0 ||
            Double.compare(clock.getWidth(), 0.0) <= 0 || Double.compare(clock.getHeight(), 0.0) <= 0) {
            if (clock.getPrefWidth() > 0 && clock.getPrefHeight() > 0) {
                clock.setPrefSize(clock.getPrefWidth(), clock.getPrefHeight());
            } else {
                clock.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
            }
        }

        timeText = new Text();
        timeText.setTextOrigin(VPos.CENTER);
        timeText.setFill(textColor);

        dateText = new Text();
        dateText.setTextOrigin(VPos.CENTER);
        dateText.setFill(dateColor);

        pane = new Pane(timeText, dateText);
        pane.setBorder(new Border(new BorderStroke(clock.getBorderPaint(), BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(clock.getBorderWidth()))));
        pane.setBackground(new Background(new BackgroundFill(clock.getBackgroundPaint(), CornerRadii.EMPTY, Insets.EMPTY)));

        getChildren().setAll(pane);
    }
1018490
@Override protected void initGraphics() {
        super.initGraphics();

        darkSky = tile.getDarkSky();

        titleText = new Text(tile.getTitle());
        titleText.setFill(tile.getTitleColor());
        Helper.enableNode(titleText, !tile.getTitle().isEmpty());

        valueText = new Text();

        unitText = new Text(darkSky.getUnit().temperatureUnitString);

        text = new Text("");
        text.setFill(tile.getTextColor());

        sunriseSymbol = new WeatherSymbol(ConditionAndIcon.SUNRISE, 22, tile.getForegroundColor());
        sunsetSymbol = new WeatherSymbol(ConditionAndIcon.SUNSET, 22, tile.getForegroundColor());

        sunriseText = new Text("");
        sunriseText.setTextOrigin(VPos.CENTER);
        sunriseText.setFill(tile.getTextColor());

        sunsetText = new Text("");
        sunsetText.setTextOrigin(VPos.CENTER);
        sunsetText.setFill(tile.getTextColor());

        sunriseBox = new HBox(sunriseSymbol, sunriseText);
        sunriseBox.setAlignment(Pos.CENTER_RIGHT);

        sunsetBox = new HBox(sunsetSymbol, sunsetText);
        sunsetBox.setAlignment(Pos.CENTER_RIGHT);

        weatherSymbol = new WeatherSymbol(ConditionAndIcon.NONE, 250, tile.getForegroundColor());

        getPane().getChildren().addAll(titleText, valueText, unitText, weatherSymbol, text, sunriseBox, sunsetBox);
    }
574051
@Override protected void initGraphics() {
        super.initGraphics();

        mouseHandler     = event -> { if (event.getClickCount() == 2) { centerLocation(); } };
        locationListener = e -> redraw();
        poiListener      = c -> {
            while (c.next()) {
                if (c.wasPermutated()) {      // Get items that have been permutated in list
                    for (int i = c.getFrom(); i < c.getTo(); ++i) {
                        updatePoi(tile.getPoiList().get(i));
                    }
                } else if (c.wasUpdated()) {  // Get items that have been updated in list
                    for (int i = c.getFrom(); i < c.getTo(); ++i) {
                        updatePoi(tile.getPoiList().get(i));
                    }
                } else if (c.wasAdded()) {
                    c.getAddedSubList().forEach(poi -> addPoi(poi));
                } else if (c.wasRemoved()) {
                    c.getRemoved().forEach(poi -> removePoi(poi));
                }
            }
        };

        titleText = new Text();
        titleText.setFill(tile.getTitleColor());
        Helper.enableNode(titleText, !tile.getTitle().isEmpty());

        text = new Text(tile.getText());
        text.setFill(tile.getTextColor());
        Helper.enableNode(text, tile.isTextVisible());

        webView = new WebView();
        webView.setMinSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
        webView.setMaxSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
        webView.setPrefSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
        webEngine = webView.getEngine();
        webEngine.getLoadWorker().stateProperty().addListener((ov, o, n) -> {
            if (Worker.State.SUCCEEDED == n) {
                readyToGo = true;
                if (MapProvider.BW != tile.getMapProvider()) { changeMapProvider(tile.getMapProvider()); }
                updateLocation();
                updateLocationColor();
                tile.getPoiList().forEach(poi -> addPoi(poi));
                addTrack(tile.getTrack());
                updateTrackColor();
            }
        });
        URL maps = Tile.class.getResource("osm.html");
        webEngine.load(maps.toExternalForm());

        getPane().getChildren().addAll(titleText, webView, text);
    }
411851
private void initGraphics() {
        // Set initial size
        if (Double.compare(gauge.getPrefWidth(), 0.0) <= 0 || Double.compare(gauge.getPrefHeight(), 0.0) <= 0 ||
            Double.compare(gauge.getWidth(), 0.0) <= 0 || Double.compare(gauge.getHeight(), 0.0) <= 0) {
            if (gauge.getPrefWidth() > 0 && gauge.getPrefHeight() > 0) {
                gauge.setPrefSize(gauge.getPrefWidth(), gauge.getPrefHeight());
            } else {
                gauge.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
            }
        }

        Color barColor = gauge.getBarColor();
        gauge.setGradientBarStops(new Stop(0.0, barColor),
                                           new Stop(0.01, barColor),
                                           new Stop(0.75, barColor.deriveColor(-10, 1, 1, 1)),
                                           new Stop(1.0, barColor.deriveColor(-20, 1, 1, 1)));

        shadow = new DropShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.45), 0.01 * PREFERRED_WIDTH, 0, 0.01 * PREFERRED_WIDTH, 0);

        circle = new Circle();
        circle.setFill(null);

        arc = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.96, PREFERRED_WIDTH * 0.48, 90, 0);
        arc.setStrokeWidth(PREFERRED_WIDTH * 0.008);
        arc.setStrokeType(StrokeType.CENTERED);
        arc.setStrokeLineCap(StrokeLineCap.ROUND);
        arc.setFill(null);

        fakeDot = new Circle();
        fakeDot.setStroke(null);

        dot = new Circle();
        dot.setStroke(null);
        dot.setVisible(false);
        dot.setEffect(shadow);

        titleText = new Text(gauge.getTitle());
        titleText.setFont(Fonts.robotoLight(PREFERRED_WIDTH * 0.5));
        titleText.setFill(gauge.getTitleColor());
        Helper.enableNode(titleText, !gauge.getTitle().isEmpty());

        valueText = new Text(formatNumber(gauge.getLocale(), gauge.getFormatString(), gauge.getDecimals(), gauge.getCurrentValue()));
        valueText.setFont(Fonts.robotoRegular(PREFERRED_WIDTH * 0.27333));
        valueText.setFill(gauge.getValueColor());
        Helper.enableNode(valueText, gauge.isValueVisible());

        unitText = new Text(gauge.getUnit());
        unitText.setFont(Fonts.robotoLight(PREFERRED_WIDTH * 0.08));
        unitText.setFill(gauge.getUnitColor());
        Helper.enableNode(unitText, !gauge.getUnit().isEmpty());

        pane = new Pane(circle, arc, fakeDot, dot, titleText, valueText, unitText);

        getChildren().setAll(pane);
    }
314138
private void init() {
        width = Double.MAX_VALUE;
        for (int i = 1; i < data.length; i++) {
            double w = Math.abs(data[i][0] - data[i - 1][0]);
            if (width > w) {
                width = w;
            }
        }

        leftTop = new double[data.length][2];
        rightTop = new double[data.length][2];
        leftBottom = new double[data.length][2];
        rightBottom = new double[data.length][2];

        for (int i = 0; i < data.length; i++) {
            leftTop[i][0] = data[i][0] - width / 2;
            leftTop[i][1] = data[i][1];

            rightTop[i][0] = data[i][0] + width / 2;
            rightTop[i][1] = data[i][1];

            leftBottom[i][0] = data[i][0] - width / 2;
            leftBottom[i][1] = 0;

            rightBottom[i][0] = data[i][0] + width / 2;
            rightBottom[i][1] = 0;
        }
    }
402151
private void initialize() {
        this.setContinuousLayout(true);
        this.setRightComponent(getJPanel1());
        // ZAP: added more space for readability (was 175)
        this.setDividerLocation(200);
        this.setDividerSize(3);
        this.setResizeWeight(0.3D);
        this.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED));
        this.setLeftComponent(getJScrollPane());

    }
336192
private void init() {
        // null implies "no expression"
        value_ = type_ = pattern_ = null;
        currencyCode_ = currencySymbol_ = null;
        groupingUsed_ = null;
        maxIntegerDigits_ = minIntegerDigits_ = null;
        maxFractionDigits_ = minFractionDigits_ = null;
    }
620097
private void initGraphics() {
        // prefill matrix with pixelOffColor
        for (int y = 0 ; y < rows ; y++) {
            for (int x = 0 ; x < cols ; x++) {
                matrix[x][y] = pixelOffColor;
            }
        }

        if (Double.compare(getPrefWidth(), 0.0) <= 0 || Double.compare(getPrefHeight(), 0.0) <= 0 ||
            Double.compare(getWidth(), 0.0) <= 0 || Double.compare(getHeight(), 0.0) <= 0) {
            if (getPrefWidth() > 0 && getPrefHeight() > 0) {
                setPrefSize(getPrefWidth(), getPrefHeight());
            } else {
                setPrefSize(preferredWidth, preferredHeight);
            }
        }

        canvas = new Canvas(preferredWidth, preferredHeight);
        ctx = canvas.getGraphicsContext2D();

        getChildren().setAll(canvas);
        canvas.addEventHandler(MouseEvent.MOUSE_PRESSED, clickHandler);
    }