Class OwnSliderReset

java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
com.badlogic.gdx.scenes.scene2d.ui.Table
gaiasky.util.scene2d.OwnSliderReset
All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Cullable, com.badlogic.gdx.scenes.scene2d.utils.Disableable, com.badlogic.gdx.scenes.scene2d.utils.Layout

public class OwnSliderReset extends com.badlogic.gdx.scenes.scene2d.ui.Table implements com.badlogic.gdx.scenes.scene2d.utils.Disableable
Wrapper around OwnSliderPlus that adds a "Reset value" button to the right of the slider.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table

    com.badlogic.gdx.scenes.scene2d.ui.Table.Debug, com.badlogic.gdx.scenes.scene2d.ui.Table.DebugRect
  • Field Summary

    Fields inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table

    backgroundBottom, backgroundLeft, backgroundRight, backgroundTop, debugActorColor, debugCellColor, debugTableColor

    Fields inherited from class com.badlogic.gdx.scenes.scene2d.Actor

    POOLS
  • Constructor Summary

    Constructors
    Constructor
    Description
    OwnSliderReset(String title, float min, float max, boolean logarithmic, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
     
    OwnSliderReset(String title, float min, float max, boolean logarithmic, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyle)
     
    OwnSliderReset(String title, float min, float max, float stepSize, boolean vertical, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyleName)
     
    OwnSliderReset(String title, float min, float max, float stepSize, float mapMin, float mapMax, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
     
    OwnSliderReset(String title, float min, float max, float stepSize, float mapMin, float mapMax, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyle)
     
    OwnSliderReset(String title, float min, float max, float stepSize, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
     
    OwnSliderReset(String title, float min, float max, float stepSize, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String sliderStyle)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addListener(com.badlogic.gdx.scenes.scene2d.EventListener listener)
     
    void
    connect(Event event)
     
    void
    connect(Event event, boolean connectUnmapped)
     
    void
     
    float
     
    float
     
    float
     
    float
     
    float
     
    com.badlogic.gdx.scenes.scene2d.ui.Button
     
     
     
    float
     
    float
     
     
    boolean
     
    boolean
     
    void
     
    void
     
    void
    setColor(float r, float g, float b, float a)
     
    void
    setColor(com.badlogic.gdx.graphics.Color color)
     
    void
    setDisabled(boolean disabled)
     
    void
    setDisplayValueMapped(boolean displayValueMapped)
     
    void
    setHeight(float height)
     
    void
    setLabelColor(float r, float g, float b, float a)
     
    void
    setLabelColor(com.badlogic.gdx.graphics.Color c)
     
    void
    Controls the strength of the non-linear value mapping when logarithmic mode is enabled.
    void
    setMappedValue(double mappedValue)
     
    void
    setMappedValue(float mappedValue)
     
    void
    setMapValues(float mapMin, float mapMax, boolean logarithmic)
     
    void
     
    void
    setProgrammaticChangeEvents(boolean programmaticChangeEvents)
     
    void
    setSize(float width, float height)
     
    void
    setStepSize(float stepSize)
     
    void
    setTooltip(String tooltip)
     
    void
    setUp(String title, float mapMin, float mapMax, boolean logarithmic, String labelStyleName)
     
    void
    setUp(String title, float mapMin, float mapMax, boolean logarithmic, DecimalFormat nf, String labelStyleName)
     
    boolean
    setValue(float value)
     
    void
     
    void
    setValuePrefix(String valuePrefix)
     
    void
    setValueSuffix(String valueSuffix)
     
    void
    setWidth(float width)
     

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table

    add, add, add, add, add, add, add, align, background, background, bottom, center, clearChildren, clip, clip, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, draw, drawBackground, drawDebug, drawDebugBounds, getAlign, getBackground, getCell, getCells, getClip, getColumnMinWidth, getColumnPrefWidth, getColumns, getColumnWidth, getMinHeight, getMinWidth, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getRow, getRowHeight, getRowMinHeight, getRowPrefHeight, getRows, getSkin, getTableDebug, hit, invalidate, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, removeActor, removeActorAt, reset, right, row, setBackground, setBackground, setClip, setDebug, setRound, setSkin, stack, top

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup

    childrenChanged, getMaxHeight, getMaxWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validate

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group

    act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, clear, clear, clearChildren, computeTransform, drawChildren, drawDebugChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActor, toString

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor

    addAction, addCaptureListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setTouchable, setUserObject, setVisible, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OwnSliderReset

      public OwnSliderReset(String title, float min, float max, boolean logarithmic, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyle)
    • OwnSliderReset

      public OwnSliderReset(String title, float min, float max, float stepSize, float mapMin, float mapMax, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyle)
    • OwnSliderReset

      public OwnSliderReset(String title, float min, float max, float stepSize, float mapMin, float mapMax, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
    • OwnSliderReset

      public OwnSliderReset(String title, float min, float max, float stepSize, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String sliderStyle)
    • OwnSliderReset

      public OwnSliderReset(String title, float min, float max, boolean logarithmic, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
    • OwnSliderReset

      public OwnSliderReset(String title, float min, float max, float stepSize, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
    • OwnSliderReset

      public OwnSliderReset(String title, float min, float max, float stepSize, boolean vertical, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyleName)
  • Method Details

    • setLogarithmicExponent

      public void setLogarithmicExponent(double exp)
      Controls the strength of the non-linear value mapping when logarithmic mode is enabled.

      The slider applies a power-curve transform of the form t^exp to its normalized position t ∈ [0,1]. This produces a customizable alternative to a true logarithmic scale:

      • exp = 1.0 → linear mapping (no non-linearity)
      • exp < 1.0 → expanded high-end resolution (e.g., 0.5 = square-root)
      • exp > 1.0 → expanded low-end resolution

      The parameter must be strictly positive.

    • addListener

      public boolean addListener(com.badlogic.gdx.scenes.scene2d.EventListener listener)
      Overrides:
      addListener in class com.badlogic.gdx.scenes.scene2d.Actor
    • setUp

      public void setUp(String title, float mapMin, float mapMax, boolean logarithmic, String labelStyleName)
    • setUp

      public void setUp(String title, float mapMin, float mapMax, boolean logarithmic, DecimalFormat nf, String labelStyleName)
    • setValueLabelTransform

      public void setValueLabelTransform(Function<Float,String> transform)
    • setNumberFormatter

      public void setNumberFormatter(DecimalFormat nf)
    • setDisplayValueMapped

      public void setDisplayValueMapped(boolean displayValueMapped)
    • setMapValues

      public void setMapValues(float mapMin, float mapMax, boolean logarithmic)
    • removeMapValues

      public void removeMapValues()
    • getValueString

      public String getValueString()
    • setValue

      public boolean setValue(float value)
    • getMappedValue

      public float getMappedValue()
    • setMappedValue

      public void setMappedValue(double mappedValue)
    • setMappedValue

      public void setMappedValue(float mappedValue)
    • setValuePrefix

      public void setValuePrefix(String valuePrefix)
    • setValueSuffix

      public void setValueSuffix(String valueSuffix)
    • setWidth

      public void setWidth(float width)
      Overrides:
      setWidth in class com.badlogic.gdx.scenes.scene2d.Actor
    • setHeight

      public void setHeight(float height)
      Overrides:
      setHeight in class com.badlogic.gdx.scenes.scene2d.Actor
    • setSize

      public void setSize(float width, float height)
      Overrides:
      setSize in class com.badlogic.gdx.scenes.scene2d.Actor
    • getPrefWidth

      public float getPrefWidth()
      Specified by:
      getPrefWidth in interface com.badlogic.gdx.scenes.scene2d.utils.Layout
      Overrides:
      getPrefWidth in class com.badlogic.gdx.scenes.scene2d.ui.Table
    • getPrefHeight

      public float getPrefHeight()
      Specified by:
      getPrefHeight in interface com.badlogic.gdx.scenes.scene2d.utils.Layout
      Overrides:
      getPrefHeight in class com.badlogic.gdx.scenes.scene2d.ui.Table
    • isDisabled

      public boolean isDisabled()
      Specified by:
      isDisabled in interface com.badlogic.gdx.scenes.scene2d.utils.Disableable
    • setDisabled

      public void setDisabled(boolean disabled)
      Specified by:
      setDisabled in interface com.badlogic.gdx.scenes.scene2d.utils.Disableable
    • setLabelColor

      public void setLabelColor(com.badlogic.gdx.graphics.Color c)
    • setLabelColor

      public void setLabelColor(float r, float g, float b, float a)
    • restoreLabelColor

      public void restoreLabelColor()
    • getValue

      public float getValue()
    • getMinValue

      public float getMinValue()
    • getMaxValue

      public float getMaxValue()
    • getStepSize

      public float getStepSize()
    • setStepSize

      public void setStepSize(float stepSize)
    • isDragging

      public boolean isDragging()
    • setColor

      public void setColor(com.badlogic.gdx.graphics.Color color)
      Overrides:
      setColor in class com.badlogic.gdx.scenes.scene2d.Actor
    • setColor

      public void setColor(float r, float g, float b, float a)
      Overrides:
      setColor in class com.badlogic.gdx.scenes.scene2d.Actor
    • getSlider

      public OwnSliderPlus getSlider()
    • getResetButton

      public com.badlogic.gdx.scenes.scene2d.ui.Button getResetButton()
    • getResetValue

      public Float getResetValue()
    • setProgrammaticChangeEvents

      public void setProgrammaticChangeEvents(boolean programmaticChangeEvents)
    • setTooltip

      public void setTooltip(String tooltip)
    • connect

      public void connect(Event event, boolean connectUnmapped)
    • connect

      public void connect(Event event)
    • connectUnmapped

      public void connectUnmapped(Event event)