public class Slider extends ScrollBar
minDragBarSize
public field and then
call setValues or setMaximum or setMinimum method (value must always be ODD!).Control.TranslucentShape
Modifier and Type | Field and Description |
---|---|
int |
barHeight
Size of the bar when it is using MaterialUI
|
int |
circleColor
The color of the circle you drag to change the slider value.
|
boolean |
drawFilledArea
Set to false to don't draw the filled area.
|
boolean |
drawTicks
Set to true to draw the ticks.
|
boolean |
invertDirection
Inverts the direction of the marker.
|
int |
sliderColor
The color of the slider
|
int |
ticksColor
The color of the slider ticks
|
AUTO_DELAY, bColor, blockIncrement, btnDec, btnInc, btnWH, directMove, disableBlockIncrement, dragBarMax, dragBarMin, dragBarPos, dragBarSize, enableAutoScroll, extraSize, fourColors, HORIZONTAL, INITIAL_DELAY, liveScrolling, maximum, midBarSize, minDragBarSize, minimum, npPartsHandle, sbColor, sbColorDis, sfColor, size, startDragPos, unitIncrement, value, valuesPerPixel, VERTICAL, verticalBar, visibleItems
alwaysEraseBackground, BACKGROUND_CYLINDRIC_SHADED, BACKGROUND_SHADED, BACKGROUND_SHADED_INV, BACKGROUND_SOLID, backgroundStyle, BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_ROUNDED, BORDER_SIMPLE, BORDER_TOP, borderColor, borderRadius, children, controlFound, finishedStart, ignoreOnAddAgain, ignoreOnRemove, insets, lastH, lastScreenWidth, lastW, lastX, lastY, numChildren, started, tabOrder, tail, TRANSITION_TIME
AFTER, alphaValue, appId, appObj, asContainer, asWindow, backColor, BEFORE, BOTTOM, BOTTOM_OF, BRIGHTER_BACKGROUND, callListenersOnAllTargets, CENTER, CENTER_OF, clearValueInt, clearValueStr, DARKER_BACKGROUND, DP, effect, enableUpdateScreen, esce, eventsEnabled, FILL, fillColor, FIT, floating, fm, fmH, focusHandler, focusLess, focusOnPenDown, focusTraversable, font, FONTSIZE, foreColor, height, ignoreInsets, isHighlighting, isTablet, KEEP, keepDisabled, keepEnabled, LEFT, next, nextTabControl, npParts, offscreen, offscreen0, onEventFirst, parent, PARENTSIZE, PARENTSIZEMAX, PARENTSIZEMIN, PREFERRED, prev, RANGE, repositionAllowed, RIGHT, RIGHT_OF, SAME, SCREENSIZE, SCREENSIZEMAX, SCREENSIZEMIN, setFont, setH, setRel, setW, setX, SETX_NOT_SET, setY, tempW, textShadowColor, TOP, translucentShape, transparentBackground, uiAdjustmentsBasedOnFontHeightIsSupported, uiAndroid, UICONST, uiFlat, uiHolo, uiMaterial, uiVista, visible, width, WILL_RESIZE, x, y
Constructor and Description |
---|
Slider()
Constructs a HORIZONTAL Slider.
|
Slider(byte orientation)
Constructs a Slider with the given orientation.
|
Modifier and Type | Method and Description |
---|---|
int |
getDragBarPos(int value)
Returns the drag bar position.
|
int |
getPreferredHeight()
If this is a horizontal scroll bar, i strongly suggest you use PREFERRED in your control's height (with small adjustments)
|
int |
getPreferredWidth()
If this is a vertical scroll bar, i strongly suggest you use PREFERRED in your control's width (with small adjustments).
|
void |
onColorsChanged(boolean b)
Called after a setEnabled, setForeColor and setBackColor and when a control has
been added to a Container.
|
void |
onFontChanged()
Called after a setFont
|
void |
onPaint(Graphics g)
Draws the border (if any).
|
protected void |
recomputeParams(boolean justValue) |
protected void |
updateValue(int pos) |
blockScroll, clear, getBlockIncrement, getMaximum, getMinimum, getUnitIncrement, getValue, getVisibleItems, handleGeographicalFocusChangeKeys, onAnimationFinished, onBoundsChanged, onEvent, setBlockIncrement, setEnabled, setHighlighting, setLiveScrolling, setMaximum, setMinimum, setNinePatchHandle, setPos, setUnitIncrement, setValue, setValues, setVisibleItems, tempShow
add, add, add, add, add, broadcastEvent, fillBackground, findChild, findNearestChild, findNextFocusControl, getBorderRadius, getBorderStyle, getChildren, getChildrenCount, getClientRect, getClientRect, getFirstChild, getFocusableControls, getInsets, incLastX, incLastY, initUI, isPressed, moveFocusToNextControl, moveFocusToNextEditable, onAddAgain, onRemove, onSwapFinished, paintChildren, remove, removeAll, resize, resizeHeight, resizeWidth, setBorderRadius, setBorderStyle, setFocusTraversable, setInsets, setPressColor, setPressed, swapToTopmostWindow
_onEvent, addEnabledStateListener, addFocusListener, addFontChangeHandler, addGridListener, addHandler, addHighlightListener, addKeyListener, addListContainerListener, addMouseListener, addMultiTouchListener, addPenListener, addPressListener, addPushNotificationListener, addSizeChangeHandler, addTimer, addTimer, addTimerListener, addValueChangeHandler, addWindowListener, bringToFront, changeHighlighted, contains, drawTranslucentBackground, getAbsoluteRect, getBackColor, getDoEffect, getEffectH, getEffectW, getEffectX, getEffectY, getEventListeners, getFont, getForeColor, getGap, getGraphics, getHeight, getNext, getParent, getParentWindow, getPos, getPressedEvent, getPrev, getRect, getSize, getTextShadowColor, getWidth, getX, getX2, getY, getY2, hadParentScrolled, hasFocus, internalSetEnabled, intXYWH, isActionEvent, isChildOf, isDisplayed, isEnabled, isFloating, isInsideOrNear, isObscured, isTopMost, isVisible, isVisibleAndInside, onWindowPaintFinished, post, postEvent, postPressedEvent, releaseScreenShot, removeEnabledStateListener, removeFocusListener, removeGridListener, removeHandler, removeHighlightListener, removeKeyListener, removeListContainerListener, removeMouseListener, removeMultiTouchListener, removePenListener, removePressListener, removePushNotificationListener, removeTimer, removeTimerListener, removeWindowListener, repaint, repaintNow, reposition, reposition, repositionChildren, requestFocus, resetSetPositions, resetStyle, safeRepaintNow, safeUpdateScreen, sendToBack, setBackColor, setBackForeColors, setDoEffect, setFloating, setFocusLess, setFont, setForeColor, setNinePatch, setNinePatch, setRect, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary, willOpenKeyboard
public boolean invertDirection
public boolean drawTicks
public boolean drawFilledArea
public int sliderColor
public int circleColor
public int ticksColor
public int barHeight
public Slider()
public Slider(byte orientation)
ScrollBar.VERTICAL
,
ScrollBar.HORIZONTAL
protected void recomputeParams(boolean justValue)
recomputeParams
in class ScrollBar
public void onColorsChanged(boolean b)
Control
onColorsChanged
in class ScrollBar
public void onFontChanged()
Control
onFontChanged
in class ScrollBar
public int getDragBarPos(int value)
public void onPaint(Graphics g)
Container
super.onPaint(g);
, or the border will not be drawn.public int getPreferredWidth()
ScrollBar
getPreferredWidth
in class ScrollBar
public int getPreferredHeight()
ScrollBar
getPreferredHeight
in class ScrollBar
protected void updateValue(int pos)
updateValue
in class ScrollBar