Flamingo ribbon component: small buttons in ribbon galleries

June 10th, 2009 | 5 Comments »

As mentioned in the JavaOne presentation on the Flamingo ribbon component, there are a few small features missing in the Swing implementation. The first drop of version 4.2dev (code-named Hiolair) now provides support for placing small command buttons in ribbon galleries.

A ribbon gallery is a compact way to display a large number of buttons that control the specific visual appearance of the selected document element. The ribbon gallery fits itself to the available horizontal space, and allows two navigation modes:

  • Using the scroll-up and scroll-down buttons to view additional button rows inside the ribbon itself
  • Using the expand button to view all the buttons in a scrollable popup

Here is how a ribbon gallery hosting big command buttons looks like:

And when it is expanded (with the bottom-right button), it looks like this:

Up until now the ribbon has supported placing only big buttons in ribbon galleries. Starting with version 4.2, the new JRibbonBand.addRibbonGallery that gets the CommandButtonDisplayState as one of the parameters can be used to create a ribbon gallery that hosts small command buttons. The following display states are supported:

  • JRibbonBand.BIG_FIXED_LANDSCAPE – this is the default display state. The buttons display big icon and text below it, and the buttons have fixed 5:4 ratio when displayed in the popup.
  • JRibbonBand.BIG_FIXED. The buttons display big icon and text below it, and the buttons have fixed 1:1 ratio when displayed in the popup.
  • CommandButtonDisplayState.SMALL. The buttons display only small icon with no text.

Here is a ribbon gallery that hosts small command buttons (in three rows):

And this is how it looks when it is expanded:

You’re more than welcome to take the first drop of version 4.2dev for a spin. You can also play with the WebStart demo of the ribbon under Substance look-and-feel by clicking on the button below. Switch to “Animations” task for a ribbon gallery with small command buttons.


Related posts:

  1. Flamingo ribbon component: rich tooltips on command buttons The latest addition in the Flamingo component suite is support for rich tooltips on command...
  2. Flamingo component suite 3.0 – ribbon The ribbon component is one of the major parts of the Flamingo component suite. It...
  3. Flamingo component suite 3.0 – command buttons One of the basic building blocks in the Flamingo component suite is the command button...
  4. Flamingo ribbon component: key tips The latest addition in the Flamingo component suite is support for key tips. This has...


5 Comments on “Flamingo ribbon component: small buttons in ribbon galleries”

  1. 1 Viswanath said at 10:52 pm on June 10th, 2009:

    Not specific to this post, but I regard Flamingo/Substance as a set of top-notch open source projects in this domain.

    The community should be grateful to Krill. Thanks a lot Krill for staying put and providing wonderful tools/libraries.

  2. 2 Kirill Grouchnikov said at 11:01 pm on June 10th, 2009:

    Thanks, Viswanath. Much appreciated.

    Kirill

  3. 3 Vaibhav said at 8:05 am on June 11th, 2009:

    I used flamingo few months back to show my batchmates how beautiful Swing UI can be , and they were really impressed , and you really make it look cool. As a student I think these things really promote application learning, and you’re making that happen

  4. 4 Danish Satti said at 4:52 am on July 3rd, 2009:

    Hi Kirill,

    I congradulate you on your brillient work. I liked the ribbon component very much and want to use it in my project but I am facing some problems. This is not suitable place to define the problem so I want to discuss with you through email. Please send me an email from your account on the the provideed email address so that I can contact you for more details. I am sure it will not take much of your time to help me. I shall be grateful.

    Best Regards,

  5. 5 Kirill Grouchnikov said at 7:11 am on July 3rd, 2009:

    Danish,

    Please post your questions on the project forums / mailing lists.

    Thanks
    Kirill