Return the recommended bounds for a label corresponding to a given thumb position, based on the configured
parameters.
Parameters:
value - The thumb position represented by the label, expressed as a fraction of the slider range, in the range
0 to 1 (inclusive).
size - The intended size of the label.
Returns:
the recommended bounds for the label.
getThumbBounds
abstract Rectangle2D getThumbBounds()
Return the bounds of the thumb area based on the configured parameters.
Rectangle2D getThumbBounds()
Return the bounds of the thumb area based on the configured parameters.
getThumbOutline
abstract Shape getThumbOutline()
Return the outline of the thumb based on the configured parameters.
Shape getThumbOutline()
Return the outline of the thumb based on the configured parameters.
getThumbPosition
abstract double getThumbPosition(int x,
int y)
Map a mouse coordinate to a slider thumb position.
double getThumbPosition(int x,
int y)
Map a mouse coordinate to a slider thumb position. This method relies on the previously configured widget size.
Parameters:
x - The x coordinate relative to the configured bounds.
y - The y coordinate relative to the configured bounds.
Returns:
the thumb position as a fraction of the slider range, if in the range 0 to 1 (inclusive), or a value less
than 0 if the coordinate is outside the slider range in the area corresponding to low values, or a value greater
than 1 if the coordinate is outside the slider range in the area corresponding to high values.