Class AbstractSelectionList.Entry<E extends AbstractSelectionList.Entry<E>>
java.lang.Object
net.minecraft.client.gui.components.AbstractSelectionList.Entry<E>
- All Implemented Interfaces:
GuiEventListener, TabOrderedElement, LayoutElement
- Direct Known Subclasses:
ContainerObjectSelectionList.Entry, ObjectSelectionList.Entry
- Enclosing class:
AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>
protected abstract static class AbstractSelectionList.Entry<E extends AbstractSelectionList.Entry<E>>
extends Object
implements LayoutElement, GuiEventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate intprotected AbstractSelectionList<E> Deprecated.private intprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintintintintintintintintgetWidth()intgetX()intgetY()booleanbooleanisMouseOver(double mx, double my) Checks if the given mouse coordinates are over the GUI element.abstract voidrenderContent(GuiGraphics graphics, int mouseX, int mouseY, boolean hovered, float a) voidsetFocused(boolean focused) Sets the focus state of the GUI element.voidsetHeight(int height) voidsetWidth(int width) voidsetX(int x) voidsetY(int y) voidvisitWidgets(Consumer<AbstractWidget> widgetVisitor) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPath, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
CONTENT_PADDING
public static final int CONTENT_PADDING- See Also:
-
x
private int x -
y
private int y -
width
private int width -
height
private int height -
list
Deprecated.
-
-
Constructor Details
-
Entry
protected Entry()
-
-
Method Details
-
setFocused
public void setFocused(boolean focused) Description copied from interface:GuiEventListenerSets the focus state of the GUI element.- Specified by:
setFocusedin interfaceGuiEventListener- Parameters:
focused-trueto apply focus,falseto remove focus
-
isFocused
public boolean isFocused()- Specified by:
isFocusedin interfaceGuiEventListener
-
renderContent
public abstract void renderContent(GuiGraphics graphics, int mouseX, int mouseY, boolean hovered, float a) -
isMouseOver
public boolean isMouseOver(double mx, double my) Description copied from interface:GuiEventListenerChecks if the given mouse coordinates are over the GUI element.- Specified by:
isMouseOverin interfaceGuiEventListener- Parameters:
mx- the X coordinate of the mouse.my- the Y coordinate of the mouse.- Returns:
trueif the mouse is over the GUI element,falseotherwise.
-
setX
public void setX(int x) - Specified by:
setXin interfaceLayoutElement
-
setY
public void setY(int y) - Specified by:
setYin interfaceLayoutElement
-
setWidth
public void setWidth(int width) -
setHeight
public void setHeight(int height) -
getContentX
public int getContentX() -
getContentY
public int getContentY() -
getContentHeight
public int getContentHeight() -
getContentYMiddle
public int getContentYMiddle() -
getContentBottom
public int getContentBottom() -
getContentWidth
public int getContentWidth() -
getContentXMiddle
public int getContentXMiddle() -
getContentRight
public int getContentRight() -
getX
public int getX()- Specified by:
getXin interfaceLayoutElement
-
getY
public int getY()- Specified by:
getYin interfaceLayoutElement
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceLayoutElement
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceLayoutElement
-
visitWidgets
- Specified by:
visitWidgetsin interfaceLayoutElement
-
getRectangle
- Specified by:
getRectanglein interfaceGuiEventListener- Specified by:
getRectanglein interfaceLayoutElement
-