Removed progress bar to show download progress of advertised contributions

This commit is contained in:
pesckal
2011-08-11 17:23:01 +00:00
parent 9ba1acb9a6
commit 25c017fcb3
2 changed files with 8 additions and 25 deletions
@@ -57,8 +57,6 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
ContributionManager contribManager;
JProgressBar setupProgressBar;
TreeMap<Contribution, ContributionPanel> panelByContribution;
static private HyperlinkListener nullHyperlinkListener = new HyperlinkListener() {
@@ -97,11 +95,6 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
c.weighty = 1;
c.anchor = GridBagConstraints.CENTER;
setupProgressBar = new JProgressBar();
setupProgressBar.setString("");
setupProgressBar.setStringPainted(true);
add(setupProgressBar, c);
}
private void updatePanelOrdering() {
@@ -122,8 +115,6 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
SwingUtilities.invokeLater(new Runnable() {
public void run() {
setupProgressBar.setVisible(false);
if (panelByContribution.containsKey(contribution)) {
return;
}
@@ -343,10 +334,6 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
return true;
}
public JProgressBar getSetupProgressBar() {
return setupProgressBar;
}
static public String sanitizeHtmlTags(String stringIn) {
stringIn = stringIn.replaceAll("<", "&lt;");
stringIn = stringIn.replaceAll(">", "&gt;");
@@ -86,8 +86,7 @@ public class ContributionManager {
/**
* Initializes the contribution listing and fetches the advertised
* contributions in a separate thread. This does not initialize any AWT
* components except for a single JProgressBar which is needed in case
* showFrame is called in the middle of downloading.
* components.
*/
public ContributionManager() {
contribListing = new ContributionListing();
@@ -100,17 +99,14 @@ public class ContributionManager {
this.editor = editor;
if (!contribListing.hasDownloadedLatestList()) {
JProgressBar progressBar = contributionListPanel.getSetupProgressBar();
contribListing.getAdvertisedContributions(new JProgressMonitor(progressBar) {
contribListing.getAdvertisedContributions(new AbstractProgressMonitor() {
public void startTask(String name, int maxValue) {
}
@Override
public void finishedAction() {
synchronized (contribListing) {
updateContributionListing();
updateCategoryChooser();
progressBar.setVisible(false);
}
public void finished() {
super.finished();
updateContributionListing();
updateCategoryChooser();
}
});
}