Class AbstractFileListPanel<P extends AbstractFileListPanel.FileListPanelProxy>
java.lang.Object
io.github.thecsdev.tcdcommons.api.client.gui.TElement
io.github.thecsdev.tcdcommons.api.client.gui.panel.TPanelElement
io.github.thecsdev.tcdcommons.api.client.gui.panel.TRefreshablePanelElement
io.github.thecsdev.tcdcommons.api.client.gui.panel.explorer.AbstractFileListPanel<P>
- All Implemented Interfaces:
TParentElement
,ITooltipProvider
,IEnableStateProvider
- Direct Known Subclasses:
FileListPanel
,SidebarPanel
@Experimental
public abstract class AbstractFileListPanel<P extends AbstractFileListPanel.FileListPanelProxy>
extends TRefreshablePanelElement
Represents a
TRefreshablePanelElement
that visually
lists File
s in a given directory.-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.thecsdev.tcdcommons.api.client.gui.panel.TPanelElement
TPanelElement.TPanelElementEvent_Scrolled
Nested classes/interfaces inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement
TElement.TElementEvent_ChildAR, TElement.TElementEvent_ContextMenu, TElement.TElementEvent_Moved, TElement.TElementEvent_ParentChanged, TElement.TElementEvent_Resized
-
Field Summary
Fields inherited from class io.github.thecsdev.tcdcommons.api.client.gui.panel.TRefreshablePanelElement
eRefreshed
Fields inherited from class io.github.thecsdev.tcdcommons.api.client.gui.panel.TPanelElement
backgroundColor, COLOR_BACKGROUND, COLOR_OUTLINE, COLOR_OUTLINE_FOCUSED, eScrolledHorizontally, eScrolledVertically, outlineColor, SCROLL_BOTH, SCROLL_HORIZONTAL, SCROLL_VERTICAL, scrollDragX, scrollDragY, scrollFlags, scrollPadding, scrollSensitivity, scrollVelocityX, scrollVelocityY, smoothScroll, smoothScrollSpeed, topmosts
Fields inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement
alpha, eChildAdded, eChildRemoved, eContextMenu, eMoved, eParentChanged, eResized, height, SP_ALL, SP_INVOKE_EVENT, SP_MOVE_CHILDREN, SP_RELATIVE, SP_UPDATE_TOPMOST, SS_ALL, SS_INVOKE_EVENT, SS_UPDATE_TOPMOST, tooltip, tooltipPositioner, width, x, y, zOffset
Fields inherited from interface io.github.thecsdev.tcdcommons.api.client.gui.TParentElement
MAX_CHILD_NESTING_DEPTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FileListItem
addFileListItem
(@Nullable File file) Creates a newFileListItem
that is associated with a givenFile
, adds it to thisAbstractFileListPanel
, and then returns it.protected TLabelElement
addSectionLabel
(net.minecraft.text.Text text) Creates a newFileListItem
that with a givenText
, adds it to thisAbstractFileListPanel
, and then returns it.final P
getProxy()
Returns theAbstractFileListPanel.FileListPanelProxy
associated with thisAbstractFileListPanel
.protected final int
Calculates and returns the "width" that should be applied to the next "vertical list item" element that will be added to thisAbstractFileListPanel
.protected final int
Calculates and returns the "X" coordinate that should be applied to the next "vertical list item" element that will be added to thisAbstractFileListPanel
.protected final int
Calculates and returns the "Y" coordinate that should be applied to the next "vertical list item" element that will be added to thisAbstractFileListPanel
.Methods inherited from class io.github.thecsdev.tcdcommons.api.client.gui.panel.TRefreshablePanelElement
init, refresh
Methods inherited from class io.github.thecsdev.tcdcommons.api.client.gui.panel.TPanelElement
__getHorizontalSeCnvElm, __getVerticalSeCnvElm, applyScrollDrag, getBackgroundColor, getHorizontalScrollAmount, getHorizontalScrollKnobSize01, getOutlineColor, getScrollFlags, getScrollPadding, getScrollSensitivity, getSmoothScroll, getVerticalScrollAmount, getVerticalScrollKnobSize01, hasScrollFlag, input, input, inputHorizontalScroll, inputScroll, inputScroll, inputSmoothScroll, inputSmoothScroll, inputVerticalScroll, isScrollable, postRender, render, renderSmoothScroll, scrollToChild, setBackgroundColor, setHorizontalScrollAmount, setOutlineColor, setScrollFlags, setScrollPadding, setScrollSensitivity, setSmoothScroll, setVerticalScrollAmount
Methods inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement
canBeAddedTo, createContextMenu, getAlpha, getChildren, getEnabled, getHeight, getItemRenderer, getParent, getParentTElement, getParentTScreen, getTextRenderer, getTooltip, getTooltipPositioner, getWidth, getX, getY, getZIndex, getZOffset, isDragging, isEnabled, isEnabledAndVisible, isFocusable, isFocused, isFocusedOrHovered, isHoverable, isHovered, isVisible, move, moveChildren, next, previous, setAlpha, setPosition, setPosition, setSize, setSize, setTooltip, setZOffset, tick, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.thecsdev.tcdcommons.api.client.gui.TParentElement
addChild, addChild, clearChildren, findChild, findLastChild, findParent, findParentTElement, forEachChild, getEndX, getEndY, removeChild, removeChild
-
Field Details
-
proxy
-
-
Constructor Details
-
AbstractFileListPanel
-
-
Method Details
-
getProxy
Returns theAbstractFileListPanel.FileListPanelProxy
associated with thisAbstractFileListPanel
. -
nextVerticalItemW
protected final int nextVerticalItemW()Calculates and returns the "width" that should be applied to the next "vertical list item" element that will be added to thisAbstractFileListPanel
. -
nextVerticalItemX
protected final int nextVerticalItemX()Calculates and returns the "X" coordinate that should be applied to the next "vertical list item" element that will be added to thisAbstractFileListPanel
. -
nextVerticalItemY
protected final int nextVerticalItemY()Calculates and returns the "Y" coordinate that should be applied to the next "vertical list item" element that will be added to thisAbstractFileListPanel
. -
addSectionLabel
Creates a newFileListItem
that with a givenText
, adds it to thisAbstractFileListPanel
, and then returns it. -
addFileListItem
Creates a newFileListItem
that is associated with a givenFile
, adds it to thisAbstractFileListPanel
, and then returns it.
-