Package de.gurkenlabs.litiengine.gui
Class CheckBox
java.lang.Object
de.gurkenlabs.litiengine.gui.GuiComponent
de.gurkenlabs.litiengine.gui.ImageComponent
de.gurkenlabs.litiengine.gui.CheckBox
- All Implemented Interfaces:
IRenderable
,Tweenable
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.util.EventListener
public class CheckBox
extends ImageComponent
Field Summary
Fields inherited from class de.gurkenlabs.litiengine.gui.ImageComponent
BACKGROUND_DISABLED_INDEX, BACKGROUND_HOVER_INDEX, BACKGROUND_INDEX, BACKGROUND_PRESSED_INDEX
Constructor Summary
Constructors Constructor Description CheckBox(double x, double y, double width, double height, Spritesheet spritesheet, boolean checked)
Method Summary
Modifier and Type Method Description java.util.List<java.util.function.Consumer<java.lang.Boolean>>
getChangeConsumer()
boolean
isChecked()
void
onChange(java.util.function.Consumer<java.lang.Boolean> c)
void
setChecked(boolean checked)
Methods inherited from class de.gurkenlabs.litiengine.gui.ImageComponent
getBackground, getImage, getImageAlign, getImageScaleMode, getImageValign, getSpritesheet, render, rescaleImage, setHeight, setImage, setImageAlign, setImageScaleMode, setImageValign, setSpriteSheet, setWidth
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, 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, prepare, setAutomaticLineBreaks, setDimension, setEnabled, setFont, setFontSize, setForwardMouseEvents, setHovered, setHoverSound, setLocation, setLocation, setName, setSelected, setTag, setText, setTextAlign, setTextAngle, setTextAntialiasing, setTextShadow, setTextShadowColor, setTextShadowStroke, setTextValign, setTextX, setTextY, setTweenValues, setVisible, setX, setY, suspend, toggleSelection, toggleSuspension
Field Details
Constructor Details
CheckBox
public CheckBox(double x, double y, double width, double height, Spritesheet spritesheet, boolean checked)
Method Details
getChangeConsumer
public java.util.List<java.util.function.Consumer<java.lang.Boolean>> getChangeConsumer()isChecked
public boolean isChecked()onChange
public void onChange(java.util.function.Consumer<java.lang.Boolean> c)setChecked
public void setChecked(boolean checked)