mirror of
https://github.com/processing/processing4.git
synced 2026-02-15 03:15:40 +01:00
a little more cleaning inside processing.app.contrib
This commit is contained in:
@@ -54,12 +54,7 @@ abstract class ContribProgressBar extends ContribProgressMonitor {
|
||||
public final void finished() {
|
||||
super.finished();
|
||||
try {
|
||||
EventQueue.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finishedAction();
|
||||
}
|
||||
});
|
||||
EventQueue.invokeAndWait(this::finishedAction);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
@@ -78,12 +73,7 @@ abstract class ContribProgressBar extends ContribProgressMonitor {
|
||||
public final void cancel() {
|
||||
super.cancel();
|
||||
try {
|
||||
EventQueue.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
cancelAction();
|
||||
}
|
||||
});
|
||||
EventQueue.invokeAndWait(this::cancelAction);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
|
||||
@@ -154,9 +154,9 @@ class DetailPanel extends JPanel {
|
||||
}
|
||||
|
||||
|
||||
boolean isSelected() {
|
||||
return listPanel.getSelectedPanel() == this;
|
||||
}
|
||||
// private boolean isSelected() {
|
||||
// return listPanel.getSelectedPanel() == this;
|
||||
// }
|
||||
|
||||
|
||||
public void install() {
|
||||
|
||||
@@ -654,7 +654,9 @@ implements Scrollable, ContributionListing.ChangeListener {
|
||||
Color bgColor = null;
|
||||
Color fgColor = UIManager.getColor("List.foreground");
|
||||
|
||||
if (panel.isSelected()) {
|
||||
//if (panel.isSelected()) {
|
||||
//if (getSelectedPanel() == panel) {
|
||||
if (selectedPanel == panel) {
|
||||
bgColor = UIManager.getColor("List.selectionBackground");
|
||||
fgColor = UIManager.getColor("List.selectionForeground");
|
||||
border = UIManager.getBorder("List.focusCellHighlightBorder");
|
||||
|
||||
@@ -305,7 +305,7 @@ class StatusPanel extends JPanel {
|
||||
}
|
||||
|
||||
|
||||
public void update(DetailPanel panel) {
|
||||
void update(DetailPanel panel) {
|
||||
System.out.println("rebuilding status panel for " + panel.getContrib().name);
|
||||
progressPanel.removeAll();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user