/** * Stop waiting. */ public void stop() { if (isWaiting()) { shell.println(); } complete = true; }
@Override public void run() { int i = 0; while (isWaiting()) { shell.print(spinnerChars[i++]); try { shell.write('\b'); Thread.sleep(50); } catch (InterruptedException e) { break; } if (i == spinnerChars.length) i = 0; } } };