Java Code Examples for javafx.scene.layout.HBox#setMouseTransparent()

The following examples show how to use javafx.scene.layout.HBox#setMouseTransparent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultipleAxesLineChart.java    From chart-fx with Apache License 2.0 6 votes vote down vote up
private Node resizeBackgroundChart(final LineChart<?, ?> lineChart) {
    final HBox hBox = new HBox(lineChart);
    hBox.setAlignment(Pos.CENTER_LEFT);
    hBox.prefHeightProperty().bind(heightProperty());
    hBox.prefWidthProperty().bind(widthProperty());
    hBox.setMouseTransparent(true);

    lineChart.minWidthProperty()
            .bind(widthProperty().subtract((yAxisWidth + yAxisSeparation) * backgroundCharts.size()));
    lineChart.prefWidthProperty()
            .bind(widthProperty().subtract((yAxisWidth + yAxisSeparation) * backgroundCharts.size()));
    lineChart.maxWidthProperty()
            .bind(widthProperty().subtract((yAxisWidth + yAxisSeparation) * backgroundCharts.size()));

    lineChart.translateXProperty().bind(baseChart.getYAxis().widthProperty());
    lineChart.getYAxis().setTranslateX((yAxisWidth + yAxisSeparation) * backgroundCharts.indexOf(lineChart));
    lineChart.getXAxis().tickLabelRotationProperty().bind(baseChart.getXAxis().tickLabelRotationProperty());
    return hBox;
}
 
Example 2
Source File: ParetoInfoPopup.java    From charts with Apache License 2.0 5 votes vote down vote up
private void initGraphics() {
    regularFont = Fonts.latoRegular(10);
    lightFont   = Fonts.latoLight(10);

    itemText = new Text("NAME");
    itemText.setFill(_textColor);
    itemText.setFont(regularFont);

    itemNameText = new Text("-");
    itemNameText.setFill(_textColor);
    itemNameText.setFont(regularFont);

    line = new Line(0, 0, 0, 56);
    line.setStroke(_textColor);

    vBoxTitles = new VBox(2, itemText);
    vBoxTitles.setAlignment(Pos.CENTER_LEFT);
    VBox.setMargin(itemText, new Insets(3, 0, 0, 0));

    vBoxValues = new VBox(2, itemNameText);

    vBoxValues.setAlignment(Pos.CENTER_RIGHT);
    VBox.setMargin(itemNameText, new Insets(3, 0, 0, 0));
    HBox.setHgrow(vBoxValues, Priority.ALWAYS);

    hBox = new HBox(5, vBoxTitles, line, vBoxValues);
    hBox.setPrefSize(120, 69);
    hBox.setPadding(new Insets(5));
    hBox.setBackground(new Background(new BackgroundFill(_backgroundColor, new CornerRadii(3), Insets.EMPTY)));
    hBox.setMouseTransparent(true);

    getContent().addAll(hBox);
}
 
Example 3
Source File: FireSmokeTileSkin.java    From tilesfx with Apache License 2.0 5 votes vote down vote up
@Override protected void initGraphics() {
    super.initGraphics();

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

    valueText = new Text();
    valueText.setFill(tile.getValueColor());
    valueText.setTextOrigin(VPos.BASELINE);
    Helper.enableNode(valueText, tile.isValueVisible());

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

    fractionLine = new Line();

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

    unitFlow = new VBox(upperUnitText, unitText);
    unitFlow.setAlignment(Pos.CENTER_RIGHT);

    valueUnitFlow = new HBox(valueText, unitFlow);
    //valueUnitFlow.setAlignment(Pos.CENTER);
    valueUnitFlow.setAlignment(Pos.BOTTOM_CENTER);
    valueUnitFlow.setMouseTransparent(true);

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

    smoke = new Smoke();
    fire  = new Fire();

    getPane().getChildren().addAll(titleText, valueUnitFlow, fractionLine, text, smoke, fire);
}
 
