|
12 | 12 | import static com.mirth.connect.client.core.BrandingConstants.CENTRAL_USER_REGISTRATION; |
13 | 13 | import static com.mirth.connect.client.core.BrandingConstants.MANDATORY_USER_REGISTRATION; |
14 | 14 |
|
15 | | -import java.awt.Desktop; |
16 | 15 | import java.awt.Dimension; |
17 | 16 | import java.awt.Point; |
18 | 17 | import java.awt.event.WindowAdapter; |
19 | 18 | import java.awt.event.WindowEvent; |
20 | 19 | import java.util.prefs.Preferences; |
21 | 20 |
|
22 | 21 | import javax.swing.JDialog; |
23 | | -import javax.swing.event.HyperlinkEvent; |
24 | 22 | import javax.swing.event.HyperlinkEvent.EventType; |
25 | | -import javax.swing.event.HyperlinkListener; |
26 | 23 | import javax.swing.text.MutableAttributeSet; |
27 | 24 | import javax.swing.text.SimpleAttributeSet; |
28 | 25 | import javax.swing.text.StyleConstants; |
@@ -182,19 +179,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { |
182 | 179 |
|
183 | 180 | contentTextPane.setParagraphAttributes(set, true); |
184 | 181 | contentTextPane.setEditable(false); |
185 | | - contentTextPane.addHyperlinkListener(new HyperlinkListener() { |
186 | | - public void hyperlinkUpdate(HyperlinkEvent evt) { |
187 | | - if (evt.getEventType() == EventType.ACTIVATED && Desktop.isDesktopSupported()) { |
188 | | - try { |
189 | | - if (Desktop.isDesktopSupported()) { |
190 | | - Desktop.getDesktop().browse(evt.getURL().toURI()); |
191 | | - } else { |
192 | | - BareBonesBrowserLaunch.openURL(evt.getURL().toString()); |
193 | | - } |
194 | | - } catch (Exception e) { |
195 | | - e.printStackTrace(); |
196 | | - } |
197 | | - } |
| 182 | + contentTextPane.addHyperlinkListener(event -> { |
| 183 | + if (event.getEventType() == EventType.ACTIVATED) { |
| 184 | + BareBonesBrowserLaunch.openURL(event.getURL().toString()); |
198 | 185 | } |
199 | 186 | }); |
200 | 187 |
|
|
0 commit comments