Package mcp.mobius.waila.api.component
Class ProgressBarComponent
java.lang.Object
mcp.mobius.waila.api.component.ProgressBarComponent
- All Implemented Interfaces:
 ITooltipComponent,ITooltipComponent.HorizontalGrowing
Component that renders a horizontal progress bar.
- 
Nested Class Summary
Nested classes/interfaces inherited from interface mcp.mobius.waila.api.ITooltipComponent
ITooltipComponent.HorizontalGrowing - 
Constructor Summary
ConstructorsConstructorDescriptionProgressBarComponent(int height, int foreground, int background, float progress)  - 
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mcp.mobius.waila.api.ITooltipComponent.HorizontalGrowing
getWeight, getWidth 
- 
Constructor Details
- 
ProgressBarComponent
public ProgressBarComponent(int height, int foreground, int background, float progress) - Parameters:
 height- the height of the barforeground- the color of current progressbackground- the background color
 
 - 
 - 
Method Details
- 
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
 
 -