Changed tengwar text to non-italic

This commit is contained in:
Andrew Lalis 2017-04-24 07:35:39 +02:00
parent d411486bd7
commit 5545ca7548
2 changed files with 19 additions and 12 deletions

View File

@ -49,7 +49,7 @@
<component id="952a" class="javax.swing.JTextArea" binding="tengwarTextArea" custom-create="true"> <component id="952a" class="javax.swing.JTextArea" binding="tengwarTextArea" custom-create="true">
<constraints/> <constraints/>
<properties> <properties>
<font name="Tengwar Annatar" size="16" style="2"/> <font name="Tengwar Annatar" size="16" style="0"/>
<lineWrap value="true"/> <lineWrap value="true"/>
<wrapStyleWord value="true"/> <wrapStyleWord value="true"/>
</properties> </properties>

View File

@ -83,17 +83,7 @@ public class Window {
importButton.addActionListener(new ActionListener() { importButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (Desktop.isDesktopSupported()){ onImportClicked();
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();
}
}
}
} }
}); });
} }
@ -135,4 +125,21 @@ public class Window {
tengwarTextArea.setText(Translator.translateToTengwar(inputTextArea.getText())); 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();
}
}
}
}
} }