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 GrowingComponents 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
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintReturns the height of the component.intReturns the minimal width of the component.voidrender(GuiGraphics ctx, int x, int y, DeltaTracker delta) Renders the component.voidsetGrownWidth(int grownWidth) Called with the calculated width.static GrowingComponentReturns 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, valueOfMethods 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.HorizontalGrowingReturns the minimal width of the component.- Specified by:
getMinimalWidthin interfaceITooltipComponent.HorizontalGrowing
-
setGrownWidth
public void setGrownWidth(int grownWidth) Description copied from interface:ITooltipComponent.HorizontalGrowingCalled with the calculated width.- Specified by:
setGrownWidthin interfaceITooltipComponent.HorizontalGrowing
-
getHeight
public int getHeight()Description copied from interface:ITooltipComponent.HorizontalGrowingReturns the height of the component.Contract:
ITooltipComponent.HorizontalGrowing.setGrownWidth(int)will be called first, thenITooltipComponent.HorizontalGrowing.getHeight().- Specified by:
getHeightin interfaceITooltipComponent- Specified by:
getHeightin interfaceITooltipComponent.HorizontalGrowing
-
render
Description copied from interface:ITooltipComponentRenders the component.- Specified by:
renderin interfaceITooltipComponent
-