Package net.mcreator.element.parts.gui
Class Tooltip
java.lang.Object
net.mcreator.element.parts.gui.GUIComponent
net.mcreator.element.parts.gui.SizedComponent
net.mcreator.element.parts.gui.Tooltip
- All Implemented Interfaces:
Comparable<GUIComponent>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.mcreator.element.parts.gui.GUIComponent
GUIComponent.AnchorPoint, GUIComponent.GSONAdapter, GUIComponent.Unknown
-
Field Summary
Fields inherited from class net.mcreator.element.parts.gui.SizedComponent
height, width
Fields inherited from class net.mcreator.element.parts.gui.GUIComponent
anchorPoint, locked, uuid, x, y
-
Constructor Summary
ConstructorDescriptionTooltip
(String name, int x, int y, int width, int height, StringProcedure text, Procedure displayCondition) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getName()
Returns the name of the component.int
Returns the priority for when this component should be drawn in the UI, to represent how Minecraft draws components in the game.void
paintComponent
(int cx, int cy, WYSIWYGEditor wysiwygEditor, Graphics2D g) Methods inherited from class net.mcreator.element.parts.gui.SizedComponent
getHeight, getWidth
Methods inherited from class net.mcreator.element.parts.gui.GUIComponent
compareTo, equals, getAnchorPoint, getX, getY, gx, gy, hashCode, isSizeKnown, toString
-
Field Details
-
name
-
text
-
displayCondition
-
-
Constructor Details
-
Tooltip
public Tooltip(String name, int x, int y, int width, int height, StringProcedure text, Procedure displayCondition)
-
-
Method Details
-
getName
Description copied from class:GUIComponent
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.
- Specified by:
getName
in classGUIComponent
- Returns:
- Component name
-
getRenderText
-
canChangeHeight
public boolean canChangeHeight()- Overrides:
canChangeHeight
in classSizedComponent
-
paintComponent
- Specified by:
paintComponent
in classGUIComponent
-
getWeight
public int getWeight()Description copied from class:GUIComponent
Returns the priority for when this component should be drawn in the UI, to represent how Minecraft draws components in the game.- Specified by:
getWeight
in classGUIComponent
- 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)
-