For the latest stable version, please use Spring Shell 3.3.3!spring-doc.cn

ProgressView

ProgressView is a base implementation providing functionality to draw a progress info. Inherits BoxView.spring-doc.cn

ProgressView draws its content using concepts described belowspring-doc.cn

There are few build-in items namely text, spinner and percent.spring-doc.cn

Default ProgressView gives you text, spinner and percent.spring-doc.cn

ProgressView view = new ProgressView();
view.start();

And looks like:spring-doc.cn

Customisation

Here’s some examples for various customisations:spring-doc.cn

ProgressView view = new ProgressView(
	ProgressViewItem.ofText(10, HorizontalAlign.LEFT),
	ProgressViewItem.ofSpinner(3, HorizontalAlign.LEFT),
	ProgressViewItem.ofPercent(0, HorizontalAlign.RIGHT));
view.start();

Align text and spinner to left and give them less space. Align percent to right and give it remaining space.spring-doc.cn

Default Bindings

Does not have any default bindings.spring-doc.cn

Events

Events are sent depending on a state of a progress.spring-doc.cn

Table 1. ProgressView Events
Event Description

ProgressViewStartEventspring-doc.cn

Progress tracking has startedspring-doc.cn

ProgressViewEndEventspring-doc.cn

Progress tracking has stoppedspring-doc.cn

ProgressViewStateChangeEventspring-doc.cn

Progress tracking state has changedspring-doc.cn