remove unused expand listener

This commit is contained in:
Ben Fry
2022-01-17 13:37:57 -05:00
parent fc18014fed
commit 915feb7c45
2 changed files with 38 additions and 31 deletions
+24 -24
View File
@@ -22,7 +22,6 @@
package processing.app.contrib;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
@@ -112,16 +111,16 @@ class DetailPanel extends JPanel {
setOpaque(true);
setSelected(false);
setExpandListener(this, new MouseAdapter() {
public void mousePressed(MouseEvent e) {
if (contrib.isCompatible(Base.getRevision())) {
listPanel.setSelectedPanel(DetailPanel.this);
} else {
setErrorMessage(contrib.getName() +
" cannot be used with this version of Processing");
}
}
});
// setExpandListener(this, new MouseAdapter() {
// public void mousePressed(MouseEvent e) {
// if (contrib.isCompatible(Base.getRevision())) {
// listPanel.setSelectedPanel(DetailPanel.this);
// } else {
// setErrorMessage(contrib.getName() +
// " cannot be used with this version of Processing");
// }
// }
// });
}
@@ -226,6 +225,7 @@ class DetailPanel extends JPanel {
installProgressBar.setMinimumSize(dim);
installProgressBar.setOpaque(false);
installProgressBar.setAlignmentX(CENTER_ALIGNMENT);
installProgressBar.setFont(ManagerFrame.NORMAL_PLAIN);
}
// installRemoveButton = new JButton(" ");
@@ -364,19 +364,19 @@ class DetailPanel extends JPanel {
}
private void setExpandListener(Component component,
MouseListener expandListener) {
// If it's a JButton, adding the listener will make this stick on OS X
// https://github.com/processing/processing/issues/3172
if (!(component instanceof JButton)) {
component.addMouseListener(expandListener);
if (component instanceof Container) {
for (Component child : ((Container) component).getComponents()) {
setExpandListener(child, expandListener);
}
}
}
}
// private void setExpandListener(Component component,
// MouseListener expandListener) {
// // If it's a JButton, adding the listener will make this stick on OS X
// // https://github.com/processing/processing/issues/3172
// if (!(component instanceof JButton)) {
// component.addMouseListener(expandListener);
// if (component instanceof Container) {
// for (Component child : ((Container) component).getComponents()) {
// setExpandListener(child, expandListener);
// }
// }
// }
// }
private void blurContributionPanel(Component component) {
+14 -7
View File
@@ -16,17 +16,24 @@ X bump JNA from 5.8.0 to 5.10.0
X remove "Illegal reflective access" warning on Linux
X https://github.com/processing/processing4/issues/207
manager
X contrib list entry in the table sometimes contains markdown
X at least hide the syntax parts (and show the text)
_ description panel in contribs contains markdown
_ cursor even changes to link, but the links don't have colors,
_ and no links open when clicked
contribs
X select entire line when doing Edit > Copy on an empty selection
X https://github.com/processing/processing4/pull/100
manager
X contrib list entry in the table sometimes contains markdown
X at least hide the syntax parts (and show the text)
X description panel in contribs contains markdown
X cursor even changes to link, but the links don't have colors,
X and no links open when clicked
X now changing color for link and actually opening the links
X set the font on the contrib install progress bar
_ DetailPanel setContribution() being called 4x for each contrib on startup
_ optimize ContributionTab addListener() call in constructor
_ DetailPanel seems totally vestigial?
_ StatusPanel seems to be recreated entirely
_ updates count is off... maybe when compatible != available count?
known issues
_ Resolve scaling issues with Windows