mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Progress bar goes to indeterminate mode while library panels are being rendered
This commit is contained in:
@@ -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>();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user