![JAR search and dependency download from the Maven repository](/logo.png)
panda.tool.progressbar.ConsoleWindmillBar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-tool Show documentation
Show all versions of panda-tool Show documentation
Panda Tool contains some commonly used tools and source code generator for Panda Mvc. Can generate Entity/Query/Dao/Action class, Freemarker (HTML) template file.
package panda.tool.progressbar;
import java.io.PrintStream;
/**
* A progress windmill of console
*/
public class ConsoleWindmillBar extends ConsoleProgressBar {
private static final char[] WINDMILL = { '-', '\\', '|', '/' };
private int frame = 0;
/**
* constructor
*/
public ConsoleWindmillBar() {
super();
setSize(1);
}
/**
* constructor
* @param out output
*/
public ConsoleWindmillBar(PrintStream out) {
super(out);
setSize(1);
}
/**
* draw progress
*/
protected void draw() {
clear();
out.print(WINDMILL[frame]);
out.flush();
frame++;
if (frame >= WINDMILL.length) {
frame = 0;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy