From 5545ca754827590a52d37658fa4e9a7829e6dd83 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Mon, 24 Apr 2017 07:35:39 +0200 Subject: [PATCH] Changed tengwar text to non-italic --- src/net/agspace/Window.form | 2 +- src/net/agspace/Window.java | 29 ++++++++++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/net/agspace/Window.form b/src/net/agspace/Window.form index 297c0bd..92e4f85 100644 --- a/src/net/agspace/Window.form +++ b/src/net/agspace/Window.form @@ -49,7 +49,7 @@ - + diff --git a/src/net/agspace/Window.java b/src/net/agspace/Window.java index 192aa1d..6997980 100644 --- a/src/net/agspace/Window.java +++ b/src/net/agspace/Window.java @@ -83,17 +83,7 @@ public class Window { importButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - if (Desktop.isDesktopSupported()){ - if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)){ - try { - Desktop.getDesktop().browse(new URI("https://www.youtube.com/watch?v=lsJLLEwUYZM")); - } catch (IOException e1) { - e1.printStackTrace(); - } catch (URISyntaxException e1) { - e1.printStackTrace(); - } - } - } + onImportClicked(); } }); } @@ -135,4 +125,21 @@ public class Window { tengwarTextArea.setText(Translator.translateToTengwar(inputTextArea.getText())); } + /** + * What to do if the user clicks the 'import' button. + */ + private void onImportClicked(){ + if (Desktop.isDesktopSupported()){ + if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)){ + try { + Desktop.getDesktop().browse(new URI("https://www.youtube.com/watch?v=lsJLLEwUYZM")); + } catch (IOException e1) { + e1.printStackTrace(); + } catch (URISyntaxException e1) { + e1.printStackTrace(); + } + } + } + } + }