From: Niki Roo Date: Sun, 5 Mar 2017 19:32:11 +0000 (+0100) Subject: Cannot compile on 1.6 because var names not clear X-Git-Tag: fanfix-swing-0.0.1~21^2~283 X-Git-Url: http://git.nikiroo.be/?a=commitdiff_plain;h=9acc9360b4c5eaf20bfa220a8bf1358ef5345669;p=fanfix-swing.git Cannot compile on 1.6 because var names not clear --- diff --git a/src/be/nikiroo/utils/ui/ProgressBar.java b/src/be/nikiroo/utils/ui/ProgressBar.java index 6e1e44a9..3e854f79 100644 --- a/src/be/nikiroo/utils/ui/ProgressBar.java +++ b/src/be/nikiroo/utils/ui/ProgressBar.java @@ -65,19 +65,20 @@ public class ProgressBar extends JPanel { bar.setValue(pg.getProgress()); bar.setString(pg.getName()); - for (Progress pg : getChildrenAsOrderedList(pg)) { - JProgressBar bar = bars.get(pg); - if (bar == null) { - bar = new JProgressBar(); - bar.setStringPainted(true); + for (Progress pgChild : getChildrenAsOrderedList(pg)) { + JProgressBar barChild = bars + .get(pgChild); + if (barChild == null) { + barChild = new JProgressBar(); + barChild.setStringPainted(true); } - newBars.put(pg, bar); + newBars.put(pgChild, barChild); - bar.setMinimum(pg.getMin()); - bar.setMaximum(pg.getMax()); - bar.setValue(pg.getProgress()); - bar.setString(pg.getName()); + barChild.setMinimum(pgChild.getMin()); + barChild.setMaximum(pgChild.getMax()); + barChild.setValue(pgChild.getProgress()); + barChild.setString(pgChild.getName()); } if (ProgressBar.this.pg == null) {