Right-to-left support for command buttons in Flamingo 5.0

March 26th, 2010 | 2 Comments »

With Substance 6.0 in release candidate stage, it’s time to go back and work on the missing features in the Flamingo component suite. As mentioned in the JavaOne ’09 presentation on the project, there are a few features missing in the Swing implementation, and today i’m going to talk about supporting right-to-left orientation on command buttons and related components.

Four RTL languages are supported in Java: Hebrew, Arabic, Farsi, and Urdu. Substance provides full RTL support for core Swing components, and you can see older entries (Aligning menu items in Swing applications – welcome to the real world and RTL support in Swing – part II) for a glimpse of RTL-related issues. The latest drop of Flamingo 5.0 (code-named Imogene) has added RTL support to the following components:

  • Command buttons
  • Command button strips
  • Command button panels
  • Command menu buttons
  • Command popup menus

RTL support is best illustrated by screenshots, so let’s begin (and yes, the Hebrew texts are notjust gibberish if you were wondering). The first screenshot shows a number of command buttons with different states and kinds (see the JavaOne presentation for more info) under the en_US locale – click for a full size image:

and here are the same buttons under iw_IL locale (with the matching texts) – click for a full size image:

The next screenshot shows a command button with a simple popup containing a few command menu buttons and a separator under en_US locale:

https://flamingo.dev.java.net/release-info/5.0/button-ltr-popupmenu-simple.png

and the same button + menu under iw_IL locale:

https://flamingo.dev.java.net/release-info/5.0/button-rtl-popupmenu-simple.png

Flamingo provides an API to embed a command button panel into the popup menu. Here is how such a menu looks like under en_US locale:

https://flamingo.dev.java.net/release-info/5.0/button-ltr-popupmenu-custom.png

and the same rich popup menu under iw_IL locale:

https://flamingo.dev.java.net/release-info/5.0/button-rtl-popupmenu-custom.png

Command button panels can be used as standalone containers. Here is a button panel with row-fill layout and group titles under en_US locale:

https://flamingo.dev.java.net/release-info/5.0/buttonpanel-rows-ltr.png

and the same button panel under iw_IL locale (note the order of the buttons):

https://flamingo.dev.java.net/release-info/5.0/buttonpanel-rows-rtl.png

Command button panel can be configured to use column fill layout:

https://flamingo.dev.java.net/release-info/5.0/buttonpanel-columns-ltr.png

and it is fully supported in RTL mode (note the order of buttons and groups):

https://flamingo.dev.java.net/release-info/5.0/buttonpanel-columns-rtl.png

This is the first step towards full RTL support in all Flamingo components. Stay tuned for more. To test the new functionality in your applications, you will need the following:

Note that the last two are required if you’re running your application under one of Substance skins – such as Office Blue 2007 used in all the screenshots in this entry.


Related posts:

  1. Extending the Flamingo command buttons The command button component is a central building block for the Flamingo component suite. It...
  2. Using Flamingo 5.0 command buttons to build a breadcrumb bar Flamingo component suite began its life in January 2006 when Rick Jeliffe of Topologi has...
  3. Polishing the visuals of Flamingo command buttons As the name of this very blog implies, perhaps the most enjoyable part of my...
  4. Flamingo ribbon component: rich tooltips on command buttons The latest addition in the Flamingo component suite is support for rich tooltips on command...


2 Comments on “Right-to-left support for command buttons in Flamingo 5.0”

  1. 1 Thierry said at 1:00 am on March 27th, 2010:

    Thx this suite. Very useful. Although, it takes users some time to get used to it, it is very cool to have this in Java!

  2. 2 Java desktop links of the week, March 29 | Jonathan Giles said at 12:26 pm on March 28th, 2010:

    [...] Grouchnikov has been adding right-to-left support to his Flamingo project, in particular in command buttons and rich [...]