diff --git a/src/main/java/io/github/eb4j/ebview/gui/EBViewerModel.java b/src/main/java/io/github/eb4j/ebview/gui/EBViewerModel.java
index c4fb0c5..ddc90ce 100644
--- a/src/main/java/io/github/eb4j/ebview/gui/EBViewerModel.java
+++ b/src/main/java/io/github/eb4j/ebview/gui/EBViewerModel.java
@@ -1,3 +1,21 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.gui;
import io.github.eb4j.ebview.data.DictionaryEntry;
diff --git a/src/main/java/io/github/eb4j/ebview/gui/IMainMenu.java b/src/main/java/io/github/eb4j/ebview/gui/IMainMenu.java
deleted file mode 100644
index 433a394..0000000
--- a/src/main/java/io/github/eb4j/ebview/gui/IMainMenu.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package io.github.eb4j.ebview.gui;
-
-public interface IMainMenu {
-
- void invokeAction(String action, int modifiers);
-}
diff --git a/src/main/java/io/github/eb4j/ebview/gui/LinkActionListener.java b/src/main/java/io/github/eb4j/ebview/gui/LinkActionListener.java
index b32ad3a..6312ef6 100644
--- a/src/main/java/io/github/eb4j/ebview/gui/LinkActionListener.java
+++ b/src/main/java/io/github/eb4j/ebview/gui/LinkActionListener.java
@@ -1,3 +1,21 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.gui;
import io.github.eb4j.ebview.gui.dialogs.MoviePlay;
diff --git a/src/main/java/io/github/eb4j/ebview/gui/MainWindow.java b/src/main/java/io/github/eb4j/ebview/gui/MainWindow.java
index 9c2967d..53436a2 100644
--- a/src/main/java/io/github/eb4j/ebview/gui/MainWindow.java
+++ b/src/main/java/io/github/eb4j/ebview/gui/MainWindow.java
@@ -1,3 +1,21 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.gui;
import io.github.eb4j.ebview.data.DictionaryEntry;
diff --git a/src/main/java/io/github/eb4j/ebview/gui/MainWindowMenu.java b/src/main/java/io/github/eb4j/ebview/gui/MainWindowMenu.java
index 9cb88e2..dfae9fb 100644
--- a/src/main/java/io/github/eb4j/ebview/gui/MainWindowMenu.java
+++ b/src/main/java/io/github/eb4j/ebview/gui/MainWindowMenu.java
@@ -1,9 +1,26 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.gui;
import io.github.eb4j.ebview.EBViewer;
import io.github.eb4j.ebview.dictionary.DictionariesManager;
import io.github.eb4j.ebview.gui.dialogs.AboutDialog;
-import io.github.eb4j.ebview.gui.preferences.IPreferencesController;
import io.github.eb4j.ebview.gui.preferences.PreferenceController;
import io.github.eb4j.ebview.utils.LStrings;
@@ -28,7 +45,7 @@
import static io.github.eb4j.ebview.utils.ResourceUtil.APP_ICON_32X32;
-public class MainWindowMenu implements ActionListener, MenuListener, IMainMenu {
+public class MainWindowMenu implements ActionListener, MenuListener {
private final JFrame app;
private final DictionariesManager manager;
diff --git a/src/main/java/io/github/eb4j/ebview/gui/Searcher.java b/src/main/java/io/github/eb4j/ebview/gui/Searcher.java
index 68ff016..c61c151 100644
--- a/src/main/java/io/github/eb4j/ebview/gui/Searcher.java
+++ b/src/main/java/io/github/eb4j/ebview/gui/Searcher.java
@@ -1,3 +1,21 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.gui;
import io.github.eb4j.ebview.data.DictionaryEntry;
diff --git a/src/main/java/io/github/eb4j/ebview/utils/IPreferences.java b/src/main/java/io/github/eb4j/ebview/utils/IPreferences.java
new file mode 100644
index 0000000..c1b9e3f
--- /dev/null
+++ b/src/main/java/io/github/eb4j/ebview/utils/IPreferences.java
@@ -0,0 +1,54 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ * Copyright (C) 2000-2006 Keith Godfrey, Maxym Mykhalchuk, and Henry Pijffers
+ * 2007 Zoltan Bartko
+ * 2008-2009 Didier Briel
+ * 2010 Wildrich Fourie, Antonio Vilei, Didier Briel
+ * 2011 John Moran, Didier Briel
+ * 2012 Martin Fleurke, Wildrich Fourie, Didier Briel, Thomas Cordonnier,
+ * Aaron Madlon-Kay
+ * 2013 Aaron Madlon-Kay, Zoltan Bartko
+ * 2014 Piotr Kulik, Aaron Madlon-Kay
+ * 2015 Aaron Madlon-Kay, Yu Tang, Didier Briel, Hiroshi Miura
+ * 2016 Aaron Madlon-Kay*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package io.github.eb4j.ebview.utils;
+
+import java.io.IOException;
+
+public interface IPreferences {
+ String getPreference(String key);
+
+ boolean existsPreference(String key);
+
+ boolean isPreference(String key);
+
+ boolean isPreferenceDefault(String key, boolean defaultValue);
+
+ String getPreferenceDefault(String key, String value);
+
+ > T getPreferenceEnumDefault(String key, T defaultValue);
+
+ int getPreferenceDefault(String key, int defaultValue);
+
+ /**
+ * Return the old value, or null if not set
+ */
+ Object setPreference(String key, Object value) throws Exception;
+
+ void save() throws IOException;
+}
diff --git a/src/main/java/io/github/eb4j/ebview/utils/ImageUtils.java b/src/main/java/io/github/eb4j/ebview/utils/ImageUtils.java
index c87658b..47d74ba 100644
--- a/src/main/java/io/github/eb4j/ebview/utils/ImageUtils.java
+++ b/src/main/java/io/github/eb4j/ebview/utils/ImageUtils.java
@@ -1,3 +1,21 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.utils;
import io.github.eb4j.util.ImageUtil;
diff --git a/src/main/java/io/github/eb4j/ebview/utils/LStrings.java b/src/main/java/io/github/eb4j/ebview/utils/LStrings.java
index da1a00a..e49b4a2 100644
--- a/src/main/java/io/github/eb4j/ebview/utils/LStrings.java
+++ b/src/main/java/io/github/eb4j/ebview/utils/LStrings.java
@@ -1,3 +1,21 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.utils;
import java.util.ResourceBundle;
@@ -7,11 +25,10 @@ public final class LStrings {
private LStrings() {
}
- /** Resource bundle that contains all the strings.
- */
- private static ResourceBundle bundle = ResourceBundle.getBundle("Bundle");
+ private static final ResourceBundle bundle = ResourceBundle.getBundle("Bundle");
- /** Returns a localized String for a key.
+ /**
+ * Returns a localized String for a key.
* @param key query string.
* @return localized string.
*/
diff --git a/src/main/java/io/github/eb4j/ebview/utils/Platform.java b/src/main/java/io/github/eb4j/ebview/utils/Platform.java
index cc1231f..6384110 100644
--- a/src/main/java/io/github/eb4j/ebview/utils/Platform.java
+++ b/src/main/java/io/github/eb4j/ebview/utils/Platform.java
@@ -1,7 +1,8 @@
/*
* EBViewer, a dictionary viewer application.
* Copyright (C) 2022 Hiroshi Miura.
- *
+ * 2007 - Zoltan Bartko
+ * 2011 Alex Buloichik*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
diff --git a/src/main/java/io/github/eb4j/ebview/utils/Preferences.java b/src/main/java/io/github/eb4j/ebview/utils/Preferences.java
index 3f77b9e..5064cdf 100644
--- a/src/main/java/io/github/eb4j/ebview/utils/Preferences.java
+++ b/src/main/java/io/github/eb4j/ebview/utils/Preferences.java
@@ -1,7 +1,17 @@
/*
* EBViewer, a dictionary viewer application.
* Copyright (C) 2022 Hiroshi Miura.
- *
+ * Copyright (C) 2000-2006 Keith Godfrey, Maxym Mykhalchuk, and Henry Pijffers
+ * 2007 Zoltan Bartko
+ * 2008-2009 Didier Briel
+ * 2010 Wildrich Fourie, Antonio Vilei, Didier Briel
+ * 2011 John Moran, Didier Briel
+ * 2012 Martin Fleurke, Wildrich Fourie, Didier Briel, Thomas Cordonnier,
+ * Aaron Madlon-Kay
+ * 2013 Aaron Madlon-Kay, Zoltan Bartko
+ * 2014 Piotr Kulik, Aaron Madlon-Kay
+ * 2015 Aaron Madlon-Kay, Yu Tang, Didier Briel, Hiroshi Miura
+ * 2016 Aaron Madlon-Kay
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@@ -24,7 +34,6 @@
import org.slf4j.LoggerFactory;
import java.io.File;
-import java.io.IOException;
public final class Preferences {
@@ -101,19 +110,6 @@ public static void save() {
}
}
- public interface IPreferences {
- String getPreference(String key);
- boolean existsPreference(String key);
- boolean isPreference(String key);
- boolean isPreferenceDefault(String key, boolean defaultValue);
- String getPreferenceDefault(String key, String value);
- > T getPreferenceEnumDefault(String key, T defaultValue);
- int getPreferenceDefault(String key, int defaultValue);
- /** Return the old value, or null if not set */
- Object setPreference(String key, Object value) throws Exception;
- void save() throws IOException;
- }
-
public static void init() throws JsonProcessingException {
if (didInit) {
return;
diff --git a/src/main/java/io/github/eb4j/ebview/utils/PreferencesImpl.java b/src/main/java/io/github/eb4j/ebview/utils/PreferencesImpl.java
index 1ec3472..e1dbb54 100644
--- a/src/main/java/io/github/eb4j/ebview/utils/PreferencesImpl.java
+++ b/src/main/java/io/github/eb4j/ebview/utils/PreferencesImpl.java
@@ -29,7 +29,7 @@
import java.text.SimpleDateFormat;
import java.util.Date;
-public class PreferencesImpl implements Preferences.IPreferences {
+public class PreferencesImpl implements IPreferences {
private final ObjectNode preferences;
private final File preferenceFile;
diff --git a/src/main/java/io/github/eb4j/ebview/utils/Stemmer.java b/src/main/java/io/github/eb4j/ebview/utils/Stemmer.java
index 69e73f1..fa694e5 100644
--- a/src/main/java/io/github/eb4j/ebview/utils/Stemmer.java
+++ b/src/main/java/io/github/eb4j/ebview/utils/Stemmer.java
@@ -1,3 +1,24 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ * Copyright (C) 2000-2006 Keith Godfrey, Maxym Mykhalchuk, and Henry Pijffers
+ * 2007 Didier Briel, Zoltan Bartko
+ * 2008 Alex Buloichik
+ * 2015 Didier Briel, Aaron Madlon-Kay*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.utils;
import org.apache.commons.lang3.StringUtils;
diff --git a/src/main/java/io/github/eb4j/ebview/utils/WordIterator.java b/src/main/java/io/github/eb4j/ebview/utils/WordIterator.java
index 83a0eca..8879df3 100644
--- a/src/main/java/io/github/eb4j/ebview/utils/WordIterator.java
+++ b/src/main/java/io/github/eb4j/ebview/utils/WordIterator.java
@@ -1,3 +1,22 @@
+/*
+ * EBViewer, a dictionary viewer application.
+ * Copyright (C) 2022 Hiroshi Miura.
+ * Copyright (C) 2000-2006 Keith Godfrey and Maxym Mykhalchuk
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package io.github.eb4j.ebview.utils;
import java.text.BreakIterator;