From 9ac75e2ad5a973522b134d734361c2306030d214 Mon Sep 17 00:00:00 2001 From: pesckal Date: Thu, 30 Jun 2011 04:50:40 +0000 Subject: [PATCH] Progress bar goes to indeterminate mode while library panels are being rendered --- app/src/processing/app/Base.java | 2 +- app/src/processing/app/LibraryListPanel.java | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 3610142b1..54c2055f0 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -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 platformNames = new HashMap(); diff --git a/app/src/processing/app/LibraryListPanel.java b/app/src/processing/app/LibraryListPanel.java index 61e27bb1a..61b4295bd 100644 --- a/app/src/processing/app/LibraryListPanel.java +++ b/app/src/processing/app/LibraryListPanel.java @@ -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 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(); } } }