mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Removed progress bar to show download progress of advertised contributions
This commit is contained in:
@@ -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("<", "<");
|
||||
stringIn = stringIn.replaceAll(">", ">");
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user