Example 4
Source File: InfoPopup.java    From charts with Apache License 2.0 4 votes vote down vote up
private void initGraphics() {
    Font regularFont = Fonts.latoRegular(10);
    Font lightFont   = Fonts.latoLight(10);

    seriesText = new Text("SERIES");
    seriesText.setFill(_textColor);
    seriesText.setFont(regularFont);

    seriesNameText = new Text("-");
    seriesNameText.setFill(_textColor);
    seriesNameText.setFont(lightFont);

    seriesSumText = new Text("SUM");
    seriesSumText.setFill(_textColor);
    seriesSumText.setFont(regularFont);

    seriesValueText = new Text("-");
    seriesValueText.setFill(_textColor);
    seriesValueText.setFont(lightFont);

    itemText = new Text("ITEM");
    itemText.setFill(_textColor);
    itemText.setFont(regularFont);

    itemNameText = new Text("-");
    itemNameText.setFill(_textColor);
    itemNameText.setFont(lightFont);

    valueText = new Text("VALUE");
    valueText.setFill(_textColor);
    valueText.setFont(regularFont);

    itemValueText = new Text("-");
    itemValueText.setFill(_textColor);
    itemValueText.setFont(lightFont);

    line = new Line(0, 0, 0, 56);
    line.setStroke(_textColor);

    VBox vBoxTitles = new VBox(2, seriesText, seriesSumText, itemText, valueText);
    vBoxTitles.setAlignment(Pos.CENTER_LEFT);
    VBox.setMargin(itemText, new Insets(3, 0, 0, 0));

    VBox vBoxValues = new VBox(2, seriesNameText, seriesValueText, itemNameText, itemValueText);
    vBoxValues.setAlignment(Pos.CENTER_RIGHT);
    VBox.setMargin(itemNameText, new Insets(3, 0, 0, 0));
    HBox.setHgrow(vBoxValues, Priority.ALWAYS);

    hBox = new HBox(5, vBoxTitles, line, vBoxValues);
    hBox.setPrefSize(120, 69);
    hBox.setPadding(new Insets(5));
    hBox.setBackground(new Background(new BackgroundFill(_backgroundColor, new CornerRadii(3), Insets.EMPTY)));
    hBox.setMouseTransparent(true);

    getContent().addAll(hBox);
}
 
