Controller for StarRating

The StarRatingController is build around a specific control created for Adichatz. This is a FieldController that means that it can be linked to the databinding service.

Control

The control org.adichatz.engine.widgets.MultiChoice was developped by Adichatz based on Laurent Caron's work.
The MultiChoice class represents a selectable user interface object that combines a read-only text-field and a set of checkboxes accessible thru a popup window.

  • determine the number of columns in choices list.
  • Set tool bar.
  • Set popup window size.

Usage:

Code

    <formattedText editPattern="######" format="Short" property="rentalDuration" mandatory="true" id="rentalDuration"/>
    <starRating maxNumberOfStars="5" numericPattern="#.##" property="rentalRate" mandatory="true" id="rentalRate"/>
    <numericText pattern="###.##" property="replacementCost" mandatory="true" style="SWT.BORDER | SWT.RIGHT" id="replacementCost"/>

Overview

Display number value as a result of stars

Explanations

maxNumberOfStars=“5”:Number of displayed star (5 means user can choose a value between 1 and 5).
numericPattern=“#.##”:A formatted text is displayed with the specified format (numericPattern).