Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Riena Project"

(Interesting Ideas for Riena)
Line 23: Line 23:
 
==Interesting Ideas for Riena==
 
==Interesting Ideas for Riena==
 
[[Riena_Interesting_Ideas| Interesting Ideas for Riena]]
 
[[Riena_Interesting_Ideas| Interesting Ideas for Riena]]
== Look&Feel ==
 
Riena provides a Look&Feel for the controls of the navigation. The Riena Look&Feel remembers the Look&Feel of Swing.
 
  
A Look&Feel of Riena consists of the Look&Feel with a Theme. The Theme provides the colors, fonts, images and some other settings. In the Look&Feel other renderers for some controls can be set.
+
== Look&Feel for Riena ==
 
+
[[Riena_Look_and_Feel| Look&Feel]]
=== Custom Look&Feel ===
+
In your own Look&Feel you must set your Theme and an ID.
+
 
+
The following steps are necessary:
+
 
+
#Extent the class <tt>RienaDefaultLnf</tt>
+
#Create and set the Theme
+
#Return the ID
+
 
+
Example:
+
<source lang="java">
+
public class ExampleLnf extends RienaDefaultLnf {
+
 
+
  public ExampleLnf() {
+
    super();
+
    setTheme(new ExampleTheme());
+
  }
+
 
+
  @Override
+
  protected String getLnfId() {
+
    return ExampleLnf;
+
  }
+
 
+
}
+
</source>
+
 
+
To set your custom Look&Feel call the static method <tt>setLnf(lnf)</tt> of the class <tt>LnfManager</tt>. The recommended place to do that is the constructor of the Riena Application (<tt>SwtApplication</tt>):
+
 
+
Example:
+
<source lang="java">
+
public SwtExampleApplication() {
+
  super();
+
  LnfManager.setLnf(new ExampleLnf());
+
}
+
</source>
+
 
+
=== Custom Theme ===
+
To write your own Theme you must implements the interface <tt>ILnfTheme</tt>.
+
 
+
The interface has the following four methods:
+
 
+
<tt>addCustomColors(Map<String, ILnfResource> table)</tt>
+
 
+
<tt>addCustomFonts(Map<String, ILnfResource> table)</tt>
+
 
+
<tt>addCustomImages(Map<String, ILnfResource> table)</tt>
+
 
+
<tt>addCustomSettings(Map<String, Object> table)</tt>
+
 
+
These methods must be implemented to define the colors, fonts, images and settings for the controls of the navigation.
+
 
+
It is recommend to extent the default theme of Riena, <tt>DefaultRienaTheme</tt>. All necessary resources and settings are already defined in the default theme. You must only put your own defaults into the tables of the Look&Feel.
+
 
+
The following line e.g. specifies the background color of a sub module:
+
<source lang="java">
+
table.put(ILnfKeyConstants.SUB_MODULE_BACKGROUND,new ColorLnfResource(186, 193, 225));
+
</source>
+
 
+
All existing keys for the Look&Feel you can find in the interface <tt>ILnfKeyConstants</tt>. It is not possible to add colors from the type <tt>org.eclipse.swt.graphics.Color</tt>. The colors must be wrapped from an instance of the class <tt>ColorLnfResource</tt>. This helps the Look&Feel to dispose all resources of the Look&Feel. Also wrappers for fonts and images exist.
+
 
+
=== Custom Renderer ===
+
For nearly every control of the navigation a renderer is used to paint it. This renderers can be replaced by own implementations. To write your own renderer please extent an existing default renderer
+
 
+
To set your own renderer you can use extensions. Therefore Riena provides an extension points: <tt>org.eclipse.riena.ui.swt.lnfrenderer</tt>
+
 
+
This extension can only have renderer elements. A renderer element has the following three attributes:
+
 
+
<tt>lnfkey</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Key of the Look&Feel for the
+
renderer (see ILnfKeyConstants)
+
 
+
<tt>lnfid<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID of the your own Look&Feel (see getLnfId())
+
 
+
<tt>class<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class of the RendererExample:
+
 
+
<source lang="xml">
+
<extension point="org.eclipse.riena.ui.swt.lnfrenderer">
+
  <renderer class="org.eclipse.riena.example. application.ExampleModuleGroupRenderer"
+
            lnfid="ExampleLnf"
+
            lnfkey="ModuleGroup.renderer">
+
  </renderer>
+
</extension>
+
</source>
+
  
 
==IP Log==
 
==IP Log==

Revision as of 10:43, 28 July 2008

Riena
Website
[ Download]
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source

Riena Main Wiki Page

Current Version

Build M3 released.

Preparing M4, here a link to the News and Noteworthy

EclipseCon 2008

We were there.

Getting Started with Riena

Getting Started

Interesting Ideas for Riena

Interesting Ideas for Riena

Look&Feel for Riena

Look&Feel

IP Log

Checkout our IP Log for details.

Riena Project Plan

Plan from the proposal:

  • 2008-02 - Version 1.0.0M1
    • Remote services support
    • Authentication /authorization support
  • 2008-05-08 - Version 1.0.0M2
    • Common functionalities (logging, exception handling, system configuration)
    • Object transactions
    • Support for configuration of Stages through ConfigurationAdmin
    • Injector for easy access to services and extensions
  • 2008-07 - Version 1.0.0M3
    • first basis of the UI running
      • view-controller concept with ridgets
      • support for markers and validationrules
      • navigation model
      • wizard to create Riena client apps
  • 2008-08 - Version 1.0.0M4
    • more wizards to create Riena client apps with remote service support
    • more wizards to create Riena server apps
    • Monitoring mechanism for client-side log events
  • 2008-10 - version 1.0 - Release 1.0
    • Persistence support
    • complete Business process oriented navigation/UI
    • Sample application

Back to the top