Example 5
Source File: GaugeTileSkin.java    From tilesfx with Apache License 2.0 4 votes vote down vote up
@Override protected void initGraphics() {
    super.initGraphics();

    if (tile.isAutoScale()) tile.calcAutoScale();
    oldValue          = tile.getValue();
    sectionMap        = new HashMap<>(sections.size());
    for(Section section : sections) { sectionMap.put(section, new Arc()); }

    barColor       = tile.getBarColor();
    thresholdColor = tile.getThresholdColor();

    barBackground = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.696, PREFERRED_WIDTH * 0.275, PREFERRED_WIDTH * 0.275, angleRange * 0.5 + 90, -angleRange);
    barBackground.setType(ArcType.OPEN);
    barBackground.setStroke(barColor);
    barBackground.setStrokeWidth(PREFERRED_WIDTH * 0.02819549 * 2);
    barBackground.setStrokeLineCap(StrokeLineCap.BUTT);
    barBackground.setFill(null);

    thresholdBar = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.696, PREFERRED_WIDTH * 0.275, PREFERRED_WIDTH * 0.275, -angleRange * 0.5 + 90, 0);
    thresholdBar.setType(ArcType.OPEN);
    thresholdBar.setStroke(tile.getThresholdColor());
    thresholdBar.setStrokeWidth(PREFERRED_WIDTH * 0.02819549 * 2);
    thresholdBar.setStrokeLineCap(StrokeLineCap.BUTT);
    thresholdBar.setFill(null);
    Helper.enableNode(thresholdBar, !tile.getSectionsVisible());

    sectionPane = new Pane();
    Helper.enableNode(sectionPane, tile.getSectionsVisible());

    if (sectionsVisible) { drawSections(); }

    alertIcon = new Path();
    alertIcon.setFillRule(FillRule.EVEN_ODD);
    alertIcon.setFill(Color.YELLOW);
    alertIcon.setStroke(null);
    Helper.enableNode(alertIcon, tile.isAlert());
    alertTooltip = new Tooltip(tile.getAlertMessage());
    Tooltip.install(alertIcon, alertTooltip);

    needleRotate     = new Rotate((tile.getValue() - oldValue - minValue) * angleStep);
    needleRectRotate = new Rotate((tile.getValue() - oldValue - minValue) * angleStep);

    needleRect = new Rectangle();
    needleRect.setFill(tile.getBackgroundColor());
    needleRect.getTransforms().setAll(needleRectRotate);

    needle = new Path();
    needle.setFillRule(FillRule.EVEN_ODD);
    needle.getTransforms().setAll(needleRotate);
    needle.setFill(tile.getNeedleColor());
    needle.setStrokeWidth(0);
    needle.setStroke(Color.TRANSPARENT);

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

    valueText = new Text(String.format(locale, formatString, tile.getCurrentValue()));
    valueText.setFill(tile.getValueColor());
    valueText.setTextOrigin(VPos.BASELINE);
    Helper.enableNode(valueText, tile.isValueVisible() && !tile.isAlert());

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

    fractionLine = new Line();

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

    unitFlow = new VBox(upperUnitText, unitText);
    unitFlow.setAlignment(Pos.CENTER_RIGHT);

    valueUnitFlow = new HBox(valueText, unitFlow);
    valueUnitFlow.setAlignment(Pos.CENTER);
    valueUnitFlow.setMouseTransparent(true);

    minValueText = new Text(String.format(locale, "%." + tile.getTickLabelDecimals() + "f", tile.getMinValue()));
    minValueText.setFill(tile.getTitleColor());

    maxValueText = new Text(String.format(locale, "%." + tile.getTickLabelDecimals() + "f", tile.getMaxValue()));
    maxValueText.setFill(tile.getTitleColor());

    thresholdRect = new Rectangle();
    thresholdRect.setFill(sectionsVisible ? Color.TRANSPARENT : tile.getValue() > tile.getThreshold() ? tile.getThresholdColor() : Tile.GRAY);
    Helper.enableNode(thresholdRect, tile.isThresholdVisible());

    thresholdText = new Text(String.format(locale, "%." + tile.getTickLabelDecimals() + "f", tile.getThreshold()));
    thresholdText.setFill(sectionsVisible ? Color.TRANSPARENT : Tile.GRAY);
    Helper.enableNode(thresholdText, tile.isThresholdVisible());

    getPane().getChildren().addAll(barBackground, thresholdBar, sectionPane, alertIcon, needleRect, needle, titleText, valueUnitFlow, fractionLine, minValueText, maxValueText, thresholdRect, thresholdText);
}
 
Example 6
Source File: ColorTileSkin.java    From tilesfx with Apache License 2.0 4 votes vote down vote up
@Override protected void initGraphics() {
    super.initGraphics();

    gradientLookup = new GradientLookup();

    if (tile.getSections().isEmpty()) {
        tile.setSections(new Section(0.00, 0.25, ColorSkin.GREEN),
                         new Section(0.25, 0.50, ColorSkin.YELLOW),
                         new Section(0.50, 0.75, ColorSkin.ORANGE),
                         new Section(0.75, 1.00, ColorSkin.RED));
    }
    tile.setBackgroundColor(tile.getSections().get(0).getColor());

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

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

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

    fractionLine = new Line();

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

    unitFlow = new VBox(upperUnitText, unitText);
    unitFlow.setAlignment(Pos.CENTER_RIGHT);

    valueUnitFlow = new HBox(valueText, unitFlow);
    valueUnitFlow.setAlignment(Pos.CENTER);
    valueUnitFlow.setMouseTransparent(true);

    barBackground = new Rectangle();
    barBackground.setFill(tile.getBarBackgroundColor());

    bar = new Rectangle();
    bar.setFill(tile.getForegroundColor());

    getPane().getChildren().addAll(titleText, valueUnitFlow, fractionLine, barBackground, bar);
}
 
