ctongfei / progressbar

Terminal-based progress bar for Java / JVM
http://tongfei.me/progressbar/
MIT License
1.08k stars 103 forks source link

Allow users to setup their own style #151

Closed PakhomovAlexander closed 1 year ago

PakhomovAlexander commented 1 year ago

Hi, I wonder to propose an improvement for the Progress bar API. This would be nice if users could provide their own characters for the progress bar style and color. For example, I want a green unicode bar in my application but now it is impossible to configure.

Would you like to discuss the API changes and accept the PR? Thanks.

ctongfei commented 1 year ago

Hi Alexander! A PR is definitely welcome for this -- I guess what you want to do is to modify ProgressBarStyle to an inheritable class rather than an enum.

PakhomovAlexander commented 1 year ago

Perfect! Yes, I would like to create an API that will allow users to extend the ProgressBarStyle through a builder-like style.

PakhomovAlexander commented 1 year ago

Hi @ctongfei , here is my PR #152

ctongfei commented 1 year ago

Thanks for the PR! Merged in release 0.10.0.