Package de.gurkenlabs.litiengine.gui
Class HorizontalSlider
java.lang.Object
de.gurkenlabs.litiengine.gui.GuiComponent
de.gurkenlabs.litiengine.gui.Slider
de.gurkenlabs.litiengine.gui.HorizontalSlider
- All Implemented Interfaces:
IRenderable
,Tweenable
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.util.EventListener
public class HorizontalSlider
extends Slider
Field Summary
Fields Modifier and Type Field Description static FontIcon
ARROW_LEFT
static FontIcon
ARROW_RIGHT
Constructor Summary
Constructors Constructor Description HorizontalSlider(double x, double y, double width, double height, float minValue, float maxValue, float stepSize)
Method Summary
Modifier and Type Method Description java.awt.geom.Point2D
getRelativeSliderPosition()
protected void
initializeComponents()
Initialize child components.void
render(java.awt.Graphics2D g)
Renders the visual contents of this instance onto the provided graphics context.void
setValueRelativeToMousePosition()
Methods inherited from class de.gurkenlabs.litiengine.gui.Slider
getButton1, getButton2, getButtonSpritesheet, getChangeConsumer, getCurrentValue, getMaxValue, getMinValue, getSliderComponent, getSliderSpritesheet, getStepSize, isDragging, onChange, setButton1, setButton2, setButtonSpritesheet, setCurrentValue, setSliderComponent, setSliderSpritesheet, setStepSize
Methods inherited from class de.gurkenlabs.litiengine.gui.GuiComponent
drawTextShadow, getAppearance, getAppearanceDisabled, getAppearanceHovered, getBoundingBox, getClickConsumer, getComponentId, getComponents, getCurrentAppearance, getFont, getHeight, getHoverConsumer, getHoverSound, getLocation, getMouseDraggedConsumer, getMouseEnterConsumer, getMouseLeaveConsumer, getMouseMovedConsumer, getMousePressedConsumer, getMouseReleasedConsumer, getMouseWheelConsumer, getName, getShape, getTag, getText, getTextAlign, getTextAngle, getTextShadowColor, getTextShadowStroke, getTextToRender, getTextValign, getTextX, getTextY, getTweenValues, getWidth, getX, getY, hasAutomaticLineBreaks, hasTextAntialiasing, 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, prepare, setAutomaticLineBreaks, setDimension, setEnabled, setFont, setFontSize, setForwardMouseEvents, setHeight, setHovered, setHoverSound, setLocation, setLocation, setName, setSelected, setTag, setText, setTextAlign, setTextAngle, setTextAntialiasing, setTextShadow, setTextShadowColor, setTextShadowStroke, setTextValign, setTextX, setTextY, setTweenValues, setVisible, setWidth, setX, setY, suspend, toggleSelection, toggleSuspension
Field Details
Constructor Details
HorizontalSlider
public HorizontalSlider(double x, double y, double width, double height, float minValue, float maxValue, float stepSize)
Method Details
getRelativeSliderPosition
public java.awt.geom.Point2D getRelativeSliderPosition()- Specified by:
getRelativeSliderPosition
in classSlider
initializeComponents
protected void initializeComponents()Description copied from class:GuiComponent
Initialize child components.- Overrides:
initializeComponents
in classGuiComponent
render
public void render(java.awt.Graphics2D g)Description copied from interface:IRenderable
Renders the visual contents of this instance onto the provided graphics context.If an
Entity
implements this interface, this method will be called right after the entity was rendered from the environment. Allowing for a custom rendering mechanism.This interface can be implemented in general by anything that should be rendered to the game's screen.
- Specified by:
render
in interfaceIRenderable
- Overrides:
render
in classGuiComponent
- Parameters:
g
- The current graphics object onto which this instance will render its visual contents.- See Also:
RenderEngine.renderEntity(Graphics2D, de.gurkenlabs.litiengine.entities.IEntity)
setValueRelativeToMousePosition
public void setValueRelativeToMousePosition()- Specified by:
setValueRelativeToMousePosition
in classSlider