Using the nice META-INF/service, one can declare it's own little status-bar piece by implementing StatusLineElementProvider . You basically just return your Component that will be placed on that IDE/Platform status bar.
What the javadoc for StatusLineElementProvider doesn't say is how does one define the order for the components in the status bar.
Well, since we are using the services, then Lookup has something to do with this. Indeed, the documentation states this and also mentiones two other Lookup features (aka extensions): you can remove service implementations and you can define the order they are returned. Of course, this order is used for StatusLineElementProvider too !
So, just edit the org.openide.awt.StatusLineElementProvider file and add after the implementation class name something like #position=10 to define a position for your implementation.
At Platform startup these will be instantiated starting with the smallest position and going up.
Another thing: the Progress API line element has position number -13. So, if you use -14, -15 for 2 fake items, you get something like this:
If you use bigger numbers you get something like this:
And, I could also get rid of the progress bar altogether with
#-org.netbeans.progress.module.ProgressVisualizerProvider
Enjoy.
If this was helpful for you then maybe you'll like reading the other NetBeans Platform-related posts.
--
Emilian Bold
Java-loving consulting services from Timisoara, Romania.
Subscribe to:
Post Comments (Atom)
The Trouble with Harry time loop
I saw The Trouble with Harry (1955) a while back and it didn't have a big impression on me. But recently I rewatched it and was amazed a...
-
As Apache NetBeans became a top level Apache project and finished the incubation process I was asked for an interview and my photo. Only ...
-
I like making NetBeans dance: NetBeans - PalmOfMyHand - Dance Demo from Emilian Bold on Vimeo . The above video is a little somethi...
-
People will never bother to do anything manual unless absolutely necessary. This is why I believe the current NetBeans "empty" jav...
3 comments:
Thank you for the tip. I managed to add an icon to the status bar and it's awesome.
And the separator? How do we do it?
@Eduardo: http://docs.oracle.com/javase/tutorial/uiswing/components/separator.html (SwingConstants.VERTICAL )
Post a Comment