Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Swing discrepancies when using Rayo
Swing discrepancies when using Rayo [message #1010770] Mon, 18 February 2013 08:02 Go to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 571
Registered: October 2012
Location: Bern, Switzerland
Senior Member
I've found that using the Rayo Look and Feel causes some things to not work as I would expect them compared to the non-rayo Swing client.

I have branded my swing client to show custom icons for the title and task bar as well as an application logo. All of these show with the standard Swing L&F.

I have also defined a tool button under Desktop->Tools. With the standard Swing L&F this button is shown and works.

Last I added various log levels according to the tutorial. This uses the following code to display text in the status bar, which works with the standard Swing L&F.
Desktop.this.setStatusText("LOG level is set back to normal");

When I activate the Rayo L&F, the application logo and the task bar symbol still show the branded values, however the title bar no longer shows an icon and there is no status bar to show the messages for log level changes. Also, the tool button is also missing. Instead I get the following error in the client console:

!ENTRY com.bsiag.scout.rt.ui.swing.rayo 2 0 2013-02-18 08:35:43.764
!MESSAGE com.bsiag.scout.rt.ui.swing.rayo.window.desktop.toolbar.RayoToolTabsBar.rebuild( Tool button of the type 'org.eclipse.minicrm.client.ui.desktop.Desktop$DrawLineTool' is not supported by Rayo L&F

The button in question is defined as follows:
  public class DrawLineTool extends AbstractToolButton {

    protected String getConfiguredIconId() {
      return org.eclipse.scout.rt.shared.AbstractIcons.Gears;

    protected String getConfiguredText() {
      return TEXTS.get("DrawLine");

    public String getIconId() {
      return Icons.DrawLine;

    protected String getConfiguredTooltipText() {
      return TEXTS.get("DrawLineTooltip");

    protected void execAction() throws ProcessingException {
      new DrawLineForm().startModify();


The two pictures show the differences described above (green works in both, red only works with standard L&F):
Standard L&F:

Rayo L&F:

So I have the following discrepancies when using Swing with Rayo L&F:

  • missing icon in title bar
  • missing Desktop->Tools button(s)
  • no status bar to show text

Are these known Rayo limitations? Or are there ways to work around them?
  • Attachment: Swing.png
    (Size: 84.65KB, Downloaded 363 times)
  • Attachment: Rayo.png
    (Size: 66.42KB, Downloaded 362 times)

[Updated on: Mon, 18 February 2013 08:03]

Report message to a moderator

Re: Swing discrepancies when using Rayo [message #1010900 is a reply to message #1010770] Mon, 18 February 2013 12:50 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 92
Registered: November 2010

Thanks for your elaborate questions!

The Rayo LAF was especially designed to look and feel "different" than those boring grey windows from the 90s. Window controls were rearranged or omitted intentionally to give the user a more clean and simple user interface. While the marketing departments likes this very much ("So simple, everyone can use it without teaching, you can't do anything wrong - and it's blue!"), it certainly limits the possibilites to the programmer. First, you usually do not programm any GUI code, but only "client model code" that is then mapped to the GUI automatically. This limits you to the possibilities the model offers. Second, not all of those model objects are supported by the Rayo LAF, because they would not fit in.

So, in short: Yes, the features you mentioned are not supported by Rayo out of the box (intentionally).

  • Adding custom tool buttons that are not of type AbstractFormToolButton is not supported in Rayo. You could try to replace the default toolbar (com.bsiag.scout.rt.ui.swing.rayo.window.desktop.toolbar.RayoToolTabsBar) with your own implementation, although that looks a bit complex. The "Rayo way" would be to add a menu to the menu button, use a hotkey or use a "form tool button" (which displays a form on the right part of the main window where you can place any widget you like, including other buttons).
  • Regarding the application icon: This is intentional, the Rayo style does not use icons in the title bar. However, you can tell Rayo not to draw the window borders on its own by setting scout.laf.useLafFrameAndDialog=false in config.ini. The window borders (including the title bar) are then rendered by the OS.
  • Regarding the status bar: Rayo does not support a dedicated status bar. It uses the "inline status bar" in tables. It's the one that says "27 Objekte" in your screen shots. Usually the informations displayed there are directly linked to the contents of the table, so it would be kind of a misuse to display arbitrary information. I think there are also some limitations concering when this status is updated. If you want to try it, look for methods contaning the words "page populate status" (e.g. on IPage or AbstractTableField).

Re: Swing discrepancies when using Rayo [message #1010934 is a reply to message #1010900] Mon, 18 February 2013 13:58 Go to previous message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 571
Registered: October 2012
Location: Bern, Switzerland
Senior Member

Thanks a lot for your clarifications. Setting scout.laf.useLafFrameAndDialog to false works and I can live with all the other limitations. It was more of a question, if I had missed something obvious to make those things work, but if they are not intended to, I'm fine with knowing that.

They way it looks at the moment, our application is going to be SWT based anyway, so this was more of a wrap-up question.

Previous Topic:Scout 3.9.0 M5 displays "bundle order prefix" warning
Next Topic:How to integrate the LDAPSecurityFilter with a scout application
Goto Forum:

Current Time: Tue May 22 06:34:30 GMT 2018

Powered by FUDForum. Page generated in 0.02378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top