Package de.gurkenlabs.litiengine.gui
Class DropdownListField
java.lang.Object
de.gurkenlabs.litiengine.gui.GuiComponent
de.gurkenlabs.litiengine.gui.DropdownListField
- All Implemented Interfaces:
IRenderable,Tweenable,MouseListener,MouseMotionListener,MouseWheelListener,EventListener
-
Field Summary
FieldsFields inherited from class de.gurkenlabs.litiengine.gui.GuiComponent
ICON_FONT -
Constructor Summary
ConstructorsConstructorDescriptionDropdownListField(double x, double y, double width, double height, Object[] content, int elementsShown) -
Method Summary
Modifier and TypeMethodDescriptionObject[]intintbooleanbooleanvoidvoidprepare()Prepare the GuiComponent and all its child Components (Makes the GuiComponent visible and adds mouse listeners.).voidsetArrowKeyNavigation(boolean arrowKeyNavigation) voidsetButtonSprite(Spritesheet buttonSprite) voidsetEntrySprite(Spritesheet entrySprite) voidsetSelection(int selectionIndex) voidsetSelection(Object selectedObject) voidToggle drop down.Methods inherited from class de.gurkenlabs.litiengine.gui.GuiComponent
addRenderedListener, addRenderListener, getAppearance, getAppearanceDisabled, getAppearanceHovered, getBoundingBox, getCenterX, getCenterY, getClickConsumer, getComponentId, getComponents, getCurrentAppearance, getFont, getHeight, getHoverConsumer, getHoverSound, getLocation, getMouseDraggedConsumer, getMouseEnterConsumer, getMouseLeaveConsumer, getMouseMovedConsumer, getMousePressedConsumer, getMouseReleasedConsumer, getMouseWheelConsumer, getName, getShape, getTag, getText, getTextAlign, getTextAngle, getTextShadowColor, getTextShadowRadius, getTextToRender, getTextValign, getTextX, getTextY, getTweenValues, getWidth, getX, getY, hasAutomaticLineBreaks, hasTextAntialiasing, hasTextShadow, 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, removeListener, removeListener, render, setAutomaticLineBreaks, setDimension, setEnabled, setFont, setFontSize, setForwardMouseEvents, setHeight, setHovered, setHoverSound, setLocation, setLocation, setName, setSelected, setTag, setText, setTextAlign, setTextAngle, setTextAntialiasing, setTextShadow, setTextShadowColor, setTextShadowRadius, setTextValign, setTextX, setTextY, setTweenValues, setVisible, setWidth, setX, setY, suspend, toggleSelection, toggleSuspension
-
Field Details
-
ARROW_DOWN
-
-
Constructor Details
-
DropdownListField
public DropdownListField(double x, double y, double width, double height, Object[] content, int elementsShown)
-
-
Method Details
-
getButtonSprite
-
getChangeConsumer
-
getChosenElementComponent
-
getContentArray
-
getContentList
-
getDropDownButton
-
getEntrySprite
-
getListEntries
-
getNumberOfShownElements
public int getNumberOfShownElements() -
getSelectedIndex
public int getSelectedIndex() -
getSelectedObject
-
isDroppedDown
public boolean isDroppedDown() -
onChange
-
prepare
public void prepare()Description copied from class:GuiComponentPrepare the GuiComponent and all its child Components (Makes the GuiComponent visible and adds mouse listeners.). This is, for example, done right before switching to a new screen.- Overrides:
preparein classGuiComponent
-
setButtonSprite
-
setEntrySprite
-
setSelection
public void setSelection(int selectionIndex) -
setSelection
-
toggleDropDown
public void toggleDropDown()Toggle drop down.
-