From 95cb753508c553ac2aebf2add7b32819dc8bbed2 Mon Sep 17 00:00:00 2001
From: mmk2410
Date: Thu, 20 Aug 2015 15:50:40 +0200
Subject: [PATCH 1/9] Added popup menus; Version 2.0.0
---
.idea/workspace.xml | 335 ++++++++++++------
.../marcelkapfer/c/morseconverter/Main.java | 211 ++++++++++-
.../c/morseconverter/text.properties | 5 +-
.../c/morseconverter/text_de.properties | 5 +-
4 files changed, 443 insertions(+), 113 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 00cab75..ead862e 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -9,13 +9,9 @@
-
-
-
-
-
+
+
-
@@ -45,29 +41,46 @@
-
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
@@ -81,7 +94,17 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -136,16 +159,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -183,12 +196,12 @@
-
-
+
+
@@ -207,8 +220,9 @@
-
-
+
+
+
@@ -233,7 +247,7 @@
-
+
@@ -283,30 +297,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -328,18 +320,36 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
@@ -352,6 +362,8 @@
+
+
@@ -579,36 +591,42 @@
1433840210547
-
+
+ 1438264240701
+
+
+ 1438264240701
+
+
-
-
+
+
+
+
-
+
+
+
-
-
-
-
@@ -630,7 +648,10 @@
-
+
+
+
+
@@ -708,17 +729,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -737,7 +747,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -799,7 +829,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -864,7 +914,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -926,7 +996,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -984,23 +1074,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1058,6 +1134,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1065,7 +1159,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1074,21 +1179,41 @@
-
-
-
+
+
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/de/marcelkapfer/c/morseconverter/Main.java b/src/de/marcelkapfer/c/morseconverter/Main.java
index 03fd24f..282a87e 100755
--- a/src/de/marcelkapfer/c/morseconverter/Main.java
+++ b/src/de/marcelkapfer/c/morseconverter/Main.java
@@ -36,17 +36,18 @@ import javax.swing.text.Element;
import javax.swing.text.html.HTMLDocument;
import javax.swing.text.html.HTMLEditorKit;
import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.StringSelection;
+import java.awt.datatransfer.Transferable;
+import java.awt.event.*;
import java.io.IOException;
import java.util.ResourceBundle;
public class Main extends JFrame {
// Version numbers for update check
- public static final int currentVersion = 193;
+ public static final int currentVersion = 200;
public static int latestVersion = currentVersion;
public static ResourceBundle resourceBundle = ResourceBundle.getBundle("de.marcelkapfer.c.morseconverter.text");
@@ -102,6 +103,153 @@ public class Main extends JFrame {
}
});
+
+ // Mouse listener for selecting text on left click in output text area
+ outputAreaWrittenMorse.addMouseListener(new MouseListener() {
+ @Override
+ public void mouseClicked(MouseEvent e) {
+
+ }
+
+ @Override
+ public void mousePressed(MouseEvent e) {
+
+ }
+
+ @Override
+ public void mouseReleased(MouseEvent e) {
+ if (e.getButton() == MouseEvent.BUTTON1) {
+ outputAreaWrittenMorse.requestFocus();
+ outputAreaWrittenMorse.selectAll();
+ }
+ }
+
+ @Override
+ public void mouseEntered(MouseEvent e) {
+
+ }
+
+ @Override
+ public void mouseExited(MouseEvent e) {
+
+ }
+ });
+
+ outputAreaNormalMorse.addMouseListener(new MouseListener() {
+ @Override
+ public void mouseClicked(MouseEvent e) {
+
+ }
+
+ @Override
+ public void mousePressed(MouseEvent e) {
+
+ }
+
+ @Override
+ public void mouseReleased(MouseEvent e) {
+ if (e.getButton() == MouseEvent.BUTTON1) {
+ outputAreaNormalMorse.requestFocus();
+ outputAreaNormalMorse.selectAll();
+ }
+ }
+
+ @Override
+ public void mouseEntered(MouseEvent e) {
+
+ }
+
+ @Override
+ public void mouseExited(MouseEvent e) {
+
+ }
+ });
+
+ // Popup Menus
+
+ // Popup Menu for writtenMorse input text field
+
+ JPopupMenu wInputPopup = new JPopupMenu();
+ addPopup(inputAreaWrittenMorse, wInputPopup);
+
+ // Item for paste
+ JMenuItem pasteWInput = new JMenuItem(resourceBundle.getString("paste"));
+ pasteWInput.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ onPaste(inputAreaWrittenMorse);
+ instantWrittenMorseConvert();
+ }
+ });
+ wInputPopup.add(pasteWInput);
+
+ // Item for clear
+ JMenuItem clearWInput = new JMenuItem(resourceBundle.getString("clear"));
+ clearWInput.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ clear(inputAreaWrittenMorse);
+ }
+ });
+ wInputPopup.add(clearWInput);
+
+ // Popup Menu for writtenMorse output text field
+ JPopupMenu wOutputPopup = new JPopupMenu();
+ addPopup(outputAreaWrittenMorse, wOutputPopup);
+
+ // Item for copy
+ JMenuItem copyWOutput = new JMenuItem(resourceBundle.getString("copy"));
+ copyWOutput.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ onCopy(outputAreaWrittenMorse);
+ }
+ });
+ wOutputPopup.add(copyWOutput);
+
+
+ // Popups for Normal Morse
+
+ // Popup for Normal Morse input text field
+ JPopupMenu nInputMenu = new JPopupMenu();
+ addPopup(inputAreaNormalMorse, nInputMenu);
+
+ // Item for paste
+ JMenuItem nPasteInput = new JMenuItem(resourceBundle.getString("paste"));
+ nPasteInput.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ onPaste(inputAreaNormalMorse);
+ instantNormalMorseConvert();
+ }
+ });
+ nInputMenu.add(nPasteInput);
+
+ // Item for clear
+ JMenuItem nClearInput = new JMenuItem(resourceBundle.getString("clear"));
+ nClearInput.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ clear(inputAreaNormalMorse);
+ }
+ });
+ nInputMenu.add(nClearInput);
+
+ // Popup for output text field
+
+ JPopupMenu nOutputMenu = new JPopupMenu();
+ addPopup(outputAreaNormalMorse, nOutputMenu);
+
+ // Menü item for copy
+ JMenuItem nCopyOutput = new JMenuItem(resourceBundle.getString("copy"));
+ nCopyOutput.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ onCopy(outputAreaNormalMorse);
+ }
+ });
+ nOutputMenu.add(nCopyOutput);
+
}
// The holy main method
public static void main(String[] args){
@@ -114,7 +262,7 @@ public class Main extends JFrame {
// Starting the application
JFrame main = new JFrame("Main");
main.setContentPane(new Main().morseConverterPane);
- main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ main.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
// Title
main.setTitle(resourceBundle.getString("title"));
main.pack();
@@ -158,4 +306,55 @@ public class Main extends JFrame {
UpdateDialog.main(null);
}
+ private static void addPopup(Component component, final JPopupMenu popup) {
+ component.addMouseListener(new MouseAdapter() {
+ public void mousePressed(MouseEvent e) {
+ if (e.isPopupTrigger()) {
+ showMenu(e);
+ }
+ }
+
+ public void mouseReleased(MouseEvent e) {
+ if (e.isPopupTrigger()) {
+ showMenu(e);
+ }
+ }
+
+ private void showMenu(MouseEvent e) {
+ popup.show(e.getComponent(), e.getX(), e.getY());
+ }
+ });
+ }
+
+ /*
+ * Past function
+ */
+ private void onPaste(JTextArea tf) {
+ try {
+ Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
+ Transferable t = c.getContents(this);
+ if (t == null)
+ return;
+ try {
+ tf.setText((String) t.getTransferData(DataFlavor.stringFlavor));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }// try
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }// onPaste
+
+ /*
+ * Copy function
+ */
+ private void onCopy(JTextArea tf) {
+ StringSelection selection = new StringSelection(tf.getText());
+ Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+ clipboard.setContents(selection, selection);
+ }
+
+ private void clear(JTextArea jTextArea) {
+ jTextArea.setText("");
+ }
}
diff --git a/src/de/marcelkapfer/c/morseconverter/text.properties b/src/de/marcelkapfer/c/morseconverter/text.properties
index 61aa48e..60a788d 100755
--- a/src/de/marcelkapfer/c/morseconverter/text.properties
+++ b/src/de/marcelkapfer/c/morseconverter/text.properties
@@ -1,7 +1,10 @@
-about=\n\nVersion
1.9.3 beta\n
\n\nDeveloper
Marcel Michael Kapfer\n
\n\nWebsite
marcel-kapfer.de/writtenmorse\n
\n\nContact
marcelmichaelkapfer@yahoo.co.nz\n
\n\nLicense
GNU GPL v3.0\n
\n\nBug
If you found a bug, please write me a mail to marcelmichaelkapfer@yahoo.co.nz with a short description of the problem.\n
\n\nHow to
You can find a detailed guide on marcel-kapfer.de/writtenmorse/\#howto_desktop\n
\nMissing Code
If you discovered, that a code is missing, then write me a mail to marcelmichaelkapfer@yahoo.co.nz and tell me about it.\n
\n
\n
+about=\n\nVersion
2.0.0\n
\n\nDeveloper
Marcel Michael Kapfer\n
\n\nWebsite
marcel-kapfer.de/writtenmorse\n
\n\nContact
marcelmichaelkapfer@yahoo.co.nz\n
\n\nLicense
GNU GPL v3.0\n
\n\nBug
If you found a bug, please write me a mail to marcelmichaelkapfer@yahoo.co.nz with a short description of the problem.\n
\n\nHow to
You can find a detailed guide on marcel-kapfer.de/writtenmorse/\#howto_desktop\n
\nMissing Code
If you discovered, that a code is missing, then write me a mail to marcelmichaelkapfer@yahoo.co.nz and tell me about it.\n
\n\n
aboutUpdateAvailable=Update available
aboutUpdateAvailableButton=Install Update
+clear=Clear
+copy=Copy
inputText=Enter your text
+paste=Paste
tabAbout=About
tabNormalMorse=Normal Morse
title=Morse Converter
diff --git a/src/de/marcelkapfer/c/morseconverter/text_de.properties b/src/de/marcelkapfer/c/morseconverter/text_de.properties
index b6693af..cc984d8 100755
--- a/src/de/marcelkapfer/c/morseconverter/text_de.properties
+++ b/src/de/marcelkapfer/c/morseconverter/text_de.properties
@@ -1,7 +1,10 @@
-about=\n\nVersion
1.9.3 beta\n
\n\nEntwickler
Marcel Michael Kapfer\n
\n\nWebsite
marcel-kapfer.de/writtenmorse\n
\n\nKontakt
marcelmichaelkapfer@yahoo.co.nz\n
\n\nLizenz
GNU GPL v3.0\n
\n\nFehler
Wenn Du einen Fehler gefunden hast, schreibe mir bitte ein E-Mail an marcelmichaelkapfer@yahoo.co.nz\n
\n\nHow to
Du kannst eine ausführliche Anleitung auf marcel-kapfer.de/writtenmorse/\#howto_android finden.\n
\nFehlender Code
Wenn Du auf einen fehlenden Code aufmerksam geworden bist, dann schreibe eine E-Mail an marcelmichaelkapfer@yahoo.co.nz.\n
\n\n
+about=\n\nVersion
2.0.0\n
\n\nEntwickler
Marcel Michael Kapfer\n
\n\nWebsite
marcel-kapfer.de/writtenmorse\n
\n\nKontakt
marcelmichaelkapfer@yahoo.co.nz\n
\n\nLizenz
GNU GPL v3.0\n
\n\nFehler
Wenn Du einen Fehler gefunden hast, schreibe mir bitte ein E-Mail an marcelmichaelkapfer@yahoo.co.nz\n
\n\nHow to
Du kannst eine ausführliche Anleitung auf marcel-kapfer.de/writtenmorse/\#howto_android finden.\n
\nFehlender Code
Wenn Du auf einen fehlenden Code aufmerksam geworden bist, dann schreibe eine E-Mail an marcelmichaelkapfer@yahoo.co.nz.\n
\n\n
aboutUpdateAvailable=Update verfügbar
aboutUpdateAvailableButton=Update installieren
+clear=Bereinigen
+copy=Kopieren
inputText=Geben Sie einen Text ein
+paste=Einfügen
tabAbout=Über
tabNormalMorse=Normales Morse
title=Morse Umwandler
From 280f1957558374b029d88c077111eceae8324b57 Mon Sep 17 00:00:00 2001
From: "Marcel Kapfer (mmk2410)"
Date: Fri, 15 Apr 2016 17:48:31 +0200
Subject: [PATCH 2/9] README.md update
---
README.md | 37 +++++++++++++++++--------------------
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
index 74e6096..f34c935 100755
--- a/README.md
+++ b/README.md
@@ -1,43 +1,40 @@
-Morse Converter
-===============
+# Morse Converter (Desktop Client)
A writtenMorse and normal morse code converter.
-A detailed description about this program can be found on http://marcel-kapfer.de/writtenmorse.
+A detailed description about this program can be found on [marcel-kapfer.de/writtenmorse](https://marcel-kapfer.de/writtenmorse).
## Content
- [Contribute](#contribute)
- [Trello Board](#trello-board)
- [Packages](#packages)
- [Linux](#linux)
- - [ubuntu](#ubuntu)
+ - [Ubuntu](#ubuntu)
-## Contribute
-
-1. Fork it
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Commit your changes (`git commit -am 'Add some feature'`)
-4. Push to the branch (`git push origin my-new-feature`)
-5. **Create New Pull Request**
-
-Feel free to write me a mail at marcelmichaelkapfer@yahoo.co.nz or contact me on [Google+](https://plus.google.com/+MarcelMichaelKapfer) or [Twitter](https://twitter.com/MarcelKapfer).
+## Contributing
-You should also check out the issues and the Trello board.
+For contributing to this project read my contribution guidlines at [mmk2410.org/contributing](https://mmk2410.org/contributing).
-## Trello Board
+If you have any questions feel free to contact me at [marcelmichaelkapfer@yahoo.co.nz](mailto:marcelmichaelkapfer@yahoo.co.nz), [Google+](https://plus.google.com/+MarcelMichaelKapfer), [Twitter](https://twitter.com/mmk2410), [GNUsocial](https://social.mmk2410.org/mmk2410), in a room at [phab.mmk2410.org](https://phab.mmk2410.org) or join the party at [irc.mmk2410.org](irc://irc.mmk2410.org).
-[Feature & Development Board](https://trello.com/b/OUoy2iHg/morse-computer)
+If you want to contribute code to this project check if your additions match with the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) (you can download the XML style at [https://github.com/google/styleguide](https://github.com/google/styleguide)).
+
+The repository is at [phab.mmk2410.org/diffusion](https://phab.mmk2410.org/diffusion) and the bug tracker [phab.mmk2410.org/maniphest](https://phab.mmk2410.org/maniphest).
## Packages
+
### Linux
+
#### Ubuntu
I created an Ubuntu repository for the app. You can use it by running the following lines:
-``sudo apt-add-repository ppa:mmk2410/morse-converter``
+```
+sudo apt-add-repository ppa:mmk2410/morse-converter
-``sudo apt-get update``
+sudo apt-get update
-``sudo apt-get install morse-converter``
+sudo apt-get install morse-converter
+```
-[Launchpad](https://launchpad.net/~mmk2410/+archive/ubuntu/morse-converter)
+View this package repository at [Launchpad](https://launchpad.net/~mmk2410/+archive/ubuntu/morse-converter).
From 85261470cc108c62bcc4292d1557efbf1df6a79f Mon Sep 17 00:00:00 2001
From: "Marcel Kapfer (mmk2410)"
Date: Fri, 15 Apr 2016 17:49:40 +0200
Subject: [PATCH 3/9] Update to meet Google Java Coding Guidlines
---
.idea/dictionaries/mmk2410.xml | 86 ++
.idea/misc.xml | 18 +-
.idea/workspace.xml | 796 ++++++++----------
.../marcelkapfer/c/morseconverter/Main.form | 4 +
.../marcelkapfer/c/morseconverter/Main.java | 60 +-
.../engine/DecodeNormalMorseManager.java | 2 +-
.../engine/DecodeWrittenMorseManager.java | 2 +-
.../engine/EncodeNormalMorseManager.java | 6 +-
.../engine/EncodeWrittenMorseManager.java | 6 +-
.../NormalMorseCodeRecognization.java | 11 +-
.../WrittenMorseCodeRecognization.java | 11 +-
.../c/morseconverter/text.properties | 4 +-
.../c/morseconverter/update/Update.java | 5 +-
.../c/morseconverter/update/UpdateDialog.form | 6 +-
.../c/morseconverter/update/UpdateDialog.java | 30 +-
15 files changed, 474 insertions(+), 573 deletions(-)
create mode 100644 .idea/dictionaries/mmk2410.xml
diff --git a/.idea/dictionaries/mmk2410.xml b/.idea/dictionaries/mmk2410.xml
new file mode 100644
index 0000000..7252c68
--- /dev/null
+++ b/.idea/dictionaries/mmk2410.xml
@@ -0,0 +1,86 @@
+
+
+
+ abteilung
+ affero
+ aktivieren
+ aktuelle
+ aktuellste
+ anleitung
+ aufmerksam
+ ausführliche
+ beim
+ bereinigen
+ bist
+ bitte
+ dann
+ diese
+ eine
+ einen
+ einfügen
+ entwickler
+ erfolgreich
+ fadb
+ fehlenden
+ fehlender
+ fehler
+ finden
+ fullname
+ geben
+ gefunden
+ geworden
+ herunterladen
+ hgap
+ hsize
+ hspacer
+ installieren
+ kannst
+ kontakt
+ kopieren
+ letterspace
+ lgpl
+ licensors
+ lizenz
+ marcelkapfer
+ mehr
+ möglich
+ neues
+ nich
+ nicht
+ nochmal
+ noncommercially
+ normales
+ recognization
+ relicensing
+ schließen
+ schreibe
+ scrollpane
+ später
+ starten
+ sublicenses
+ sublicensing
+ sudo
+ suppressions
+ tabbedpane
+ trat
+ trello
+ umwandler
+ verbindung
+ verfügbar
+ verfügbarr
+ versuch
+ versuchen
+ verwendest
+ verzeichniss
+ vgap
+ vsize
+ wenn
+ willst
+ wipo
+ writtenmorse
+ änderungen
+ über
+ überprüfen
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 9100e4e..1556fe5 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -21,22 +21,6 @@
-
-
-
-
-
-
-
-
-
-
- Android
-
-
-
-
-
@@ -47,7 +31,7 @@
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index ead862e..f1b8836 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,8 +1,5 @@
-
-
-
@@ -10,11 +7,21 @@
+
+
+
+
+
+
+
+
+
-
-
+
+
+
@@ -38,39 +45,44 @@
-
+
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -78,13 +90,13 @@
-
-
-
+
+
+
-
+
@@ -92,18 +104,12 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
@@ -112,8 +118,8 @@
-
-
+
+
@@ -122,8 +128,8 @@
-
-
+
+
@@ -132,30 +138,27 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
@@ -187,22 +190,22 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -216,13 +219,26 @@
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+ Android
+
+
+
+
@@ -245,9 +261,12 @@
+
+
+
@@ -256,100 +275,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -359,7 +291,6 @@
-
@@ -379,22 +310,21 @@
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -404,18 +334,15 @@
+
-
-
-
-
-
-
-
-
+
+
+
+
@@ -538,7 +465,14 @@
-
+
+
+
+
+
+
@@ -547,86 +481,104 @@
1433089656410
+
1433089656410
1433107293071
+
1433107293071
1433194444611
+
1433194444611
1433258706216
+
1433258706216
1433259123531
+
1433259123531
1433407147891
+
1433407147891
1433839149994
+
1433839149994
1433840210547
+
1433840210547
1438264240701
+
1438264240701
-
+
+ 1440078640432
+
+
+
+ 1440078640432
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -656,24 +608,6 @@
-
- file://$PROJECT_DIR$/src/de/marcelkapfer/c/morseconverter/intelligentCodeRecognization/WrittenMorseCodeRecognization.java
- 58
-
-
-
-
- file://$PROJECT_DIR$/src/de/marcelkapfer/c/morseconverter/intelligentCodeRecognization/WrittenMorseCodeRecognization.java
- 59
-
-
-
-
- file://$PROJECT_DIR$/src/de/marcelkapfer/c/morseconverter/intelligentCodeRecognization/WrittenMorseCodeRecognization.java
- 57
-
-
-
file://$PROJECT_DIR$/src/de/marcelkapfer/c/morseconverter/engine/EncodeWrittenMorseManager.java
198
@@ -731,91 +665,80 @@
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -827,84 +750,73 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -912,77 +824,66 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -994,28 +895,17 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -1027,138 +917,49 @@
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
@@ -1167,21 +968,96 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1189,31 +1065,31 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1295,7 +1171,7 @@
- 1.8
+ 1.7
@@ -42,7 +42,7 @@
-
+
diff --git a/src/de/marcelkapfer/c/morseconverter/update/UpdateDialog.java b/src/de/marcelkapfer/c/morseconverter/update/UpdateDialog.java
index 636f3dc..f199c79 100755
--- a/src/de/marcelkapfer/c/morseconverter/update/UpdateDialog.java
+++ b/src/de/marcelkapfer/c/morseconverter/update/UpdateDialog.java
@@ -32,13 +32,13 @@ import java.util.ResourceBundle;
public class UpdateDialog extends JDialog {
private JPanel contentPane;
- public JButton buttonOK;
- public JButton buttonCancel;
- public JLabel updateDialogQuestion;
- public JLabel updateDialogNewVersion;
- private ResourceBundle resourceBundle = ResourceBundle.getBundle("de.marcelkapfer.c.morseconverter.text");
+ private JButton buttonOK;
+ private JButton buttonCancel;
+ private JLabel updateDialogQuestion;
+ private JLabel updateDialogNewVersion;
+ private final ResourceBundle resourceBundle = ResourceBundle.getBundle("de.marcelkapfer.c.morseconverter.text");
- public UpdateDialog() {
+ private UpdateDialog() {
setContentPane(contentPane);
setModal(true);
getRootPane().setDefaultButton(buttonOK);
@@ -48,17 +48,9 @@ public class UpdateDialog extends JDialog {
updateDialogNewVersion.setVisible(false);
updateDialogQuestion.setText(resourceBundle.getString("updateDialogUpToDateText"));
}
- buttonOK.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- onOK();
- }
- });
+ buttonOK.addActionListener(e -> onOK());
- buttonCancel.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- onCancel();
- }
- });
+ buttonCancel.addActionListener(e -> onCancel());
// call onCancel() when cross is clicked
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
@@ -69,11 +61,7 @@ public class UpdateDialog extends JDialog {
});
// call onCancel() on ESCAPE
- contentPane.registerKeyboardAction(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- onCancel();
- }
- }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+ contentPane.registerKeyboardAction(e -> onCancel(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
}
private void onOK() {
From 8e45e62cd01ea2555d0fab3640d1b708d8bd9662 Mon Sep 17 00:00:00 2001
From: "Marcel Kapfer (mmk2410)"
Date: Fri, 15 Apr 2016 17:52:24 +0200
Subject: [PATCH 4/9] README.md update
---
README.md | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f34c935..0823e54 100755
--- a/README.md
+++ b/README.md
@@ -10,6 +10,11 @@ A detailed description about this program can be found on [marcel-kapfer.de/writ
- [Linux](#linux)
- [Ubuntu](#ubuntu)
+## Prerequisites
+
+ - including 2.0: Java 6 or higher
+ - after 2.0: Java 8 or higher
+
## Contributing
@@ -17,7 +22,7 @@ For contributing to this project read my contribution guidlines at [mmk2410.org/
If you have any questions feel free to contact me at [marcelmichaelkapfer@yahoo.co.nz](mailto:marcelmichaelkapfer@yahoo.co.nz), [Google+](https://plus.google.com/+MarcelMichaelKapfer), [Twitter](https://twitter.com/mmk2410), [GNUsocial](https://social.mmk2410.org/mmk2410), in a room at [phab.mmk2410.org](https://phab.mmk2410.org) or join the party at [irc.mmk2410.org](irc://irc.mmk2410.org).
-If you want to contribute code to this project check if your additions match with the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) (you can download the XML style at [https://github.com/google/styleguide](https://github.com/google/styleguide)).
+If you want to contribute code to this project check if your additions match with the [Google Java Coding Guide](https://google.github.io/styleguide/javaguide.html) (you can download the XML file at [https://github.com/google/styleguide](https://github.com/google/styleguide)).
The repository is at [phab.mmk2410.org/diffusion](https://phab.mmk2410.org/diffusion) and the bug tracker [phab.mmk2410.org/maniphest](https://phab.mmk2410.org/maniphest).
From 78e5ff74f2b43c851e885e064479901ba492830f Mon Sep 17 00:00:00 2001
From: "Marcel Kapfer (mmk2410)"
Date: Fri, 15 Apr 2016 17:54:18 +0200
Subject: [PATCH 5/9] README.md update
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 0823e54..37d2271 100755
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@ A writtenMorse and normal morse code converter.
A detailed description about this program can be found on [marcel-kapfer.de/writtenmorse](https://marcel-kapfer.de/writtenmorse).
## Content
+
- [Contribute](#contribute)
- [Trello Board](#trello-board)
- [Packages](#packages)
From 9e395af263d0090e395d04726560ab4dc394542a Mon Sep 17 00:00:00 2001
From: "Marcel Kapfer (mmk2410)"
Date: Fri, 15 Apr 2016 17:55:24 +0200
Subject: [PATCH 6/9] README.md update
---
README.md | 8 --------
1 file changed, 8 deletions(-)
diff --git a/README.md b/README.md
index 37d2271..7dd9596 100755
--- a/README.md
+++ b/README.md
@@ -3,14 +3,6 @@
A writtenMorse and normal morse code converter.
A detailed description about this program can be found on [marcel-kapfer.de/writtenmorse](https://marcel-kapfer.de/writtenmorse).
-## Content
-
- - [Contribute](#contribute)
- - [Trello Board](#trello-board)
- - [Packages](#packages)
- - [Linux](#linux)
- - [Ubuntu](#ubuntu)
-
## Prerequisites
- including 2.0: Java 6 or higher
From 62338503bd75f095cb9cbcb9a7ff1c50c016467c Mon Sep 17 00:00:00 2001
From: "Marcel Kapfer (mmk2410)"
Date: Sun, 17 Apr 2016 12:52:16 +0200
Subject: [PATCH 7/9] Updated README
---
.idea/workspace.xml | 219 ++++++++++++++++----------------------------
README.md | 2 +-
2 files changed, 79 insertions(+), 142 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f1b8836..9e7b5b2 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,21 +7,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -60,8 +46,8 @@
-
-
+
+
@@ -74,16 +60,7 @@
-
-
-
-
-
-
-
-
-
-
+
@@ -106,11 +83,7 @@
-
-
-
-
-
+
@@ -251,7 +224,7 @@
-
+
@@ -264,24 +237,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
@@ -561,25 +520,52 @@
-
+
+
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
index 7dd9596..9e40053 100755
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ If you have any questions feel free to contact me at [marcelmichaelkapfer@yahoo.
If you want to contribute code to this project check if your additions match with the [Google Java Coding Guide](https://google.github.io/styleguide/javaguide.html) (you can download the XML file at [https://github.com/google/styleguide](https://github.com/google/styleguide)).
-The repository is at [phab.mmk2410.org/diffusion](https://phab.mmk2410.org/diffusion) and the bug tracker [phab.mmk2410.org/maniphest](https://phab.mmk2410.org/maniphest).
+The repository is at [gitlab.com/mmk2410/mmk2410.org](https://gitlab.com/mmk2410/mmk2410.org) and the bug tracker [phab.mmk2410.org/maniphest](https://phab.mmk2410.org/maniphest).
## Packages
From 3682719efabc36b75a3b2f6eb6e807a805fafe1c Mon Sep 17 00:00:00 2001
From: "Marcel Kapfer (mmk2410)"
Date: Mon, 21 Nov 2016 17:24:24 +0100
Subject: [PATCH 8/9] Updated readme
---
README.md | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9e40053..c2637ce 100755
--- a/README.md
+++ b/README.md
@@ -11,7 +11,12 @@ A detailed description about this program can be found on [marcel-kapfer.de/writ
## Contributing
-For contributing to this project read my contribution guidlines at [mmk2410.org/contributing](https://mmk2410.org/contributing).
+1. Fork it
+2. Create a feature branch with a meaningful name (`git checkout -b my-new-feature`)
+3. Add yourself to the CONTRIBUTORS file
+4. Commit your changes (`git commit -am 'Add some feature'`)
+5. Push to your branch (`git push origin my-new-feature`)
+6. Create a new pull request
If you have any questions feel free to contact me at [marcelmichaelkapfer@yahoo.co.nz](mailto:marcelmichaelkapfer@yahoo.co.nz), [Google+](https://plus.google.com/+MarcelMichaelKapfer), [Twitter](https://twitter.com/mmk2410), [GNUsocial](https://social.mmk2410.org/mmk2410), in a room at [phab.mmk2410.org](https://phab.mmk2410.org) or join the party at [irc.mmk2410.org](irc://irc.mmk2410.org).
From 76e17e164a80cb908eec04931d4159f1180f0dd5 Mon Sep 17 00:00:00 2001
From: Marcel Kapfer
Date: Wed, 3 Jan 2018 09:16:22 +0100
Subject: [PATCH 9/9] Updated README
---
README.md | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index c2637ce..8f5e85a 100755
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
# Morse Converter (Desktop Client)
-A writtenMorse and normal morse code converter.
-A detailed description about this program can be found on [marcel-kapfer.de/writtenmorse](https://marcel-kapfer.de/writtenmorse).
+A writtenMorse and normal Morse code converter.
+A detailed description about this program can be found on the [GitLab Wiki](https://gitlab.com/mmk2410/writtenmorse-specs/wikis/Home).
## Prerequisites
- - including 2.0: Java 6 or higher
- - after 2.0: Java 8 or higher
+ * 2.0 or later: Java 8 or higher
+ - 2.0 or earlier: Java 6 or higher
## Contributing
@@ -16,13 +16,9 @@ A detailed description about this program can be found on [marcel-kapfer.de/writ
3. Add yourself to the CONTRIBUTORS file
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to your branch (`git push origin my-new-feature`)
-6. Create a new pull request
+6. Create a new merge request
-If you have any questions feel free to contact me at [marcelmichaelkapfer@yahoo.co.nz](mailto:marcelmichaelkapfer@yahoo.co.nz), [Google+](https://plus.google.com/+MarcelMichaelKapfer), [Twitter](https://twitter.com/mmk2410), [GNUsocial](https://social.mmk2410.org/mmk2410), in a room at [phab.mmk2410.org](https://phab.mmk2410.org) or join the party at [irc.mmk2410.org](irc://irc.mmk2410.org).
-
-If you want to contribute code to this project check if your additions match with the [Google Java Coding Guide](https://google.github.io/styleguide/javaguide.html) (you can download the XML file at [https://github.com/google/styleguide](https://github.com/google/styleguide)).
-
-The repository is at [gitlab.com/mmk2410/mmk2410.org](https://gitlab.com/mmk2410/mmk2410.org) and the bug tracker [phab.mmk2410.org/maniphest](https://phab.mmk2410.org/maniphest).
+If you have any questions feel free to write me a mail at [me@mmk2410.org](mailto:me@mmk2410.org) or contact me on [Twitter](https://twitter.com/mmk2410). If your question is more general, don't hesitate to create an issue.
## Packages
@@ -41,3 +37,7 @@ sudo apt-get install morse-converter
```
View this package repository at [Launchpad](https://launchpad.net/~mmk2410/+archive/ubuntu/morse-converter).
+
+#### Debian
+
+You can use the Ubuntu packages (or even the repository) with Debian.