Package net.mcreator.element.parts.gui
Class GUIComponent
java.lang.Object
net.mcreator.element.parts.gui.GUIComponent
- All Implemented Interfaces:
Comparable<GUIComponent>
- Direct Known Subclasses:
Checkbox
,EntityModel
,GUIComponent.Unknown
,Image
,ImageButton
,Label
,SizedComponent
,Slot
,Sprite
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
static final class
-
Field Summary
Modifier and TypeFieldDescriptionboolean
int
int
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
final boolean
abstract int
abstract String
getName()
Returns the name of the component.abstract int
Returns the priority for when this component should be drawn in the UI, to represent how Minecraft draws components in the game.abstract int
final int
getX()
final int
getY()
final int
gx
(int width) final int
gy
(int height) final int
hashCode()
boolean
abstract void
paintComponent
(int cx, int cy, WYSIWYGEditor wysiwygEditor, Graphics2D g) toString()
-
Field Details
-
anchorPoint
-
x
public int x -
y
public int y -
locked
public boolean locked -
uuid
-
-
Method Details
-
getName
Returns the name of the component. Name should be Java and registry name compatible.The name should be unique for the components that need it.
- Returns:
- Component name
-
paintComponent
-
getWidth
-
getHeight
-
getWeight
public abstract int getWeight()Returns the priority for when this component should be drawn in the UI, to represent how Minecraft draws components in the game.- Returns:
- The priority of the component (lower means it will be rendered closer to the screen and higher means it will "sink" more behind other components)
-
isSizeKnown
public boolean isSizeKnown() -
getX
public final int getX() -
getY
public final int getY() -
gx
public final int gx(int width) -
gy
public final int gy(int height) -
getAnchorPoint
-
compareTo
- Specified by:
compareTo
in interfaceComparable<GUIComponent>
-
hashCode
public final int hashCode() -
equals
-
toString
-