Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section definition in FXML #111

Open
fchrist opened this issue Oct 1, 2020 · 0 comments
Open

Section definition in FXML #111

fchrist opened this issue Oct 1, 2020 · 0 comments

Comments

@fchrist
Copy link

fchrist commented Oct 1, 2020

I am using the 11.45 release with Java 11 and JavaFX 11.

I want to define the sections of my Gauge in FXML like this:

<Tile userData="/home/gewaechshaus/temperatur" skinType="GAUGE" lowerThreshold="0.0" referenceValue="20.0" threshold="30.0" thresholdVisible="false" maxValue="50.0" minValue="-20.0" title="Gewächshaus" unit="°C" sectionsVisible="true" sectionsAlwaysVisible="true" highlightSections="true" >
     <sections>
         <Section start="-20" stop="0.0" color="blue" />
         <Section start="0.0" stop="30.0" color="green" />
         <Section start="30.0" stop="50" color="red" />
     </sections>
 </Tile>

Unfortunately, the sections are not used.

Screenshot 2020-10-01 15:43:46

Doing the same in code works perfectly fine.

Tile test = TileBuilder.create()
        .skinType(Tile.SkinType.GAUGE)
        .title("Temp 2")
        .unit("°C")
        .minValue(-20)
        .maxValue(50)
        .value(22.0)
        .threshold(30)
        .thresholdVisible(false)
        .sections(new Section(-20, 0, Tile.BLUE),
                new Section(0, 30, Tile.GREEN),
                new Section(30, 50, Tile.RED))
        .sectionsAlwaysVisible(true)
        .sectionsVisible(true)
        .build();

Screenshot 2020-10-01 15:47:51

Would be really nice to have this in FXML, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants