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

Riena/Snippets

< Riena(Redirected from Riena Snippets)

{{#eclipseproject:rt.riena}}

What are Snippets?

Riena Snippets are small stand-alone programs that demonstrate specific techniques or functionality. Often a small example is the easiest way to understand how to use a particular feature.

To run a snippet:

  • create a new project that depends on org.eclipse.riena.client
  • copy the desired snippet to the clipboard
  • select your project and paste the snippet into your project. The snippet class will be created for you
  • run by selecting the class and then selecting Run > Run As > Java Application

Note that the snippets are edited for brevity rather than completeness. They are intended to guide the reader towards the correct solution, rather than be finished products. They are tested against the HEAD stream and may sometimes reference new API or require bug fixes from there.

Snippets also help isolate problems. The best way to report an Riena bug is to write your own snippet showing the problem and paste it into the bug report. For a snippet template, see the "Hello World" example.

To contribute a new snippet, create a snippet contribution in Bugzilla. Thanks in advance for your contribution!

Snippets

HelloWorld

LabelRidget

TextRidget

NumericTextRidget

DecimalTextRidget

DateTextRidget

DateTimeRidget

This ridget wraps a DateTime widget for editing time or date.

LinkRidget

This ridget wraps a Link widget for showing clickable, underlined, pieces of text.

BrowserRidget

This ridget wraps a Browser widget for showing HTML content.

SingleChoiceRidget / ChoiceComposite

Use this for 'radio' buttons.

Riena-snippet-singlechoiceridget.png

  • SingleChoiceRidget with mandatory marker
  • SingleChoiceRidget with output marker (read only)

MultipleChoiceRidget / ChoiceComposite

Use this for 'check' buttons.

  • Binding a MultipleChoiceRidget's input to a model
  • Binding a MultipleChoiceRidget's selection to a model
  • SingleChoiceRidget with mandatory marker
  • SingleChoiceRidget with output marker (read only)

ActionRidget

Use this for 'push' buttons.

  • ActionRidget with an ActionListener
  • ActionRidget with Text, Icon and an ActionListener

ToggleButtonRidget

Use this for 'toggle' buttons.

  • ToggleButtonRidget with SWT.PUSH Button and an ActionListener
  • ToggleButtonRidget with SWT.CHECK Button and an ActionListener (important: use MultipleChoiceRidget for a group of check buttons)
  • ToggleButtonRidget with SWT.RADIO Button and an ActionListener (important: this is supported but does not make sense, use SingleChoiceRidget instead)
  • ToggleButtonRidget with icon and text

ComboRidget

ListRidget

TableRidget

Snippet002TableRidget.png

Snippet003TableRidgetSorting.png

TableRidget ColumnFormatter.png

RienaSnippetTableRidget004.png

RienaSnippetTableRidget007.png

CompositeTableRidget

TreeRidget

TreeTableRidget

A tree with columns. It can do everything TreeRidget can do and more.

TraverseRidget

This ridget has a numeric value that can be manipulated by the user. It is mapped to SWT Slider, Scale or Spinner controls.

ShellRidget

StatuslineRidget

StatuslineNumberRidget

MessageBoxRidget

Shows messages to the user in a popup window.

EmbeddedTitleBarRidget (?)

ModuleTitleBarRidget (?)

AbstractDialogView

Used to build dialogs that use the Riena concept of views and controllers.

MasterDetailsRidget

This ridget automatically binds a table ("master" area) to a set of widgets ("details" area).
See also: IMasterDetailsRidget, IMasterDetailsDelegate, AbstractMasterDetailsComposite

Riena master details 001.png

Riena master details auto apply.png

Riena master details confirm removal.png

Detached Views

SnippetDetachedView001.png

Back to the top