public class WidgetList extends ScrollableWidgetGroup
| Modifier and Type | Field and Description |
|---|---|
protected Widget |
elementTemplate |
protected ShapeWidget |
scrollBar |
protected double |
spacing |
scrollOffset, scrollSpeedscaleX, scaleY, widgets| Constructor and Description |
|---|
WidgetList(Widget elementTemplate,
double x,
double y,
double width,
double height) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWidgetFromTemplate(java.util.function.BiConsumer<Widget,java.lang.Integer> settings) |
protected void |
calculateScrollBar() |
WidgetList |
copy() |
boolean |
doesNotRequireHoverToScroll() |
void |
draw(RenderContext ctx,
Vector3 center,
double mouseX,
double mouseY) |
static WidgetList |
from(Widget template) |
static WidgetList |
from(Widget template,
double spacing) |
static WidgetList |
from(Widget template,
double width,
double height) |
static WidgetList |
from(Widget template,
double width,
double height,
double spacing) |
static WidgetList |
from(Widget template,
double x,
double y,
double width,
double height) |
static WidgetList |
from(Widget template,
double x,
double y,
double width,
double height,
double spacing) |
protected double |
getElementsHeight() |
protected void |
recalculatePositions() |
boolean |
scrollDown(double scroll) |
boolean |
scrollUp(double scroll) |
protected void |
setScrollBarPos() |
addWidget, addWidgets, addWidgets, copyScrollable, drawHoverable, getHoverLines, getOffsetX, getOffsetY, getRenderBounds, isHoveringForScroll, onLeftClick, onRightClick, scroll, setWidgetsdrawWidget, getRenderBounds, getRenderBounds, isBounded, isBounded, isBoundedapplyScale, canBackspace, canType, checkEachClickable, checkEachHoverable, checkEachScrollable, checkEachSelectable, checkEachTickable, checkEachTypeable, checkEachWidget, copyGroup, drawHovered, drawSelectable, eachClickable, eachHoverable, eachScrollable, eachSelectable, eachTickable, eachTypeable, eachWidget, getElementsBottom, getElementsLeft, getElementsRight, getElementsTop, getElementsWidth, getHoveredElement, getRelativeTop, getSelectedElement, hasNonBlankText, hasNonEmptyText, isActivelyTicking, isHovering, onBackspace, onCharTyped, onCopy, onCut, onKeyPressed, onPaste, onResolutionUpdated, onSelectAll, onTick, playLeftClickSound, playRightClickSound, setWidgets, shouldDrawHovered, unapplyScalecanDraw, copyBasic, getBottom, getCenter, getCenter, getCenter, getLeft, getRight, getTop, getX, getY, isVisible, onScreenClosed, onScreenOpenedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanCopy, canCut, canPaste, canSelectAllprotected final ShapeWidget scrollBar
protected Widget elementTemplate
protected double spacing
public WidgetList(Widget elementTemplate, double x, double y, double width, double height)
public static WidgetList from(Widget template)
public static WidgetList from(Widget template, double spacing)
public static WidgetList from(Widget template, double width, double height)
public static WidgetList from(Widget template, double width, double height, double spacing)
public static WidgetList from(Widget template, double x, double y, double width, double height)
public static WidgetList from(Widget template, double x, double y, double width, double height, double spacing)
public void addWidgetFromTemplate(java.util.function.BiConsumer<Widget,java.lang.Integer> settings)
protected void calculateScrollBar()
public WidgetList copy()
copy in class ScrollableWidgetGrouppublic boolean doesNotRequireHoverToScroll()
doesNotRequireHoverToScroll in class ScrollableWidgetGrouppublic void draw(RenderContext ctx, Vector3 center, double mouseX, double mouseY)
draw in class ScrollableWidgetGroupprotected double getElementsHeight()
getElementsHeight in class WidgetGroupprotected void recalculatePositions()
recalculatePositions in class ScrollableWidgetGrouppublic boolean scrollDown(double scroll)
scrollDown in interface ScrollablescrollDown in class ScrollableWidgetGrouppublic boolean scrollUp(double scroll)
scrollUp in interface ScrollablescrollUp in class ScrollableWidgetGroupprotected void setScrollBarPos()