MCPcopy Index your code
hub / github.com/processing/processing / StatusPanel

Class StatusPanel

app/src/processing/app/contrib/StatusPanel.java:47–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46
47class StatusPanel extends JPanel {
48 static final int BUTTON_WIDTH = Toolkit.zoom(150);
49
50 static Icon foundationIcon;
51 static Icon installIcon;
52 static Icon updateIcon;
53 static Icon removeIcon;
54 static Font buttonFont;
55
56 JTextPane label;
57 JButton installButton;
58 JPanel progressPanel;
59 JLabel updateLabel;
60 JButton updateButton;
61 JButton removeButton;
62 GroupLayout layout;
63 JLabel iconLabel;
64 ContributionListing contributionListing = ContributionListing.getInstance();
65 ContributionTab contributionTab;
66
67 private String bodyRule;
68
69
70 /** Needed by ContributionListPanel */
71 public StatusPanel() { }
72
73
74 public StatusPanel(final ContributionTab contributionTab, int width) {
75 this.contributionTab = contributionTab;
76
77 if (foundationIcon == null) {
78 foundationIcon = Toolkit.getLibIconX("icons/foundation", 32);
79 installIcon = Toolkit.getLibIconX("manager/install");
80 updateIcon = Toolkit.getLibIconX("manager/update");
81 removeIcon = Toolkit.getLibIconX("manager/remove");
82 buttonFont = ManagerFrame.NORMAL_PLAIN;
83 }
84
85 setBackground(new Color(0xebebeb));
86
87 iconLabel = new JLabel();
88 iconLabel.setHorizontalAlignment(SwingConstants.CENTER);
89
90 label = new JTextPane();
91 label.setEditable(false);
92 label.setOpaque(false);
93 label.setContentType("text/html");
94 bodyRule = "a, body { font-family: " + buttonFont.getFamily() + "; " +
95 "font-size: " + buttonFont.getSize() + "pt; color: black; text-decoration: none;}";
96 label.addHyperlinkListener(new HyperlinkListener() {
97
98 @Override
99 public void hyperlinkUpdate(HyperlinkEvent e) {
100 if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
101 if (e.getURL() != null) {
102 Platform.openURL(e.getURL().toString());
103 }
104 }

Callers

nothing calls this directly

Calls 2

zoomMethod · 0.95
getInstanceMethod · 0.95

Tested by

no test coverage detected