Progress bar goes to indeterminate mode while library panels are being rendered

This commit is contained in:
pesckal
2011-06-30 04:50:40 +00:00
parent a4d847d6f5
commit 9ac75e2ad5
2 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ public class Base {
/** True if heavy debugging error/log messages are enabled */
static public boolean DEBUG = false;
// static public boolean DEBUG = true;
static public boolean ENABLE_LIBRARY_MANAGER = true;
static public boolean ENABLE_LIBRARY_MANAGER = false;
static HashMap<Integer, String> platformNames =
new HashMap<Integer, String>();
+12 -3
View File
@@ -117,11 +117,21 @@ public class LibraryListPanel extends JPanel implements Scrollable {
public void setLibraryList(LibraryListing libraryListing) {
libraries = libraryListing;
if (setupProgressBar != null) {
setupProgressBar.setString("");
setupProgressBar.setIndeterminate(true);
}
populateLibraryPanels();
synchronized (libPanelsByInfo) {
for (Entry<LibraryInfo, LibraryPanel> entry : libPanelsByInfo.entrySet()) {
entry.getValue().setVisible(true);
}
}
updateColors();
if (setupProgressBar != null) {
remove(setupProgressBar);
setupProgressBar = null;
}
populateLibraryPanels();
}
private void populateLibraryPanels() {
@@ -136,12 +146,11 @@ public class LibraryListPanel extends JPanel implements Scrollable {
c.gridy = row++;
LibraryPanel libPanel = new LibraryPanel(libInfo);
libPanel.setVisible(false);
libPanelsByInfo.put(libPanel.libInfo, libPanel);
add(libPanel, c);
}
updateColors();
}
}
}