public class DefaultProgressBarRenderer extends Object implements ProgressBarRenderer
ProgressBarRenderer).| Modifier | Constructor and Description |
|---|---|
protected |
DefaultProgressBarRenderer(ProgressBarStyle style,
String unitName,
long unitSize,
boolean isSpeedShown,
DecimalFormat speedFormat,
ChronoUnit speedUnit) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
eta(me.tongfei.progressbar.ProgressState progress,
Duration elapsed) |
protected String |
percentage(me.tongfei.progressbar.ProgressState progress) |
protected int |
progressFractionalPart(me.tongfei.progressbar.ProgressState progress,
int length) |
protected int |
progressIntegralPart(me.tongfei.progressbar.ProgressState progress,
int length) |
protected String |
ratio(me.tongfei.progressbar.ProgressState progress) |
String |
render(me.tongfei.progressbar.ProgressState progress,
int maxLength)
Renders the current progress bar state as a string to be shown by a consumer.
|
protected String |
speed(me.tongfei.progressbar.ProgressState progress,
Duration elapsed) |
protected DefaultProgressBarRenderer(ProgressBarStyle style, String unitName, long unitSize, boolean isSpeedShown, DecimalFormat speedFormat, ChronoUnit speedUnit)
protected int progressIntegralPart(me.tongfei.progressbar.ProgressState progress,
int length)
protected int progressFractionalPart(me.tongfei.progressbar.ProgressState progress,
int length)
protected String percentage(me.tongfei.progressbar.ProgressState progress)
protected String ratio(me.tongfei.progressbar.ProgressState progress)
public String render(me.tongfei.progressbar.ProgressState progress, int maxLength)
ProgressBarRendererrender in interface ProgressBarRendererprogress - The current progress bar statemaxLength - The maximum length as dictated by the consumerCopyright © 2022. All rights reserved.