Example 7
Source File: CountryTileSkin.java    From tilesfx with Apache License 2.0 4 votes vote down vote up
@Override protected void initGraphics() {
    super.initGraphics();

    //poiLocations       = FXCollections.observableHashMap();
    //chartDataLocations = FXCollections.observableHashMap();

    //circleHandlerMap   = new HashMap<>();

    country = tile.getCountry();
    if (null == country) { country = Country.DE; }

    clickHandler = event -> tile.fireTileEvent(new TileEvent(EventType.SELECTED_CHART_DATA, new ChartData(country.getName(), country.getValue(), country.getColor())));

    countryPaths = Helper.getHiresCountryPaths().get(country.name());

    countryMinX = Helper.MAP_WIDTH;
    countryMinY = Helper.MAP_HEIGHT;
    countryMaxX = 0;
    countryMaxY = 0;
    countryPaths.forEach(path -> {
        path.setFill(tile.getBarColor());
        countryMinX = Math.min(countryMinX, path.getBoundsInParent().getMinX());
        countryMinY = Math.min(countryMinY, path.getBoundsInParent().getMinY());
        countryMaxX = Math.max(countryMaxX, path.getBoundsInParent().getMaxX());
        countryMaxY = Math.max(countryMaxY, path.getBoundsInParent().getMaxY());
    });

    /*
    tile.getPoiList()
        .forEach(poi -> {
            String tooltipText = new StringBuilder(poi.getName()).append("\n")
                                                                 .append(poi.getInfo())
                                                                 .toString();
            Circle circle = new Circle(3, poi.getColor());
            circle.setOnMousePressed(e -> poi.fireLocationEvent(new LocationEvent(poi)));
            Tooltip.install(circle, new Tooltip(tooltipText));
            poiLocations.put(poi, circle);
        });
    */

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

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

    countryGroup = new Group();
    countryGroup.getChildren().setAll(countryPaths);

    countryContainer = new StackPane();
    countryContainer.setMinSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
    countryContainer.setMaxSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
    countryContainer.setPrefSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795);
    countryContainer.getChildren().setAll(countryGroup);

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

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

    fractionLine = new Line();

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

    unitFlow = new VBox(upperUnitText, unitText);
    unitFlow.setAlignment(Pos.CENTER_RIGHT);

    valueUnitFlow = new HBox(valueText, unitFlow);
    valueUnitFlow.setAlignment(Pos.BOTTOM_RIGHT);
    valueUnitFlow.setMouseTransparent(true);
    valueUnitFlow.setMouseTransparent(true);

    getPane().getChildren().addAll(titleText, countryContainer, valueUnitFlow, fractionLine, text);
    //getPane().getChildren().addAll(poiLocations.values());
}
 
