Pages

Friday, June 22, 2018

A status skin for TilesFX

Aloha,

Last week I've stumbled upon a new idea for a TilesFX skin and found some time to implement it. It can be used to visualize 3 values incl. a text and an additional node like an icon etc.
Because it is not that easy to describe I think I better show you a screenshot :)
So here you go...


As you can see it comes with the normal title, description and text labels as usual. In addition one can set the value for the left, middle and right side by using one of the following methods

  • setLeftValue(double)
  • setMiddleValue(double)
  • setRightValue(double)

 In this case I simply use it as a counter for notifications with their category (critical, warning, information) but you can use it for whatever you like.
The text below the value can be set with one of the following methods

  • setLeftText(String)
  • setMiddleText(String)
  • setRightText(String)

The icon on top of the value can be set by calling one of the following methods

  • setLeftGraphics(Node)
  • setMiddleGraphics(Node)
  • setRightGraphics(Node)

In this case I've simply used the Indicator control that is now also part of the TilesFX library and which can be found in the addons package.
Because these methods take a JavaFX Node object as a parameter you can take either Icons, ImageViews or Controls which again can be used to visualize something.

This new skin, the Switch and Indicator control can be found in the latest TilesFX release which is 1.6.0.

As usual you can find the source code on github or if you prefer the binary just go to bintray and download it from there.
And of course you can also find it on Maven central.

That's it for today...so keep coding... :)

No comments:

Post a Comment