Progress indicators
Author: Let me introduce you to a friend. ProgressIndicator
, reader. Reader, ProgressIndicator
.
Author: Now that you know each other, let's work together.
ProgressIndicator: Cool, what's the task to do?
Author: Well, our awesome algorithm is taking too long and users are just leaving our state-of-the-art web application. So ProgressIndicator
, we need your help to give the user some feedback about the progress of the process.
ProgressIndicator: Sure.
Author: Thank you sir. Take a look at our original application implementing this Java Thread
performing our high-tech algorithm:
public class ProgressindicatorUI extends UI { private class HighTechAlgorithm extends Thread { public void run() { try { for (int i = 0; i < 10; i++) { sleep(1000); } } catch (InterruptedException e) { e.printStackTrace(); } } } protected void init(VaadinRequest request) { final VerticalLayout layout = new VerticalLayout...