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

Difference between revisions of "Nebula StarRating"

Line 1: Line 1:
 +
[[Nebula|< Back to Nebula Main Page]]
 +
 
==Introduction==
 
==Introduction==
  
Line 21: 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://git.eclipse.org/c/nebula/org.eclipse.nebula.git/tree/widgets/opal/starrating/org.eclipse.nebula.widgets.opal.starrating.snippets/src/org/eclipse/nebula/widgets/opal/starrating/snippets/StarRatingSnippet.java
+
This example is also available here : [https://git.eclipse.org/c/nebula/org.eclipse.nebula.git/tree/widgets/opal/starrating/org.eclipse.nebula.widgets.opal.starrating.snippets/src/org/eclipse/nebula/widgets/opal/starrating/snippets/StarRatingSnippet.java StarRatingSnippet.java]

Revision as of 06:51, 21 February 2018

< Back to Nebula Main Page

Introduction

Starrating.png

A simple star rating toolbar that allows the user to rate anything.

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

Back to the top