()
| 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 | }); |
| 113 | |
| 114 | buildProgressBar(); |
| 115 | |
| 116 | updateLabel = new JLabel(" "); |
| 117 | // updateLabel.setFont(buttonFont); |
| 118 | updateLabel.setHorizontalAlignment(SwingConstants.CENTER); |
| 119 | |
| 120 | //updateButton = Toolkit.createIconButton("Update", updateIcon); |
| 121 | updateButton = new JButton("Update"); |
| 122 | // updateButton.setFont(buttonFont); |
| 123 | updateButton.setHorizontalAlignment(SwingConstants.LEFT); |
| 124 | updateButton.addActionListener(e -> { |
| 125 | updateButton.setEnabled(false); |
| 126 | StatusDetail currentDetail = |
| 127 | contributionTab.listPanel.getSelectedDetail(); |
| 128 | currentDetail.updateContrib(contributionTab.listPanel); |
| 129 | applyDetail(currentDetail); |
| 130 | }); |
| 131 | |
| 132 | //removeButton = Toolkit.createIconButton("Remove", removeIcon); |
| 133 | removeButton = new JButton("Remove"); |
| 134 | // removeButton.setFont(buttonFont); |
| 135 | removeButton.setHorizontalAlignment(SwingConstants.LEFT); |
| 136 | removeButton.addActionListener(e -> { |
| 137 | removeButton.setEnabled(false); |
| 138 | StatusDetail currentPanel = |
| 139 | contributionTab.listPanel.getSelectedDetail(); |
| 140 | currentPanel.removeContrib(); |
| 141 | applyDetail(currentPanel); |
| 142 | }); |
| 143 |
no test coverage detected