Class ScrollPanel
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraftforge.client.gui.widget.ScrollPanel
- All Implemented Interfaces:
- ContainerEventHandler,- GuiEventListener,- Renderable,- TabOrderedElement,- NarratableEntry,- NarrationSupplier
- Direct Known Subclasses:
- ModListScreen.InfoPanel,- ModMismatchDisconnectedScreen.MismatchInfoPanel
public abstract class ScrollPanel
extends AbstractContainerEventHandler
implements Renderable, NarratableEntry
Abstract scroll panel class.
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntryNarratableEntry.NarrationPriority
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final intprivate final intprivate final intprivate final intprivate final intprotected final intprotected final intprotected booleanprivate final Minecraftprotected final intprotected final intprotected final intprotected floatprivate booleanprotected final intprotected final intFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListenerDOUBLE_CLICK_THRESHOLD_MS
- 
Constructor SummaryConstructorsConstructorDescriptionScrollPanel(Minecraft client, int width, int height, int top, int left) ScrollPanel(Minecraft client, int width, int height, int top, int left, int border) ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth) ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColor) ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColorFrom, int bgColorTo) ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColorFrom, int bgColorTo, int barBgColor, int barColor, int barBorderColor) Base constructor
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidList<? extends GuiEventListener>children()protected booleanclickPanel(double mouseX, double mouseY, int button) protected voiddrawBackground(GuiGraphics guiGraphics, Tesselator tess, float partialTick) Draws the background of the scroll panel.protected voiddrawGradientRect(GuiGraphics guiGraphics, int left, int top, int right, int bottom, int color1, int color2) protected abstract voiddrawPanel(GuiGraphics guiGraphics, int entryRight, int relativeY, Tesselator tess, int mouseX, int mouseY) Draw anything special on the screen.private intprotected abstract intprivate intprotected intbooleanisMouseOver(double mouseX, double mouseY) booleanmouseClicked(double mouseX, double mouseY, int button) booleanmouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) booleanmouseReleased(double mouseX, double mouseY, int button) booleanmouseScrolled(double mouseX, double mouseY, double deltaX, double deltaY) voidrender(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandlergetFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandlercharTyped, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, magicalSpecialHackyFocus, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListenergetRectangle, mouseMovedMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntryisActive, narrationPriorityMethods inherited from interface net.minecraft.client.gui.narration.NarrationSupplierupdateNarrationMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElementgetTabOrderGroup
- 
Field Details- 
client
- 
widthprotected final int width
- 
heightprotected final int height
- 
topprotected final int top
- 
bottomprotected final int bottom
- 
rightprotected final int right
- 
leftprotected final int left
- 
scrollingprivate boolean scrolling
- 
scrollDistanceprotected float scrollDistance
- 
captureMouseprotected boolean captureMouse
- 
borderprotected final int border
- 
barWidthprivate final int barWidth
- 
barLeftprivate final int barLeft
- 
bgColorFromprivate final int bgColorFrom
- 
bgColorToprivate final int bgColorTo
- 
barBgColorprivate final int barBgColor
- 
barColorprivate final int barColor
- 
barBorderColorprivate final int barBorderColor
 
- 
- 
Constructor Details- 
ScrollPanel- Parameters:
- client- the minecraft instance this ScrollPanel should use
- width- the width
- height- the height
- top- the offset from the top (y coord)
- left- the offset from the left (x coord)
 
- 
ScrollPanel- Parameters:
- client- the minecraft instance this ScrollPanel should use
- width- the width
- height- the height
- top- the offset from the top (y coord)
- left- the offset from the left (x coord)
- border- the size of the border
 
- 
ScrollPanelpublic ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth) - Parameters:
- client- the minecraft instance this ScrollPanel should use
- width- the width
- height- the height
- top- the offset from the top (y coord)
- left- the offset from the left (x coord)
- border- the size of the border
- barWidth- the width of the scroll bar
 
- 
ScrollPanelpublic ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColor) - Parameters:
- client- the minecraft instance this ScrollPanel should use
- width- the width
- height- the height
- top- the offset from the top (y coord)
- left- the offset from the left (x coord)
- border- the size of the border
- barWidth- the width of the scroll bar
- bgColor- the color for the background
 
- 
ScrollPanelpublic ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColorFrom, int bgColorTo) - Parameters:
- client- the minecraft instance this ScrollPanel should use
- width- the width
- height- the height
- top- the offset from the top (y coord)
- left- the offset from the left (x coord)
- border- the size of the border
- barWidth- the width of the scroll bar
- bgColorFrom- the start color for the background gradient
- bgColorTo- the end color for the background gradient
 
- 
ScrollPanelpublic ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColorFrom, int bgColorTo, int barBgColor, int barColor, int barBorderColor) Base constructor- Parameters:
- client- the minecraft instance this ScrollPanel should use
- width- the width
- height- the height
- top- the offset from the top (y coord)
- left- the offset from the left (x coord)
- border- the size of the border
- barWidth- the width of the scroll bar
- bgColorFrom- the start color for the background gradient
- bgColorTo- the end color for the background gradient
- barBgColor- the color for the scroll bar background
- barColor- the color for the scroll bar handle
- barBorderColor- the border color for the scroll bar handle
 
 
- 
- 
Method Details- 
getContentHeightprotected abstract int getContentHeight()
- 
drawBackgroundDraws the background of the scroll panel. This runs AFTER Scissors are enabled.
- 
drawPanelprotected abstract void drawPanel(GuiGraphics guiGraphics, int entryRight, int relativeY, Tesselator tess, int mouseX, int mouseY) Draw anything special on the screen. Scissor (RenderSystem.enableScissor) is enabled for anything that is rendered outside the view box. Do not mess with Scissor unless you support this.
- 
clickPanelprotected boolean clickPanel(double mouseX, double mouseY, int button) 
- 
getMaxScrollprivate int getMaxScroll()
- 
applyScrollLimitsprivate void applyScrollLimits()
- 
mouseScrolledpublic boolean mouseScrolled(double mouseX, double mouseY, double deltaX, double deltaY) - Specified by:
- mouseScrolledin interface- ContainerEventHandler
- Specified by:
- mouseScrolledin interface- GuiEventListener
 
- 
getScrollAmountprotected int getScrollAmount()
- 
isMouseOverpublic boolean isMouseOver(double mouseX, double mouseY) - Specified by:
- isMouseOverin interface- GuiEventListener
 
- 
mouseClickedpublic boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
- mouseClickedin interface- ContainerEventHandler
- Specified by:
- mouseClickedin interface- GuiEventListener
 
- 
mouseReleasedpublic boolean mouseReleased(double mouseX, double mouseY, int button) - Specified by:
- mouseReleasedin interface- ContainerEventHandler
- Specified by:
- mouseReleasedin interface- GuiEventListener
 
- 
getBarHeightprivate int getBarHeight()
- 
mouseDraggedpublic boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) - Specified by:
- mouseDraggedin interface- ContainerEventHandler
- Specified by:
- mouseDraggedin interface- GuiEventListener
 
- 
render- Specified by:
- renderin interface- Renderable
 
- 
drawGradientRectprotected void drawGradientRect(GuiGraphics guiGraphics, int left, int top, int right, int bottom, int color1, int color2) 
- 
children- Specified by:
- childrenin interface- ContainerEventHandler
 
 
-