Flamingo ribbon component: application menu button and taskbar

October 3rd, 2008 | 19 Comments »

I’ve been relatively quiet on this blog for the last couple of weeks, but i have some good news to share about the Flamingo ribbon component – it now provides the cross-LAF support for application menu button and application taskbar. The ribbon is a fairly complicated container, and while release 3.1 has made great strides towards providing basic functionality, there are significant gaps when compared to the original Office 2007 command bar. The plans for release 4.0 (code-named Fainnear) are to close these gaps, and the latest development drops allow interested applications to test the application menu button and application taskbar.

These concepts are best illustrated by screenshots. Here is a screenshot of the ribbon test application under Metal look-and-feel:

Note that the taskbar panel has been moved to a separate row on top of the ribbon task toggle buttons. The big round button is the application menu button, and it takes its icon from the images passed to Window.setIconImage and Window.setIconImages APIs. The largest image not exceeding 32*32 pixels is taken. If you only pass the usual 16*16 image, it will be used (but not scaled up). I would recommend using 22*22 images, but this is really up to your design to decide.

And here is the same application under Windows look-and-feel under Vista:

Note how the entire ribbon (selected task toggle button, task band title strips and the application menu button) are skinned with the visuals of the current look-and-feel. Since Windows look-and-feel on Vista is still using Tahoma 11 font, ribbon inherits these settings.

How about third-party look-and-feels? Here is the same application under A03:

and under Synthetica White Vision:

Once again, note how the visuals of ribbon and its components match the visuals of core Swing components under the relevant look-and-feels. Finally, here is the same application under Substance Business Blue Steel skin:

and under Substance Nebula Brick Wall skin:

And important thing to note for Substance – if you are running your decorated JRibbonFrame application under Substance Flamingo plugin, the taskbar and the top half of the application menu button are placed directly on the title pane.

And now let’s see a few screenshots that illustrate the functionality available on the application menu button. The screenshots are taken under different core and third-party look-and-feels and use the APIs from the org.jvnet.flamingo.ribbon package. These APIs are not set in stone and might change during the development cycle of version 4.0 based on the growing understanding of the requirements and user feedback. If you want to make your voice and requirements heard, now is the time.

The first screenshot shows the application menu shown when the application menu button is clicked. It has three main parts – the primary menu selection, the secondary menu selection and the footer buttons:

Note how the visuals of the application menu (top and bottom gradients, colors and button fills) match the current look-and-feel. Also note that some of the controls (the primary Save menu entry and the footer Exit button) are disabled. This is configured via the relevant APIs, and implicitly affects the icons used on those buttons.

The second screenshot shows the contents of the application menu under Windows look-and-feel when the mouse is moved over the primary Open entry:

Here, the application has registered a callback that is called on mouse rollover. This callback gets the secondary target panel and populates it with a command button panel that has one button group with five sample buttons. The main primary menu entry can also be configured with an action listener that will be called when the entry is activated (clicked). In this particular case, the main action listener can open a JFileChooser, while the rollover callback can populate the list of last opened documents, associating an action listener with each one of them.

The third screenshot is taken under Synthetica Blue Ice look-and-feel and shows a split Save As menu entry in action. This menu entry has an action area (with configurable action listener), as well as a rich secondary level menu. One of the secondary menu entries is marked as disabled:

Once again, note how the visuals of the current look-and-feel are applied throughout the ribbon component, including the different alphas on the action and popup area of the primary armed split menu entry to indicate the visual boundaries between these two areas.

The next screenshot is taken under Nimbus and shows the split Print primary menu entry with two groups in the secondary menu:

And finally, the last screenshot is taken under Substance Business Blue Steel skin and shows the popup-only Send primary menu entry with one group in secondary menu. One of the secondary menu entries is a popup button itself and has the associated PopupMenuListener. This listener populates two items in the third-level popup menu – click to see full-size:

If you want to see the application menu button and application taskbar in action, run the following WebStart demo:

The demo above works for the core look-and-feels. If you want to see this functionality under Substance (including the content on decorated title pane), run the following WebStart demo:

If you want to test the new APIs in your applications, you would need the following (the last two only for applications running under Substance look-and-feel):

The relevant APIs are in the org.jvnet.flamingo.ribbon package and until the documentation is ready, see the configureApplicationMenu method in the test.ribbon.BasicCheckRibbon class. This is still work in progress so the APIs may change during the development cycle. Your feedback is, as always, greatly appreciated.


Related posts:

  1. Flamingo ribbon component: enhancing the application menu button and popups Following the extremely valuable feedback on the previous entry that introduced the application menu button...
  2. Enhancing the Flamingo command button component Over the course of the past few weeks the command button component in Flamingo component...
  3. Enhanced ribbon application menu in Flamingo 4.2 Flamingo component suite provides a pure Swing implementation of Office 2007 ribbon component, and the...
  4. Flamingo ribbon component: rich tooltips on command buttons The latest addition in the Flamingo component suite is support for rich tooltips on command...


