Instances of this class are selectable user interface
objects that represent a range of positive, numeric values.
At any given moment, a given slider will have a
single 'selection' that is considered to be its
value, which is constrained to be within the range of
values the slider represents (that is, between its
minimum and maximum values).
Typically, sliders will be made up of five areas:
an arrow button for decrementing the value
a page decrement area for decrementing the value by a larger amount
a thumb for modifying the value by mouse dragging
a page increment area for incrementing the value by a larger amount
an arrow button for incrementing the value
Based on their style, sliders are either HORIZONTAL
(which have a left facing button for decrementing the value and a
right facing button for incrementing it) or VERTICAL
(which have an upward facing button for decrementing the value
and a downward facing buttons for incrementing it).
On some platforms, the size of the slider's thumb can be
varied relative to the magnitude of the range of values it
represents (that is, relative to the difference between its
maximum and minimum values). Typically, this is used to
indicate some proportional value such as the ratio of the
visible area of a document to the total amount of space that
it would take to display it. SWT supports setting the thumb
size even if the underlying platform does not, but in this
case the appearance of the slider will not change.
Styles:
HORIZONTAL, VERTICAL
Events:
Selection
Note: Only one of the styles HORIZONTAL and VERTICAL may be specified.
IMPORTANT: This class is not intended to be subclassed.
At any given moment, a given slider will have a single 'selection' that is considered to be its value, which is constrained to be within the range of values the slider represents (that is, between its minimum and maximum values).
Typically, sliders will be made up of five areas:
- an arrow button for decrementing the value
- a page decrement area for decrementing the value by a larger amount
- a thumb for modifying the value by mouse dragging
- a page increment area for incrementing the value by a larger amount
- an arrow button for incrementing the value
Based on their style, sliders are eitherHORIZONTAL(which have a left facing button for decrementing the value and a right facing button for incrementing it) orVERTICAL(which have an upward facing button for decrementing the value and a downward facing buttons for incrementing it).On some platforms, the size of the slider's thumb can be varied relative to the magnitude of the range of values it represents (that is, relative to the difference between its maximum and minimum values). Typically, this is used to indicate some proportional value such as the ratio of the visible area of a document to the total amount of space that it would take to display it. SWT supports setting the thumb size even if the underlying platform does not, but in this case the appearance of the slider will not change.
Note: Only one of the styles HORIZONTAL and VERTICAL may be specified.
IMPORTANT: This class is not intended to be subclassed.