Class TScrollBarWidget
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.TSliderWidget
com.thecsdev.commonmc.api.client.gui.widget.TScrollBarWidget
- All Implemented Interfaces:
INode<TElement>, INodeBounded<TElement,Bounds2i>, INodeRenderable<TElement, TGuiGraphics>, Iterable<TElement>, Collection<TElement>
- Direct Known Subclasses:
TScrollBarWidget.Flat
TSliderWidget acting as a scroll-bar for a given TPanelElement.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTScrollBarWidgetwhose visual appearance is more flat and does not use the vanilla button texture.static enumRepresents an axis/scroll-direction a givenTScrollBarWidgetcontrols.Nested classes/interfaces inherited from class TButtonWidget
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
ConstructorsConstructorDescriptionTScrollBarWidget(@NotNull TPanelElement panel) TScrollBarWidget(@NotNull TPanelElement panel, @NotNull TScrollBarWidget.ScrollDirection direction) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleaninputCallback(@NotNull TInputContext.InputDiscoveryPhase phase, @NotNull TInputContext context) A callback method that is invoked when the user makes an input.final ObjectProperty<@Nullable TPanelElement> final voidrefresh()Manually refreshes the value and knob side of thisTScrollBarWidget.Methods inherited from class TSliderWidget
knobSizeProperty, postRenderCallback, refreshKnobQuietly, renderBackground, renderCallback, renderKnob, valuePropertyMethods inherited from class TButtonWidget
getLabel, initCallbackMethods inherited from class TClickableWidget
click, clickCallback, dragEndCallback, dragStartCallback, enabledProperty, focusLostCallback, getCursor, hoverGainedCallback, isFocusable, 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
-
TScrollBarWidget
public TScrollBarWidget() -
TScrollBarWidget
-
TScrollBarWidget
public TScrollBarWidget(@NotNull @NotNull TPanelElement panel, @NotNull @NotNull TScrollBarWidget.ScrollDirection direction)
-
-
Method Details
-
refresh
public final void refresh()Manually refreshes the value and knob side of thisTScrollBarWidget.- See Also:
- API Note:
- Automatically called whenever the target panel (re/)initializes.
-
panelProperty
-
scrollDirectionProperty
TheNotNullPropertyholding theTScrollBarWidget.ScrollDirectionof thisTScrollBarWidget. The scroll direction dictates the scroll axis this scroll-bar widget controls. -
inputCallback
public final boolean inputCallback(@NotNull TInputContext.InputDiscoveryPhase phase, @NotNull @NotNull TInputContext context) Description copied from class:TSliderWidgetA callback method that is invoked when the user makes an input.- Overrides:
inputCallbackin classTSliderWidget- Parameters:
phase- The input discovery phase.context- Information about the user's input.- Returns:
trueif thisTElementhandled the input.
-