Fix issue in ProgressBar when number of nodes/descs/arcs was less than 100.
This commit is contained in:
parent
575eb71e64
commit
bcb9faa6b2
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ public class GraphReaderProgressBar extends JDialog implements GraphReaderObserv
|
||||||
private final JProgressBar[] progressBars = new JProgressBar[3];
|
private final JProgressBar[] progressBars = new JProgressBar[3];
|
||||||
|
|
||||||
// Current element read, and modulo.
|
// Current element read, and modulo.
|
||||||
private int[] counters = new int[] { 0, 0, 0 };
|
private int[] counters = new int[]{ 0, 0, 0 };
|
||||||
private int[] modulos = new int[3];
|
private int[] modulos = new int[3];
|
||||||
|
|
||||||
public GraphReaderProgressBar(JFrame owner) {
|
public GraphReaderProgressBar(JFrame owner) {
|
||||||
|
@ -85,7 +85,7 @@ public class GraphReaderProgressBar extends JDialog implements GraphReaderObserv
|
||||||
|
|
||||||
protected void initProgressBar(int index, int max) {
|
protected void initProgressBar(int index, int max) {
|
||||||
progressBars[index].setMaximum(max);
|
progressBars[index].setMaximum(max);
|
||||||
modulos[index] = max / 100;
|
modulos[index] = Math.max(max / 100, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void incCounter(int index) {
|
protected void incCounter(int index) {
|
||||||
|
|
Loading…
Reference in a new issue