Insubstantial / insubstantial

Swing look-and-feel library and assorted widgets
193 stars 58 forks source link

SubstanceProgressBarUI animated progress incorrect display on value set #123

Open jindrapetrik opened 10 years ago

jindrapetrik commented 10 years ago

How to reproduce: A) Set substance look and feel B) Create JProgressBar with minimum 0, maximum 100 C) Set its value to 0 later to 1, 2 ...100 D) Set its value again to 0, 1 ,2, 3, 4,....

Expected: Progressbar displays zero width bar after set value 0 in D).

Actual: Progressbar (at point D) displays rectangle which is about 40% of width, then 30%...then 20% and after that it increases again to correct values.

Reason: Progressbar animates its value using Timeline. In SubstanceProgressBarUI.SubstanceChangeListener.stateChanged, displayTimeline.abort() is called, but this call is made after progressBar.getValue().

Solution: Call displayTimeline.abort() at the beginning of stateChanged method, right before int currValue = progressBar.getValue(); line

shemnon commented 10 years ago

I don't have the time to maintain this project, and I am currently looking for a new maintainer.

http://speling.shemnon.com/blog/2013/06/08/insubstantial-needs-a-new-maintainer/