}
private DCProgressBar getProgressBar(Table table, int expectedRows) {
synchronized (_progressBars) {
DCProgressBar progressBar = _progressBars.get(table);
if (progressBar == null) {
if (expectedRows == -1) {
expectedRows = Integer.MAX_VALUE;
}
progressBar = new DCProgressBar(0, expectedRows);
_progressBars.put(table, progressBar);
// remove loading indicators
_loadingIcon.setVisible(false);
_loadingLabel.setVisible(false);
} else {
if (expectedRows != -1) {
progressBar.setMaximum(expectedRows);
}
}
return progressBar;
}
}