mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
more cleaning; me head hurts
This commit is contained in:
@@ -343,9 +343,7 @@ public class ContributionTab extends JPanel {
|
||||
|
||||
|
||||
protected void updateAll() {
|
||||
Collection<StatusDetail> collection =
|
||||
listPanel.detailForContrib.values();
|
||||
for (StatusDetail detail : collection) {
|
||||
for (StatusDetail detail : listPanel.detailForContrib.values()) {
|
||||
detail.update();
|
||||
}
|
||||
listPanel.model.fireTableDataChanged();
|
||||
|
||||
@@ -701,14 +701,14 @@ public class ListPanel extends JPanel implements Scrollable {
|
||||
// System.out.println(contributionTab.contribType + " tab: " +
|
||||
// "changed " + oldContrib + " -> " + newContrib);
|
||||
// new Exception().printStackTrace(System.out);
|
||||
StatusDetail panel = detailForContrib.get(oldContrib);
|
||||
StatusDetail detail = detailForContrib.get(oldContrib);
|
||||
// if (panel == null) {
|
||||
//// System.out.println("panel null for " + newContrib);
|
||||
// contributionAdded(newContrib);
|
||||
// } else {
|
||||
detailForContrib.remove(oldContrib);
|
||||
panel.setContrib(newContrib);
|
||||
detailForContrib.put(newContrib, panel);
|
||||
detail.setContrib(newContrib);
|
||||
detailForContrib.put(newContrib, detail);
|
||||
model.fireTableDataChanged();
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -33,8 +33,9 @@ import processing.app.laf.PdeProgressBarUI;
|
||||
|
||||
|
||||
/**
|
||||
* Vestigial class that was formerly a detail panel, but since 3.x
|
||||
* has only been used to track install/remove state information.
|
||||
* An unfortunate mix of state information about the installation
|
||||
* status of a Contribution, *as well as* the methods to handle
|
||||
* installation and update of that Contribution.
|
||||
*/
|
||||
class StatusDetail {
|
||||
private final Base base;
|
||||
|
||||
@@ -33,15 +33,12 @@ public class UpdateStatusPanel extends StatusPanel {
|
||||
public UpdateStatusPanel(UpdateContributionTab tab) {
|
||||
super(tab);
|
||||
|
||||
//updateButton = Toolkit.createIconButton("Update All", updateIcon);
|
||||
updateButton = new JButton("Update All");
|
||||
// updateButton.setFont(ManagerFrame.NORMAL_PLAIN);
|
||||
updateButton.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
updateButton.setVisible(true);
|
||||
updateButton.setEnabled(false);
|
||||
|
||||
updateButton.addActionListener(e -> contributionTab.updateAll());
|
||||
setBackground(new Color(0xebebeb));
|
||||
layout = new GroupLayout(this);
|
||||
setLayout(layout);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user