Package mcp.mobius.waila.api
Interface ITooltipComponent.HorizontalGrowing
- All Superinterfaces:
ITooltipComponent
- All Known Implementing Classes:
GrowingComponent,ItemListComponent,ProgressBarComponent
- Enclosing interface:
ITooltipComponent
@ClientOnly
@OverrideOnly
public static interface ITooltipComponent.HorizontalGrowing
extends ITooltipComponent
A 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 the total growing component weight.
-
Nested Class Summary
Nested classes/interfaces inherited from interface mcp.mobius.waila.api.ITooltipComponent
ITooltipComponent.HorizontalGrowing -
Method Summary
Modifier and TypeMethodDescriptionintReturns the height of the component.intReturns the minimal width of the component.default intReturns how much the component will grow relative to the rest of the growing components.default intgetWidth()Deprecated.width is dynamically calculated.voidsetGrownWidth(int grownWidth) Called with the calculated width.Methods inherited from interface mcp.mobius.waila.api.ITooltipComponent
render
-
Method Details
-
getMinimalWidth
int getMinimalWidth()Returns the minimal width of the component. -
setGrownWidth
void setGrownWidth(int grownWidth) Called with the calculated width. -
getHeight
int getHeight()Returns the height of the component.Contract:
setGrownWidth(int)will be called first, thengetHeight().- Specified by:
getHeightin interfaceITooltipComponent
-
getWeight
default int getWeight()Returns how much the component will grow relative to the rest of the growing components.Should be a final value that will not change.
-
getWidth
Deprecated.width is dynamically calculated.Description copied from interface:ITooltipComponentReturns the width of the component.Contract:
ITooltipComponent.getWidth()will be called first, thenITooltipComponent.getHeight().- Specified by:
getWidthin interfaceITooltipComponent
-