< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/Slider.java

Print this page
rev 10292 : 8173385: spelling errors in JavaFX javadoc
Reviewed-by: aghaisas


  54 
  55 import javafx.css.converter.BooleanConverter;
  56 import javafx.css.converter.EnumConverter;
  57 import javafx.css.converter.SizeConverter;
  58 import javafx.scene.control.skin.SliderSkin;
  59 
  60 import javafx.css.Styleable;
  61 import javafx.css.StyleableProperty;
  62 
  63 /**
  64  * The Slider Control is used to display a continuous or discrete range of
  65  * valid numeric choices and allows the user to interact with the control. It is
  66  * typically represented visually as having a "track" and a "knob" or "thumb"
  67  * which is dragged within the track. The Slider can optionally show tick marks
  68  * and labels indicating the different slider position values.
  69  * <p>
  70  * The three fundamental variables of the slider are <code>min</code>,
  71  * <code>max</code>, and <code>value</code>. The <code>value</code> should always
  72  * be a number within the range defined by <code>min</code> and
  73  * <code>max</code>. <code>min</code> should always be less than or equal to
  74  * <code>max</code> (although a slider who's <code>min</code> and
  75  * <code>max</code> are equal is a degenerate case that makes no sense).
  76  * <code>min</code> defaults to 0, whereas <code>max</code> defaults to 100.
  77  * <p>
  78  * This first example creates a slider who's range, or span, goes from 0 to 1,
  79  * and who's value defaults to .5:
  80  *
  81  * <pre>
  82  * import javafx.scene.control.Slider;
  83  *
  84  * Slider slider = new Slider(0, 1, 0.5);
  85  * </pre>
  86  *
  87  * <p>
  88  * This next example shows a slider with customized tick marks and tick mark
  89  * labels, which also spans from 0 to 1:
  90  *
  91  * <pre>
  92  * import javafx.scene.control.Slider;
  93  *
  94  * Slider slider = new Slider(0, 1, 0.5);
  95  * slider.setShowTickMarks(true);
  96  * slider.setShowTickLabels(true);
  97  * slider.setMajorTickUnit(0.25f);
  98  * slider.setBlockIncrement(0.1f);
  99  * </pre>




  54 
  55 import javafx.css.converter.BooleanConverter;
  56 import javafx.css.converter.EnumConverter;
  57 import javafx.css.converter.SizeConverter;
  58 import javafx.scene.control.skin.SliderSkin;
  59 
  60 import javafx.css.Styleable;
  61 import javafx.css.StyleableProperty;
  62 
  63 /**
  64  * The Slider Control is used to display a continuous or discrete range of
  65  * valid numeric choices and allows the user to interact with the control. It is
  66  * typically represented visually as having a "track" and a "knob" or "thumb"
  67  * which is dragged within the track. The Slider can optionally show tick marks
  68  * and labels indicating the different slider position values.
  69  * <p>
  70  * The three fundamental variables of the slider are <code>min</code>,
  71  * <code>max</code>, and <code>value</code>. The <code>value</code> should always
  72  * be a number within the range defined by <code>min</code> and
  73  * <code>max</code>. <code>min</code> should always be less than or equal to
  74  * <code>max</code> (although a slider whose <code>min</code> and
  75  * <code>max</code> are equal is a degenerate case that makes no sense).
  76  * <code>min</code> defaults to 0, whereas <code>max</code> defaults to 100.
  77  * <p>
  78  * This first example creates a slider whose range, or span, goes from 0 to 1,
  79  * and whose value defaults to .5:
  80  *
  81  * <pre>
  82  * import javafx.scene.control.Slider;
  83  *
  84  * Slider slider = new Slider(0, 1, 0.5);
  85  * </pre>
  86  *
  87  * <p>
  88  * This next example shows a slider with customized tick marks and tick mark
  89  * labels, which also spans from 0 to 1:
  90  *
  91  * <pre>
  92  * import javafx.scene.control.Slider;
  93  *
  94  * Slider slider = new Slider(0, 1, 0.5);
  95  * slider.setShowTickMarks(true);
  96  * slider.setShowTickLabels(true);
  97  * slider.setMajorTickUnit(0.25f);
  98  * slider.setBlockIncrement(0.1f);
  99  * </pre>


< prev index next >