-
I am looking at a simpler way to do the following, Your High Low tile does what I want, however it compares it against the previous value and displays the percentage deviation. I need it to compare against a fixed value supplied to it, I need this deviation label to be of smaller size as well. I looked at the code, it appears that if I subclass the Skin, then I can override the redraw method to achieve what I want. However, the variables are all private for ex: I was thinking of having a different method to calculate the deviation and call it in the derived class
Could you suggest a way to achieve what I want to achieve |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You could simply create your own skin instead of subclassing it and you can base it on the HighLowTileSkin. The skins are just examples, in JavaFX you can create your own skins for a control and set to the control when you need it. |
Beta Was this translation helpful? Give feedback.
-
Super advise from a great UI developer to a non UI developer, I thought I had to subclass the tile as well as the skins, as the skins were all part of a enum defined inside the tile. Looks like its as simple as Great looking widgets, I was following your code since 12 years ago, when I had to mockup a UI for an Android project to get rid of the ugly Android sliders. |
Beta Was this translation helpful? Give feedback.
You could simply create your own skin instead of subclassing it and you can base it on the HighLowTileSkin. The skins are just examples, in JavaFX you can create your own skins for a control and set to the control when you need it.