public class NumberAdjuster extends TextFieldComponent
Modifier and Type | Field and Description |
---|---|
static FontIcon |
ARROW_DOWN |
static FontIcon |
ARROW_UP |
DOUBLE_FORMAT, INTEGER_FORMAT
BACKGROUND_DISABLED_INDEX, BACKGROUND_HOVER_INDEX, BACKGROUND_INDEX, BACKGROUND_PRESSED_INDEX
ICON_FONT
Constructor and Description |
---|
NumberAdjuster(double x,
double y,
double width,
double height,
double lowerBound,
double upperBound,
double startValue,
double stepSize) |
Modifier and Type | Method and Description |
---|---|
void |
decrement() |
java.math.BigDecimal |
getCurrentValue() |
java.math.BigDecimal |
getLowerBound() |
java.math.BigDecimal |
getStepSize() |
java.math.BigDecimal |
getUpperBound() |
void |
increment() |
void |
onValueChange(java.util.function.Consumer<java.math.BigDecimal> cons) |
void |
prepare()
Prepare the GuiComponent and all its child Components (Makes the GuiComponent visible and adds mouse listeners.).
|
void |
setCurrentValue(java.math.BigDecimal newValue) |
void |
setLowerBound(java.math.BigDecimal lowerBound) |
void |
setStepSize(java.math.BigDecimal stepSize) |
void |
setUpperBound(java.math.BigDecimal upperBound) |
getFormat, getMaxLength, getText, handleTypedKey, onChangeConfirmed, render, setFormat, setMaxLength, setText
getBackground, getImage, getImageAlign, getImageScaleMode, getImageValign, getSpritesheet, setImage, setImageAlign, setImageScaleMode, setImageValign, setSpriteSheet
drawTextShadow, getAppearance, getAppearanceDisabled, getAppearanceHovered, getBoundingBox, getClickConsumer, getComponentId, getComponents, getCurrentAppearance, getFont, getHeight, getHorizontalTextMargin, getHoverConsumer, getHoverSound, getLocation, getMouseDraggedConsumer, getMouseEnterConsumer, getMouseLeaveConsumer, getMouseMovedConsumer, getMousePressedConsumer, getMouseReleasedConsumer, getMouseWheelConsumer, getName, getShape, getTag, getTextAlign, getTextAngle, getTextShadowColor, getTextToRender, getTextX, getTextY, getWidth, getX, getY, initializeComponents, isEnabled, isForwardMouseEvents, isHovered, isPressed, isSelected, isSuspended, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseEventShouldBeForwarded, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, onClicked, onHovered, onMouseDragged, onMouseEnter, onMouseLeave, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelScrolled, onTextChanged, setDimension, setEnabled, setFont, setFontSize, setForwardMouseEvents, setHeight, setHorizontalTextMargin, setHovered, setHoverSound, setLocation, setLocation, setName, setSelected, setTag, setTextAlign, setTextAngle, setTextShadow, setTextShadowColor, setTextX, setTextY, setVisible, setWidth, setX, setY, suspend, toggleSelection, toggleSuspension
public static final FontIcon ARROW_DOWN
public static final FontIcon ARROW_UP
public NumberAdjuster(double x, double y, double width, double height, double lowerBound, double upperBound, double startValue, double stepSize)
public void decrement()
public java.math.BigDecimal getCurrentValue()
public java.math.BigDecimal getLowerBound()
public java.math.BigDecimal getStepSize()
public java.math.BigDecimal getUpperBound()
public void increment()
public void onValueChange(java.util.function.Consumer<java.math.BigDecimal> cons)
public void prepare()
GuiComponent
prepare
in class GuiComponent
public void setCurrentValue(java.math.BigDecimal newValue)
public void setLowerBound(java.math.BigDecimal lowerBound)
public void setStepSize(java.math.BigDecimal stepSize)
public void setUpperBound(java.math.BigDecimal upperBound)