Example 8
Source File: BarGaugeTileSkin.java    From tilesfx with Apache License 2.0 4 votes vote down vote up
@Override protected void initGraphics() {
    super.initGraphics();

    if (tile.isAutoScale()) tile.calcAutoScale();

    gradientLookup       = new GradientLookup(tile.getGradientStops());
    noOfGradientStops    = tile.getGradientStops().size();
    sectionsVisible      = tile.getSectionsVisible();
    colorGradientEnabled = tile.isStrokeWithGradient();

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

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

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

    fractionLine = new Line();

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

    unitFlow = new VBox(upperUnitText, unitText);
    unitFlow.setAlignment(Pos.CENTER_RIGHT);

    valueUnitFlow = new HBox(valueText, unitFlow);
    valueUnitFlow.setAlignment(Pos.CENTER);
    valueUnitFlow.setMouseTransparent(true);

    text = new Text(tile.getText());
    text.setTextOrigin(VPos.TOP);
    text.setFill(tile.getTextColor());

    barBackground = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.4, PREFERRED_HEIGHT * 0.4, 0, ANGLE_RANGE);
    barBackground.setType(ArcType.OPEN);
    barBackground.setStroke(tile.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, 270, 0);
    bar.setType(ArcType.OPEN);
    bar.setStroke(tile.getBarColor());
    bar.setStrokeWidth(PREFERRED_WIDTH * 0.125);
    bar.setStrokeLineCap(StrokeLineCap.BUTT);
    bar.setFill(null);

    lowerThreshold = new Line();
    lowerThreshold.setStroke(tile.getLowerThresholdColor());
    lowerThreshold.setStrokeLineCap(StrokeLineCap.BUTT);
    Helper.enableNode(lowerThreshold, tile.isLowerThresholdVisible());

    lowerThresholdText = new Text(String.format(locale, formatString, tile.getLowerThreshold()));
    Helper.enableNode(lowerThresholdText, tile.isLowerThresholdVisible());
    
    threshold = new Line();
    threshold.setStroke(tile.getThresholdColor());
    threshold.setStrokeLineCap(StrokeLineCap.BUTT);
    Helper.enableNode(threshold, tile.isThresholdVisible());
    
    thresholdText = new Text(String.format(locale, formatString, tile.getThreshold()));
    Helper.enableNode(thresholdText, tile.isThresholdVisible());
    
    minValueText = new Text();
    maxValueText = new Text();

    getPane().getChildren().addAll(barBackground, bar, lowerThreshold, lowerThresholdText, threshold, thresholdText, minValueText, maxValueText, titleText, valueUnitFlow, fractionLine, text);
}
 
Example 9
Source File: HighLowTileSkin.java    From tilesfx with Apache License 2.0 4 votes vote down vote up
@Override protected void initGraphics() {
    super.initGraphics();

    oldValue = tile.getValue();
    double deviation = calculateDeviation();
    updateState(deviation);

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

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

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

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

    fractionLine = new Line();

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

    unitFlow = new VBox(upperUnitText, unitText);
    unitFlow.setAlignment(Pos.CENTER_RIGHT);

    valueUnitFlow = new HBox(valueText, unitFlow);
    valueUnitFlow.setAlignment(Pos.BOTTOM_RIGHT);
    valueUnitFlow.setMouseTransparent(true);

    description = new Label(tile.getDescription());
    description.setAlignment(tile.getDescriptionAlignment());
    description.setWrapText(true);
    description.setTextFill(tile.getTextColor());
    Helper.enableNode(description, !tile.getDescription().isEmpty());
    
    triangle = new Path();
    triangle.setStroke(null);
    triangle.setFill(state.color);
    indicatorPane = new StackPane(triangle);

    deviationText = new Text(String.format(locale, "%." + tile.getTickLabelDecimals() + "f", deviation));
    deviationText.setFill(state.color);

    deviationUnitText = new Text("%");
    deviationUnitText.setFill(Tile.FOREGROUND);

    referenceUnitFlow = new TextFlow(indicatorPane, deviationText, deviationUnitText);
    referenceUnitFlow.setTextAlignment(TextAlignment.LEFT);

    getPane().getChildren().addAll(titleText, text, valueUnitFlow, fractionLine, description, referenceUnitFlow);

    //handleCurrentValue(tile.getValue());
}
 
Example 10
Source File: NumberTileSkin.java    From tilesfx with Apache License 2.0 4 votes vote down vote up
@Override protected void initGraphics() {
    super.initGraphics();

    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());
    valueText.setTextOrigin(VPos.BASELINE);
    Helper.enableNode(valueText, tile.isValueVisible());

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

    fractionLine = new Line();

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

    unitFlow = new VBox(upperUnitText, unitText);
    unitFlow.setAlignment(Pos.CENTER_RIGHT);

    valueUnitFlow = new HBox(valueText, unitFlow);
    valueUnitFlow.setAlignment(Pos.BOTTOM_RIGHT);
    valueUnitFlow.setMouseTransparent(true);

    description = new Label(tile.getText());
    description.setAlignment(tile.getDescriptionAlignment());
    description.setWrapText(true);
    description.setTextFill(tile.getTextColor());
    Helper.enableNode(description, tile.isTextVisible());

    getPane().getChildren().addAll(titleText, text, valueUnitFlow, fractionLine, description);
}