Klaus Rheinwald asked me for an artificial horizon component that he needed and so i started adding one to the library. Fortunately i created one last year on my trip to JFokus and got some insider information of Mikael Grev who is an active fighter pilot and a coder (you might know one of his projects called MiGLayout which is a really nice Java Layout Manager).
So the result of this work looks like this...
![]() |
| Horizon |
The Horizon component is located in the extras package of the SteelSeries and you could customize it by defining the color of the sky, the background and the indicator (setPointerColor()). You could define pitch and roll and the horizon will hopefully display the right view. There's only one little problem left which occurs if you have a pitch larger than 90°. A real artificial horizon will flip over by rotating around 180° but i was not able to implement it in a way that looks good enough. I will spend some time to this problem later on, so stay tuned...
Klaus Rheinwald also pointed me to the Compass component that's already in the SteelSeries library and he mentioned that on an airplane the compass looks different in the way that the "needle" is fixed and the scale is rotating...
Ok, that was a piece of cake because in principle this is the same behaviour as the RadialCounter just with another pointer. Long story short, here is the AirCompass component...
![]() |
| AirCompass |
The design was taken from a real aviation instrument and the whole creation time for this component was only around 2 hours. You could set the value in the range of 0 to 360 degrees and the scale will rotate around the airplane in the center. The color could be changed by the pointerColor property of the component.
In the last release i forgot to mention that there was also a new FrameDesign and BackgroundColor that one could choose for the gauges and because i added another FrameDesign i will present both of it in this post...
![]() |
Left: FrameDesign.GOLD, BackgroundColor.BROWN, PointerType.TYPE7 Right: FrameDesign.CHROME, KnobType.BIG_CHROME_KNOB, PointerType.TYPE7 |
On the left gauge you see the FrameDesign.GOLD with the new BackgroundColor.BROWN and on the right gauge you see the new FrameDesign.CHROME. In addition to the new FrameDesign you could see also another new PointerType.TYPE7 in both gauges and a new KnobType.BIG_CHROME_KNOB (on the right gauge).
Another user of the SteelSeries library asked me if it would be possible to get a square frame on the Clock component too...and of course this is possible...here we go...
![]() |
Left: FrameType.ROUND Right: FrameType.SQUARE |
Another modification was the reduction of the memory footprint of the components. I mentioned this in my last post already, so it's not needed to repeat myself here. Nearly all components now make use of this combined layer technique.
The test application is now also updated to the 3.8 release of the library and is still available here as a webstart app.
At least i fixed a memory leak that occurred when using the setValueAnimated() method. After i made some long term tests over the last days the problem seems to be fixed now.
Like i said before, just let me know if you need some special component and i'll try to implement it if i'll find the time...
That's it for today, enjoy the upcoming weekend and keep coding...









