mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
this is not a panel, remove from name
This commit is contained in:
@@ -337,15 +337,15 @@ public class ContributionTab extends JPanel {
|
||||
}
|
||||
|
||||
|
||||
public void updateStatusDetail(StatusPanelDetail detail) {
|
||||
public void updateStatusDetail(StatusDetail detail) {
|
||||
statusPanel.updateDetail(detail);
|
||||
}
|
||||
|
||||
|
||||
protected void updateAll() {
|
||||
Collection<StatusPanelDetail> collection =
|
||||
Collection<StatusDetail> collection =
|
||||
listPanel.detailForContrib.values();
|
||||
for (StatusPanelDetail detail : collection) {
|
||||
for (StatusDetail detail : collection) {
|
||||
detail.update();
|
||||
}
|
||||
listPanel.model.fireTableDataChanged();
|
||||
|
||||
@@ -50,12 +50,12 @@ public class ListPanel extends JPanel implements Scrollable {
|
||||
// new TreeMap<>(ContributionListing.COMPARATOR);
|
||||
// TreeMap<Contribution, StatusPanelDetail> detailForContrib =
|
||||
// new TreeMap<>(Comparator.comparing(o -> o.getName().toLowerCase()));
|
||||
Map<Contribution, StatusPanelDetail> detailForContrib =
|
||||
Map<Contribution, StatusDetail> detailForContrib =
|
||||
new ConcurrentHashMap<>();
|
||||
|
||||
private final Contribution.Filter filter;
|
||||
|
||||
private StatusPanelDetail selectedDetail;
|
||||
private StatusDetail selectedDetail;
|
||||
protected ContributionRowFilter rowFilter;
|
||||
protected JTable table;
|
||||
protected TableRowSorter<ContributionTableModel> sorter;
|
||||
@@ -407,8 +407,7 @@ public class ListPanel extends JPanel implements Scrollable {
|
||||
|
||||
private void configureStatusColumnLabel(JLabel label, Contribution contribution) {
|
||||
Icon icon = null;
|
||||
// label.setFont(ManagerFrame.NORMAL_PLAIN);
|
||||
StatusPanelDetail detail = detailForContrib.get(contribution);
|
||||
StatusDetail detail = detailForContrib.get(contribution);
|
||||
|
||||
if (detail != null && (detail.updateInProgress || detail.installInProgress)) {
|
||||
// Display "loading" icon if download/install in progress
|
||||
@@ -663,8 +662,8 @@ public class ListPanel extends JPanel implements Scrollable {
|
||||
// new Exception().printStackTrace(System.out);
|
||||
// long t1 = System.currentTimeMillis();
|
||||
//StatusPanelDetail newPanel = new StatusPanelDetail(this);
|
||||
StatusPanelDetail newPanel =
|
||||
new StatusPanelDetail(contributionTab.base, contributionTab.statusPanel);
|
||||
StatusDetail newPanel =
|
||||
new StatusDetail(contributionTab.base, contributionTab.statusPanel);
|
||||
detailForContrib.put(contribution, newPanel);
|
||||
newPanel.setContrib(contribution);
|
||||
// add(newPanel);
|
||||
@@ -684,7 +683,7 @@ public class ListPanel extends JPanel implements Scrollable {
|
||||
// System.out.println(contributionTab.contribType + " tab: " +
|
||||
// "removed " + contribution.name);
|
||||
// if (true || filter.matches(contribution)) {
|
||||
StatusPanelDetail panel = detailForContrib.get(contribution);
|
||||
StatusDetail panel = detailForContrib.get(contribution);
|
||||
if (panel != null) {
|
||||
detailForContrib.remove(contribution);
|
||||
}
|
||||
@@ -702,7 +701,7 @@ public class ListPanel extends JPanel implements Scrollable {
|
||||
// System.out.println(contributionTab.contribType + " tab: " +
|
||||
// "changed " + oldContrib + " -> " + newContrib);
|
||||
// new Exception().printStackTrace(System.out);
|
||||
StatusPanelDetail panel = detailForContrib.get(oldContrib);
|
||||
StatusDetail panel = detailForContrib.get(oldContrib);
|
||||
// if (panel == null) {
|
||||
//// System.out.println("panel null for " + newContrib);
|
||||
// contributionAdded(newContrib);
|
||||
@@ -736,7 +735,7 @@ public class ListPanel extends JPanel implements Scrollable {
|
||||
|
||||
|
||||
// Thread: EDT
|
||||
private void setSelectedDetail(StatusPanelDetail contribDetail) {
|
||||
private void setSelectedDetail(StatusDetail contribDetail) {
|
||||
contributionTab.updateStatusDetail(contribDetail);
|
||||
|
||||
if (selectedDetail != contribDetail) {
|
||||
@@ -746,7 +745,7 @@ public class ListPanel extends JPanel implements Scrollable {
|
||||
}
|
||||
|
||||
|
||||
protected StatusPanelDetail getSelectedDetail() {
|
||||
protected StatusDetail getSelectedDetail() {
|
||||
return selectedDetail;
|
||||
}
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ public abstract class LocalContribution extends Contribution {
|
||||
//StringList sketchPathList = new StringList();
|
||||
for (Editor editor : editors) {
|
||||
//sketchPathList.append(editor.getSketch().getMainPath());
|
||||
StatusPanelDetail.storeSketchPath(editor.getSketch().getMainPath());
|
||||
StatusDetail.storeSketchPath(editor.getSketch().getMainPath());
|
||||
base.handleClose(editor, true);
|
||||
}
|
||||
editors.clear();
|
||||
|
||||
@@ -36,7 +36,7 @@ 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.
|
||||
*/
|
||||
class StatusPanelDetail {
|
||||
class StatusDetail {
|
||||
private final Base base;
|
||||
private final StatusPanel statusPanel;
|
||||
|
||||
@@ -48,7 +48,7 @@ class StatusPanelDetail {
|
||||
boolean removeInProgress;
|
||||
|
||||
|
||||
StatusPanelDetail(Base base, StatusPanel statusPanel) {
|
||||
StatusDetail(Base base, StatusPanel statusPanel) {
|
||||
this.base = base;
|
||||
this.statusPanel = statusPanel;
|
||||
|
||||
@@ -108,7 +108,7 @@ class StatusPanel extends JPanel {
|
||||
installButton.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
installButton.addActionListener(e -> {
|
||||
installButton.setEnabled(false);
|
||||
StatusPanelDetail currentDetail =
|
||||
StatusDetail currentDetail =
|
||||
contributionTab.listPanel.getSelectedDetail();
|
||||
currentDetail.install();
|
||||
updateDetail(currentDetail);
|
||||
@@ -146,7 +146,7 @@ class StatusPanel extends JPanel {
|
||||
updateButton.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
updateButton.addActionListener(e -> {
|
||||
updateButton.setEnabled(false);
|
||||
StatusPanelDetail currentDetail =
|
||||
StatusDetail currentDetail =
|
||||
contributionTab.listPanel.getSelectedDetail();
|
||||
currentDetail.update();
|
||||
updateDetail(currentDetail);
|
||||
@@ -158,7 +158,7 @@ class StatusPanel extends JPanel {
|
||||
removeButton.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
removeButton.addActionListener(e -> {
|
||||
removeButton.setEnabled(false);
|
||||
StatusPanelDetail currentPanel =
|
||||
StatusDetail currentPanel =
|
||||
contributionTab.listPanel.getSelectedDetail();
|
||||
currentPanel.remove();
|
||||
updateDetail(currentPanel);
|
||||
@@ -249,7 +249,7 @@ class StatusPanel extends JPanel {
|
||||
updateLabel.setForeground(Theme.getColor("manager.panel.text.color"));
|
||||
|
||||
// I'm not circuitous, *you're* circuitous.
|
||||
StatusPanelDetail detail = contributionTab.listPanel.getSelectedDetail();
|
||||
StatusDetail detail = contributionTab.listPanel.getSelectedDetail();
|
||||
if (detail != null) {
|
||||
updateDetail(detail);
|
||||
}
|
||||
@@ -260,7 +260,7 @@ class StatusPanel extends JPanel {
|
||||
updateButtonTheme(updateButton, "update");
|
||||
updateButtonTheme(removeButton, "remove");
|
||||
|
||||
StatusPanelDetail currentDetail =
|
||||
StatusDetail currentDetail =
|
||||
contributionTab.listPanel.getSelectedDetail();
|
||||
if (currentDetail != null) {
|
||||
currentDetail.updateTheme();
|
||||
@@ -404,7 +404,7 @@ class StatusPanel extends JPanel {
|
||||
}
|
||||
|
||||
|
||||
void updateDetail(StatusPanelDetail detail) {
|
||||
void updateDetail(StatusDetail detail) {
|
||||
// System.out.println("rebuilding status detail for " + detail.getContrib().name);
|
||||
// new Exception("rebuilding status detail for " + detail.getContrib().name).printStackTrace(System.out);
|
||||
Contribution contrib = detail.getContrib();
|
||||
|
||||
@@ -83,7 +83,7 @@ public class UpdateContributionTab extends ContributionTab {
|
||||
|
||||
|
||||
@Override
|
||||
public void updateStatusDetail(StatusPanelDetail detail) {
|
||||
public void updateStatusDetail(StatusDetail detail) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class UpdateListPanel extends ListPanel {
|
||||
@Override
|
||||
public void contributionChanged(final Contribution oldContrib,
|
||||
final Contribution newContrib) {
|
||||
StatusPanelDetail detail = detailForContrib.get(oldContrib);
|
||||
StatusDetail detail = detailForContrib.get(oldContrib);
|
||||
if (detail == null) {
|
||||
contributionAdded(newContrib);
|
||||
} else if (newContrib.isInstalled()) {
|
||||
|
||||
Reference in New Issue
Block a user