HanSolo / medusa

A JavaFX library for Gauges
Apache License 2.0
688 stars 129 forks source link

LCD-Skin does not display title #158

Closed hermann-59 closed 5 years ago

hermann-59 commented 5 years ago

I created a gauge with LCD-Skin. Subtitle gets displayed, title not. The trace shows the correct title. Whats wrong with my code?

Thanks a lot in advance Hermann

Here's the code fragment:

GaugeBuilder builder = GaugeBuilder.create().skinType(Gauge.SkinType.LCD)
                .decimals(defaults.getDecimals())
                .minValue(defaults.getMin())
                .maxValue(defaults.getMax())
                .unit(defaults.getUnit().getUnit())
                .title(title)
                .subTitle(subtitle)
                .barColor(Color.rgb(129, 199, 132))
                .animated(true)
                .averagingEnabled(true)
                .averageVisible(true)
                .averagingPeriod(600)
                .barBackgroundColor(Color.rgb(39, 44, 50));
        Gauge gauge = builder.build();
        gauge.setValue(0.0);

        String t = gauge.getTitle();
        System.out.println("gauge title is '" + t + "'");
hermann-59 commented 5 years ago

lcd-gauge title was set to "Strom", Subtitle was set to "L1"

HanSolo commented 5 years ago

Your code is correct, there was a problem in the LCD Skin which is now fixed, please use the latest code from github to solve your problem.

hermann-59 commented 5 years ago

lcd-gauge

hermann-59 commented 5 years ago

Great. It works. Thanks a lot.