[Schmitzm-commits] r2282 - in trunk/schmitzm-mp3/src/main: java/de/schmitzm/mp3 java/de/schmitzm/mp3/id3/gui resources/de/schmitzm/mp3 resources/de/schmitzm/mp3/resource resources/de/schmitzm/mp3/resource/locales
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Sun Mar 24 12:40:13 CET 2013
Author: mojays
Date: 2013-03-24 12:40:13 +0100 (Sun, 24 Mar 2013)
New Revision: 2282
Added:
trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/MP3Util.java
trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/
trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/
trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/MP3ResourceBundle.properties
trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/MP3ResourceBundle_de.properties
Modified:
trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/gui/GUIUtil.java
Log:
Constants moved from GUIUtil to new MP3Util
Added: trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/MP3Util.java
===================================================================
--- trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/MP3Util.java (rev 0)
+++ trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/MP3Util.java 2013-03-24 11:40:13 UTC (rev 2282)
@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) 2009 Martin O. J. Schmitz.
+ *
+ * This file is part of the SCHMITZM library - a collection of utility
+ * classes based on Java 1.6, focusing (not only) on Java Swing
+ * and the Geotools library.
+ *
+ * The SCHMITZM project is hosted at:
+ * http://wald.intevation.org/projects/schmitzm/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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 Lesser General Public License (license.txt)
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * or try this link: http://www.gnu.org/licenses/lgpl.html
+ *
+ * Contributors:
+ * Martin O. J. Schmitz - initial API and implementation
+ * Stefan A. Tzeggai - additional utility classes
+ */
+package de.schmitzm.mp3;
+
+import java.io.FileFilter;
+import java.util.Locale;
+
+import javax.swing.JFileChooser;
+
+import de.schmitzm.io.FilterUtil;
+import de.schmitzm.io.FilterUtil.FilterMode;
+import de.schmitzm.lang.LangUtil;
+import de.schmitzm.lang.ResourceProvider;
+import de.schmitzm.swing.FileExtensionFilter;
+
+
+/**
+ * Utility methods for MP3.
+ * @author Martin O.J. Schmitz
+ */
+public class MP3Util {
+ /**
+ * {@link ResourceProvider} for the localisation of the GUI components.
+ */
+ public static ResourceProvider RESOURCE = ResourceProvider.newInstance(
+ LangUtil.extendPackagePath(MP3Util.class,
+ "resource.locales.MP3ResourceBundle"), Locale.ENGLISH);
+ /**
+ * Shortcut for {@code RESOURCE.getString(..)}.
+ */
+ public static String R(String key, Object... values) {
+ return RESOURCE.getString(key, values);
+ }
+
+ /** {@link JFileChooser} filter to show only mp3-files. */
+ public static final FileExtensionFilter FILECHOOSER_FILTER_MP3 = new FileExtensionFilter(R("MP3Util.mp3filter.desc"), true, ".mp3");
+ /** {@link FileFilter} filter to show only mp3-files. */
+ public static final FileFilter FILE_FILTER_MP3 = FilterUtil.createSimpleFileFilter("*.mp3", FilterMode.FILES_ONLY);
+
+}
Modified: trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/gui/GUIUtil.java
===================================================================
--- trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/gui/GUIUtil.java 2013-03-24 11:20:31 UTC (rev 2281)
+++ trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/gui/GUIUtil.java 2013-03-24 11:40:13 UTC (rev 2282)
@@ -64,12 +64,6 @@
/** Color for section labels in the frames. */
public static final Color COLOR_SECTION_LABEL = new Color(0,51,153); // dark blue
- /** {@link JFileChooser} filter to show only mp3-files. */
- public static final FileExtensionFilter FILECHOOSER_FILTER_MP3 = new FileExtensionFilter(ID3TagUtil.R("ID3TagUtil.mp3filter.desc"), true, ".mp3");
- /** {@link FileFilter} filter to show only mp3-files. */
- public static final FileFilter FILE_FILTER_MP3 = FilterUtil.createSimpleFileFilter("*.mp3", FilterMode.FILES_ONLY);
-
-
/**
* Creates a {@link JLabel} styled as header label in
* {@link KontaktInformationPanel}.
Added: trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/MP3ResourceBundle.properties
===================================================================
--- trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/MP3ResourceBundle.properties (rev 0)
+++ trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/MP3ResourceBundle.properties 2013-03-24 11:40:13 UTC (rev 2282)
@@ -0,0 +1,32 @@
+##########
+#This file is part of the SCHMITZM library - a collection of utility
+#classes based on Java 1.6, focussing (not only) on Java Swing
+#and the Geotools library.
+#
+#The SCHMITZM project is hosted at:
+#http://wald.intevation.org/projects/schmitzm/
+#
+#This program is free software; you can redistribute it and/or
+#modify it under the terms of the GNU Lesser 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 Lesser General Public License (license.txt)
+#along with this program; if not, write to the Free Software
+#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#or try this link: http://www.gnu.org/licenses/lgpl.html
+#
+#Contributors:
+# Martin O. J. Schmitz - initial API and implementation
+# Stefan A. Tzeggai - additional utility classes
+##########
+# ---------------------------------------------------------------
+# ------ Default Translations (english) for GUI components ------
+# ------ in Package de.schmitzm.mp3 ------
+# ---------------------------------------------------------------
+MP3Util.mp3filter.desc=mp3 files
Added: trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/MP3ResourceBundle_de.properties
===================================================================
--- trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/MP3ResourceBundle_de.properties (rev 0)
+++ trunk/schmitzm-mp3/src/main/resources/de/schmitzm/mp3/resource/locales/MP3ResourceBundle_de.properties 2013-03-24 11:40:13 UTC (rev 2282)
@@ -0,0 +1,32 @@
+##########
+#This file is part of the SCHMITZM library - a collection of utility
+#classes based on Java 1.6, focussing (not only) on Java Swing
+#and the Geotools library.
+#
+#The SCHMITZM project is hosted at:
+#http://wald.intevation.org/projects/schmitzm/
+#
+#This program is free software; you can redistribute it and/or
+#modify it under the terms of the GNU Lesser 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 Lesser General Public License (license.txt)
+#along with this program; if not, write to the Free Software
+#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#or try this link: http://www.gnu.org/licenses/lgpl.html
+#
+#Contributors:
+# Martin O. J. Schmitz - initial API and implementation
+# Stefan A. Tzeggai - additional utility classes
+##########
+# ---------------------------------------------------------------
+# ------ Germal Translations for GUI components ------
+# ------ in Package de.schmitzm.mp3 ------
+# ---------------------------------------------------------------
+MP3Util.mp3filter.desc=mp3 Dateien
More information about the Schmitzm-commits
mailing list