Package mcp.mobius.waila.api.component
Enum Class GrowingComponent
- All Implemented Interfaces:
Serializable
,Comparable<GrowingComponent>
,Constable
,ITooltipComponent
,ITooltipComponent.HorizontalGrowing
@ClientOnly
public enum GrowingComponent
extends Enum<GrowingComponent>
implements ITooltipComponent.HorizontalGrowing
Component that will grow in size relative to overall tooltip width.
The size in which the component will grow is calculated by dividing
the available space with how much GrowingComponent
s are in a line.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface mcp.mobius.waila.api.ITooltipComponent
ITooltipComponent.HorizontalGrowing
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the height of the component.int
Returns the minimal width of the component.void
render
(GuiGraphics ctx, int x, int y, DeltaTracker delta) Renders the component.void
setGrownWidth
(int grownWidth) Called with the calculated width.static GrowingComponent
Returns the enum constant of this class with the specified name.static GrowingComponent[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface mcp.mobius.waila.api.ITooltipComponent.HorizontalGrowing
getWeight, getWidth
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getMinimalWidth
public int getMinimalWidth()Description copied from interface:ITooltipComponent.HorizontalGrowing
Returns the minimal width of the component.- Specified by:
getMinimalWidth
in interfaceITooltipComponent.HorizontalGrowing
-
setGrownWidth
public void setGrownWidth(int grownWidth) Description copied from interface:ITooltipComponent.HorizontalGrowing
Called with the calculated width.- Specified by:
setGrownWidth
in interfaceITooltipComponent.HorizontalGrowing
-
getHeight
public int getHeight()Description copied from interface:ITooltipComponent.HorizontalGrowing
Returns the height of the component.Contract:
ITooltipComponent.HorizontalGrowing.setGrownWidth(int)
will be called first, thenITooltipComponent.HorizontalGrowing.getHeight()
.- Specified by:
getHeight
in interfaceITooltipComponent
- Specified by:
getHeight
in interfaceITooltipComponent.HorizontalGrowing
-
render
Description copied from interface:ITooltipComponent
Renders the component.- Specified by:
render
in interfaceITooltipComponent
-