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.
Difference between revisions of "Nebula StarRating"
(Created page with "==Introduction== File:Starrating.png A simple star rating toolbar that allows the user to rate anything. ==Usage== This is very simple : you instantiate a <code>StarRa...") |
m (→Examples) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Nebula|< Back to Nebula Main Page]] | ||
+ | |||
==Introduction== | ==Introduction== | ||
Line 4: | Line 6: | ||
A simple star rating toolbar that allows the user to rate anything. | A simple star rating toolbar that allows the user to rate anything. | ||
+ | |||
+ | __TOC__ | ||
==Usage== | ==Usage== | ||
Line 19: | Line 23: | ||
An example called StarRatingSnippet.java is located in the snippet org.eclipse.nebula.widgets.opal.starrating.snippets. | An example called StarRatingSnippet.java is located in the snippet org.eclipse.nebula.widgets.opal.starrating.snippets. | ||
− | This example is also available here : https:// | + | This example is also available here : [https://github.com/eclipse/nebula/blob/master/widgets/opal/starrating/org.eclipse.nebula.widgets.opal.starrating.snippets/src/org/eclipse/nebula/widgets/opal/starrating/snippets/StarRatingSnippet.java StarRatingSnippet.java] |
Latest revision as of 07:56, 19 March 2020
Introduction
A simple star rating toolbar that allows the user to rate anything.
Contents
Usage
This is very simple : you instantiate a StarRating
widget, you set the size of stars (SMALL,BIG) and the number of stars :
final StarRating sr = new StarRating(shell, SWT.NONE); sr.setSizeOfStars(SIZE.SMALL); sr.setMaxNumberOfStars(10);
And voilà !
Examples
An example called StarRatingSnippet.java is located in the snippet org.eclipse.nebula.widgets.opal.starrating.snippets.
This example is also available here : StarRatingSnippet.java