Class TDropdownWidget<E extends TDropdownWidget.Entry>
java.lang.Object
com.thecsdev.common.scene.Node<TElement>
com.thecsdev.commonmc.api.client.gui.TElement
com.thecsdev.commonmc.api.client.gui.widget.TClickableWidget
com.thecsdev.commonmc.api.client.gui.widget.TButtonWidget
com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget<E>
- All Implemented Interfaces:
INode<TElement>, INodeBounded<TElement,Bounds2i>, INodeRenderable<TElement, TGuiGraphics>, Iterable<TElement>, Collection<TElement>
@Environment(CLIENT)
@Virtual
public class TDropdownWidget<E extends TDropdownWidget.Entry>
extends TButtonWidget
A
TButtonWidget that shows a dropdown menu featuring clickable items
when clicked.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn entry in a givenTDropdownWidget.static final classBarebonesTDropdownWidget.Entryimplementation.Nested classes/interfaces inherited from class TButtonWidget
TButtonWidget.Flat, TButtonWidget.Paintable, TButtonWidget.Transparent -
Field Summary
Fields inherited from class TButtonWidget
LBL_PAD_X, LBL_PAD_YFields inherited from class TClickableWidget
eClicked, ONCLICK_SOUNDFields inherited from class TElement
eInitialized -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidCallback method that is invoked whenever thisTClickableWidgetis clicked.final Collection<E> protected voidCallback method that is invoked when thisTElementis initializing.final ObjectProperty<E> TheObjectPropertyholding the currently selectedTDropdownWidget.Entry.Methods inherited from class TButtonWidget
getLabel, renderCallbackMethods inherited from class TClickableWidget
click, dragEndCallback, dragStartCallback, enabledProperty, focusLostCallback, getCursor, hoverGainedCallback, inputCallback, isFocusable, postRenderCallback, pressedPropertyMethods inherited from class TElement
addRel, boundsProperty, clearAndInit, clipsDescendantsProperty, contextMenuProperty, findElementAt, focusableProperty, focusGainedCallback, forEachVisible, getBaseType, getBounds, getClient, getContentBounds, getSelf, getTooltip, hoverableProperty, hoverLostCallback, invalidateTooltipCache, isFocused, isHoverable, isHovered, isHoveredOrFocused, isVisible, move, moveChildren, moveTo, removeRel, screenProperty, setBounds, setBounds, setBounds, showContextMenu, tickCallback, tooltipProperty, toString, visiblePropertyMethods inherited from class Node
add, addAll, childAddedCallback, childRemovedCallback, clear, contains, containsAll, equals, findChild, findParent, findSibling, forEach, get, getFirst, getLast, getParent, hashCode, indexOf, isEmpty, iterator, parentProperty, remove, remove, remove, removeAll, retainAll, rootProperty, size, toArray, toArray
-
Constructor Details
-
TDropdownWidget
public TDropdownWidget() -
TDropdownWidget
-
-
Method Details
-
selectedEntryProperty
TheObjectPropertyholding the currently selectedTDropdownWidget.Entry.- API Note:
- The selected
TDropdownWidget.Entryvalue can benull.
-
getEntries
- API Note:
- Do NOT add
nullentries to theCollection!
-
initCallback
Description copied from class:TElementCallback method that is invoked when thisTElementis initializing. You may override this method to create and add childTElements.- Overrides:
initCallbackin classTButtonWidget- See Also:
-
clickCallback
protected final void clickCallback()Description copied from class:TClickableWidgetCallback method that is invoked whenever thisTClickableWidgetis clicked.- Overrides:
clickCallbackin classTClickableWidget
-