Package de.gurkenlabs.litiengine.gui
Class ImageComponentList
java.lang.Object
de.gurkenlabs.litiengine.gui.GuiComponent
de.gurkenlabs.litiengine.gui.ImageComponentList
- All Implemented Interfaces:
IRenderable
,Tweenable
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.util.EventListener
- Direct Known Subclasses:
Menu
public class ImageComponentList
extends GuiComponent
Field Summary
Constructor Summary
Constructors Constructor Description ImageComponentList(double x, double y, double width, double height, int rows, int columns, java.util.List<java.awt.Image> images, Spritesheet background)
Method Summary
Modifier and Type Method Description protected ImageComponent
createNewEntry(double x, double y, double width, double height, Spritesheet spritesheet, java.lang.String text, java.awt.Image image)
Spritesheet
getBackground()
java.util.List<ImageComponent>
getCellComponents()
int
getColumns()
double
getColumnWidth()
java.util.List<java.awt.Image>
getImages()
double
getRowHeight()
int
getRows()
void
prepare()
Prepare the GuiComponent and all its child Components (Makes the GuiComponent visible and adds mouse listeners.).void
setColumnWidth(double columnWidth)
void
setRowHeight(double rowHeight)
void
setXOffset(double xOffset)
void
setYOffset(double yOffset)
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, render, 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
Constructor Details
ImageComponentList
public ImageComponentList(double x, double y, double width, double height, int rows, int columns, java.util.List<java.awt.Image> images, Spritesheet background)
Method Details
getBackground
getCellComponents
getColumns
public int getColumns()getImages
public java.util.List<java.awt.Image> getImages()getRows
public int getRows()prepare
public void prepare()Description copied from class:GuiComponent
Prepare 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:
prepare
in classGuiComponent
getRowHeight
public double getRowHeight()setRowHeight
public void setRowHeight(double rowHeight)getColumnWidth
public double getColumnWidth()setColumnWidth
public void setColumnWidth(double columnWidth)setXOffset
public void setXOffset(double xOffset)setYOffset
public void setYOffset(double yOffset)createNewEntry
protected ImageComponent createNewEntry(double x, double y, double width, double height, Spritesheet spritesheet, java.lang.String text, java.awt.Image image)