public class Slider extends Control
setWheelEnabled(boolean), the mouse wheel can be used to increment or decrement the
value stepwise (amount can be set through scrollSpeed).| Modifier and Type | Class and Description |
|---|---|
static class |
Slider.Orientation |
Control.Constants, Control.ImageMode, Control.Predicate, Control.Predicate1<T>, Control.Predicate2<T,U>, Control.RenderingMethod, Control.Setter<T>| Modifier and Type | Field and Description |
|---|---|
static Slider.Orientation |
HORIZONTAL |
static Slider.Orientation |
VERTICAL |
ALL, ANCHOR_INACTIVE, AUTOSIZE_BOTH, AUTOSIZE_HEIGHT, AUTOSIZE_NONE, AUTOSIZE_WIDTH, BACKGROUND_COLOR, BACKGROUND_COLORS, BORDER, BORDER_COLOR, BORDER_RADIUS, BORDER_WIDTH, BUFFERED_RENDERING, COLORS, defaultRenderingMethod, FILL, FIT, FIT_INSIDE, FONT_SIZE, FOREGROUND_COLOR, HOVER_COLOR, LINE_HEIGHT, MARGIN, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP, name, OPACITY, PADDING, PADDING_BOTTOM, PADDING_LEFT, PADDING_RIGHT, PADDING_TOP, PERCENTAGE_MODE, PIXEL_MODE, PRESSED_COLOR, SPACING, TEXT_ALIGN, TEXT_ALIGN_Y, TEXT_COLOR, TEXT_PROPERTIES, UNBUFFERED_RENDERING| Constructor and Description |
|---|
Slider() |
Slider(float minValue,
float maxValue) |
Slider(float minValue,
float maxValue,
float value) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBallSize() |
float |
getMaxValue() |
float |
getMinValue() |
Slider.Orientation |
getOrientation() |
float |
getRelativeWheelSpeed() |
int |
getThickness() |
float |
getValue() |
boolean |
isWheelEnabled() |
void |
removeValueChangeListener() |
void |
setBallSize(int ballSize)
Set diameter of the slider value "ball".
|
void |
setMaxValue(float maxValue)
Set maximum value of the slider.
|
void |
setMinValue(float minValue)
Set minimum value of the slider.
|
void |
setOrientation(Slider.Orientation orientation)
Set orientation to horizontal or vertical
|
void |
setRelativeWheelSpeed(float setRelativeWheelSpeed)
Set the speed for changing the value with the mouse wheel; the value represents the relative
speed in percent of the set interval length (abs(min-max)).
|
void |
setThickness(int thickness)
Set the thickness of the slider bar in pixel.
|
void |
setValue(float value)
Set the value of the slider.
|
void |
setValueChangeListener(Control.Predicate lambda)
Set a value-changed lambda listener.
|
void |
setValueChangeListener(Control.Predicate1<Slider> lambda)
Set a value-change listener lambda.
|
void |
setValueChangeListener(java.lang.String methodName) |
void |
setValueChangeListener(java.lang.String methodName,
java.lang.Object target)
Set a value-change listener.
|
void |
setWheelEnabled(boolean wheelEnabled)
Specify if scrolling while mouse is over the slider changes the value.
|
addAutoAnchors, animate, blur, copyStyle, copyStyle, doForAll, fillParent, fillParent, fillParent, fillParentHeight, fillParentHeight, fillParentWidth, fillParentWidth, focus, forceRepaint, getAnchorMode, getAnchorValue, getAvailableHeight, getAvailableWidth, getBackgroundColor, getBorderColor, getBorderRadius, getBorderWidth, getCursor, getForegroundColor, getHeight, getHoverColor, getImage, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOffsetXToParent, getOffsetXToWindow, getOffsetYToParent, getOffsetYToWindow, getOpacity, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getPressedColor, getVersionString, getWidth, getX, getY, getZ, isEnabled, isFocusable, isFocused, isPropagationStopped, isVisible, noAutosize, relativeCoordsAreWithin, removeAnchor, removeBoxShadow, removeFocusListener, removeMouseListener, removeResizeListener, setAnchor, setAnchors, setAutosizing, setBackgroundColor, setBorder, setBorder, setBorderColor, setBorderRadius, setBorderWidth, setBoxShadow, setCursor, setEnabled, setFixedSize, setFocusListener, setFocusListener, setFocusListener, setFocusListener, setForegroundColor, setGradient, setHeight, setHeight, setHoverColor, setImage, setImageMode, setMargin, setMargin, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setMouseListener, setMouseListener, setMouseListener, setMouseListener, setOpacity, setOpacity, setPadding, setPadding, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPercentageAnchor, setPercentageAnchors, setPixelAnchor, setPixelAnchors, setPosition, setPressedColor, setResizeListener, setResizeListener, setResizeListener, setResizeListener, setSize, setVisibility, setVisible, setWidth, setWidth, setX, setY, setZ, stopPropagation, unfocuspublic static final Slider.Orientation HORIZONTAL
public static final Slider.Orientation VERTICAL
public Slider()
public Slider(float minValue,
float maxValue)
public Slider(float minValue,
float maxValue,
float value)
public void setValue(float value)
value - valuepublic void setMinValue(float minValue)
minValue - minValuepublic void setMaxValue(float maxValue)
maxValue - maxValuepublic void setThickness(int thickness)
thickness - thicknesspublic void setBallSize(int ballSize)
ballSize - ballSizepublic void setOrientation(Slider.Orientation orientation)
orientation - HORIZONTAL or VERTICALpublic void setWheelEnabled(boolean wheelEnabled)
wheelEnabled - wheelEnabledpublic void setRelativeWheelSpeed(float setRelativeWheelSpeed)
setRelativeWheelSpeed - setRelativeWheelSpeedpublic float getValue()
public float getMinValue()
public float getMaxValue()
public int getThickness()
public int getBallSize()
public Slider.Orientation getOrientation()
public boolean isWheelEnabled()
public float getRelativeWheelSpeed()
public void setValueChangeListener(java.lang.String methodName,
java.lang.Object target)
methodName - methodNametarget - targetpublic void setValueChangeListener(java.lang.String methodName)
public void setValueChangeListener(Control.Predicate1<Slider> lambda)
Slider whose state has changedlambda - lambda expression with Slider parameterpublic void setValueChangeListener(Control.Predicate lambda)
lambda - lambda expressionpublic void removeValueChangeListener()
Processing Library guiSET by Mc Zen. (c) 2021