19 Comments on “Flamingo ribbon component: application menu button and taskbar”

  1. 1 Andy said at 2:19 am on October 4th, 2008:

    Hi Kirill,
    Wonderful!

    In my understanding, the application menu button
    and taskbar features only can be used in the decorated JRibbonFrame application.

    So,if I develop a application using core Swing components as your previous blog “From Photoshop to code ” guidance ,(http://www.pushing-pixels.org/?p=493)
    how do I integrate with this exciting new features?

    I’m very interested in this feature: under Substance L2F,the taskbar and the top half of the application menu button are placed directly on the title pane.

    Can it be realized under Windows/Nimbus other 3rd
    L2f?

    Thank you:)

  2. 2 Andreas said at 3:31 am on October 4th, 2008:

    Hm… the main menu item “Send”, to be more precise, its sub items, doesn’t work on Ubuntu (at least for me). Is this a known bug?

    Well, I’m no Java guy I just wanted to try it out. :-D

    Anyway, I loved this component in Office on Windows and I would like to see it more often in future.

  3. 3 Kirill Grouchnikov said at 7:21 am on October 4th, 2008:

    Andy – these features are available in JRibbonFrame under all look-and-feels. See screenshots of Windows and Nimbus LAFs that are running in OS-decorated mode. The only difference in Substance is that it supports placing the content on the title pane, eliminating the need for the additional application taskbar.

    Since this requires very close cooperation from the look-and-feel side, this is only available under Substance. Other interested look-and-feels can see the implementation details – contact the relevant developers.

    Thanks
    Kirill

  4. 4 Kirill Grouchnikov said at 7:50 am on October 4th, 2008:

    Andreas – thanks for reporting this issue. I will try it on my Ubuntu box.

    Kirill

  5. 5 Tom J Nowell said at 1:06 pm on October 4th, 2008:

    Just an aesthetic note, see the menu button is behind the menu panel? In the Microsoft implementation the menu button is in front of the pop-up and overlaps, so the position is correct but the ordering is not.

    Also I assume we can take the application menu in its entirety and replace it with a custom panel of our own creation if we so wish?

    Nonetheless good work keep it coming!

  6. 6 Toml said at 4:32 pm on October 4th, 2008:

    Wow – this is gorgeous. I really enjoyed playing with it. I think it makes the UI of an application very much more usable and clear.

    MS did something right, at least to me.

    And I appreciate the work you’ve done on ths.

  7. 7 Kirill Grouchnikov said at 4:40 pm on October 4th, 2008:

    Tom – this is a known issue that should be addressed shortly. Currently there are no plans for complete application control over the contents of the application menu. The present API is purely metadata-driven, except the rollover callback on the primary menu entries.

    Thanks
    Kirill

  8. 8 Viswanath said at 9:13 am on October 5th, 2008:

    The ribbon demo with substance is throwing an error on my windows PC, the exception is about not being able to find the forms library.

    Just wanted to let you know

  9. 9 Kirill Grouchnikov said at 9:36 am on October 5th, 2008:

    Viswanath – clean your WebStart cache (from javaws -viewer). Java.net is known to not send correct jar and JNLP files in all cases.

  10. 10 Abhin said at 12:15 am on October 6th, 2008:

    Hi Kirill
    I want to know can substance and flamingo can be used for commercial uses directly or do I have follow some license rules , I am intending to sell my java solutions in substance LAF

  11. 11 obinna henry said at 1:18 am on October 6th, 2008:

    oh! boy !, this is cool and totally awesome. keep up the good stuff.

  12. 12 Kirill Grouchnikov said at 6:39 am on October 6th, 2008:

    Abhin – you would find that the vast majority of open-source and commercial libraries come with accompanying licenses. Flamingo and Substance are no exception, and the main project pages point to the terms of the licenses for these projects.

    Thanks
    Kirill

  13. 13 HC said at 4:08 pm on October 6th, 2008:

    I think its just me but I am getting a security exception when I try to run the JNLP examples. It says something about the app wanting unrestricted access to the system I am using Ubuntu with Java 1.6.0_06 and i also ran it from the command line using sudo.

  14. 14 Kirill Grouchnikov said at 4:21 pm on October 6th, 2008:

    HC – the ribbon applications do not specify all-access JNLP tag. Do you see this exception on the demo startup, or when you’re playing with different controls? I’ve ran the Substance demo a few days ago on my Ubuntu 8.04 machine and didn’t see any security exceptions – but perhaps we’re running different scenarios.

    Thanks
    Kirill

  15. 15 Laenf said at 1:39 am on October 7th, 2008:

    @HC: it’s not just you ;-)
    I’m getting the same unrestricted access security exception. I use Java 1.6.0_07-b06 on WinXP and the “unsigned ressource” is “https://flamingo.dev.java.net/webstart/flamingo-tst.jar”.

    @Kirill: The Error-Details-Panel shows a start-file with these lines (the all-access tag !?!):

    <security>
    <all-permissions/>
    </security>

    Beside this problem, great work Kirill !

  16. 16 kashani said at 3:26 am on October 7th, 2008:

    Hello
    is very very very good
    please send me sample code for use ribbon component.
    thank’s

  17. 17 Kirill Grouchnikov said at 6:40 am on October 7th, 2008:

    kashani – follow the links to the project site that has complete sources for both the component and the test application.

    Laenf – you might have old flamingo-tst.jar in your WebStart cache. Please clean the cache manually and click the demo link once again.

    Thanks
    Kirill

  18. 18 Alexander Potochkin said at 12:42 am on October 10th, 2008:

    Hello Kirill

    I cleared the temporary files
    Java Control Panel->General->Settings->Delete Files

    but still have the following error:
    “Unsigned application requesting unrestricted access to system” when I run testBasicRibbon.jnlp

    Thanks
    alexp

  19. 19 Kirill Grouchnikov said at 6:36 am on October 10th, 2008:

    Alex,

    I have just resigned the two jars in the testBasicRibbon.jnlp – flamingo.jar and flamingo-tst.jar

    Thanks
    Kirill