Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Scout/Tutorial/3.8/Rayo Look and Feel

< Scout‎ | Tutorial‎ | 3.8
Revision as of 09:22, 25 April 2012 by Ken.lee.bsi-software.com (Talk | contribs) (Getting started with Rayo)

The Scout documentation has been moved to https://eclipsescout.github.io/.

Introduction

Rayo is a modern Look and Feel that is based on Synth Look and Feel. In Synth all painting is delegated to components without requiring any code to be written. Rayo is a skinnable Look and Feel that can be configured in an XML property file.

In this tutorial a simple Scout application will be customized with the Rayo Look and Feel. Depending on the configured Look and Feel property in the config.ini file, the application is started with Rayo or with the default Swing Look and Feel (Nimbus or Windows).

Requirements

Rayo requires Scout Runtime Release 3.8 to be installed. The latest nightly build of Scout Runtime 3.8 can be downloaded from:

 http://download.eclipse.org/scout/nightly/update/. 

More details on how to do this can be found in the following The Scout documentation has been moved to https://eclipsescout.github.io/.

Getting started with Rayo

First we create a new Scout "Hello World" application as described in Hello World tutorial.

Switch to the Scout Explorer view and mark the previous created "Hello World" application. In the Scout Object Properties view check the box "Rayo Swing Look and Feel for Eclipse Scout" under Technologies.

Install Rayo Look and Feel using Scout SDK

A new dialog will pop up, showing the the changes that will be applied to the "Hello World" project in order to provide the Rayo Look and Feel. These changes will be explained in the following sections.

Changes applied to the Scout project

Click on OK and then on Restart Eclipse to apply the changes.

Run the server and client product as explained in Run the Empty Scout Application in the Scout SDK. The application starts automatically with the Rayo Look and Feel.

Scout application with rayo look and feel.png


Scout application with Rayo Look and Feel

Manual installation of Rayo

Instead of using the Scout SDK to download and install Rayo Look and Feel, Rayo can also be downloaded at the Eclipse Marketplace as an alternative. In this section the necessary steps are explained for setting up a Scout application with Rayo. All these single steps are done automatically when using Scout SDK.

Download Rayo

To download Rayo use the dialog "Eclipse Marketplace" in Eclipse under "Help -> Eclipse Marketplace..." and search for "Rayo" or alternatively click on "Help -> Install New Software" and add the URL https://tools.bsiag.com/marketplace/rayo as shown in the pictures.

Rayo URL via Update Site
Installation of Rayo via Update Site

Check at least the feature "Rayo Look and Feel Feature for Eclipse Scout" and proceed the installation by clicking on the Next button.

Add Rayo Plugins to the Client Product

Switch to Scout SDK. Select your Scout project in the Scout Explorer. In the Scout Object Properties view under Product launchers open your Swing client product by clicking on the link. Add the plugin com.bsiag.scout.rt.ui.swing.rayo and the fragment com.bsiag.scout.rt.ui.swing.laf.rayo.fragment as shown in the picture.

Add Rayo Plugin and Fragment to Swing client Product

Add Rayo Look and Feel to config.ini file

Open your config.ini for the Swing client product and add the following line to the config.ini file:

 scout.laf=com.bsiag.scout.rt.ui.swing.laf.rayo.Rayo

Change SwingEnvironment class

Open the class SwingEnvironment and inherit from com.bsiag.scout.rt.ui.swing.rayo.RayoSwingEnvironment by adding the following line:

 public class SwingEnvironment extends com.bsiag.scout.rt.ui.swing.rayo.RayoSwingEnvironment {
 }
Inherit from Rayo Swing Environment

Launch Scout application

Run the server and client product as explained in Run the Empty Scout Application in the Scout SDK. The application starts in Rayo Look and Feel mode.

Scout application with Rayo Look and Feel

Copyright © Eclipse Foundation, Inc. All Rights Reserved.