MCPcopy Create free account
hub / github.com/benfry/processing4 / StatusPanel

Class StatusPanel

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

The panel that explains a particular Contribution in the Manager. One for each tab (Libraries, Modes, etc) in the Manager.

Source from the content-addressed store, hash-verified

53 * One for each tab (Libraries, Modes, etc) in the Manager.
54 */
55class StatusPanel extends JPanel {
56 static final int LABEL_WIDTH = Toolkit.zoom(480);
57 static final int BUTTON_WIDTH = Toolkit.zoom(150);
58
59 Icon foundationIcon;
60 /*
61 static Icon foundationIcon;
62 static Icon installIcon;
63 static Icon updateIcon;
64 static Icon removeIcon;
65 */
66
67 String detailStyle;
68
69 JTextPane label;
70 JButton installButton;
71 JProgressBar progressBar;
72 JLabel updateLabel;
73 JButton updateButton;
74 JButton removeButton;
75 GroupLayout layout;
76 JLabel iconLabel; // Foundation Icon to the left of the detail
77 ContributionTab contributionTab;
78
79
80 public StatusPanel(final ContributionTab contributionTab) {
81 this.contributionTab = contributionTab;
82 buildLayout();
83 }
84
85
86 protected void buildLayout() {
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 label.addHyperlinkListener(e -> {
95 if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
96 if (e.getURL() != null) {
97 Platform.openURL(e.getURL().toString());
98 }
99 }
100 });
101 //installButton = Toolkit.createIconButton("Install", installIcon);
102 installButton = new JButton("Install");
103 //installButton.setDisabledIcon(installIcon);
104// installButton.setFont(buttonFont);
105 installButton.setHorizontalAlignment(SwingConstants.LEFT);
106 installButton.addActionListener(e -> {
107 installButton.setEnabled(false);
108 StatusDetail currentDetail =
109 contributionTab.listPanel.getSelectedDetail();
110 currentDetail.installContrib(contributionTab.listPanel);
111 applyDetail(currentDetail);
112 });

Callers

nothing calls this directly

Calls 3

zoomMethod · 0.95
textMethod · 0.95
formatMethod · 0.65

Tested by

no test coverage detected