[Schmitzm-commits] r1417 - in trunk/schmitzm-core/src/main/java/de/schmitzm: . net net/jsf net/mail swing
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jan 27 12:07:17 CET 2011
Author: mojays
Date: 2011-01-27 12:07:16 +0100 (Thu, 27 Jan 2011)
New Revision: 1417
Added:
trunk/schmitzm-core/src/main/java/de/schmitzm/net/jsf/
trunk/schmitzm-core/src/main/java/de/schmitzm/net/jsf/GM4JSFUtil.java
trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/
trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/EmailThread.java
trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/MailUtil.java
trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/Mailer.java
trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/SimpleStringAuthenticator.java
Removed:
trunk/schmitzm-core/src/main/java/de/schmitzm/jsf/
trunk/schmitzm-core/src/main/java/de/schmitzm/mail/
trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource.20080424
trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource_de.20080424
trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource_en.20080424
Modified:
trunk/schmitzm-core/src/main/java/de/schmitzm/swing/ExceptionDialog.java
Log:
schmitzm.mail moved to schmitzm.net.mail
schmitzm.jsf moved to schmitzm.net.jsf
Sitemap moved to schmitzm.net
Added: trunk/schmitzm-core/src/main/java/de/schmitzm/net/jsf/GM4JSFUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/net/jsf/GM4JSFUtil.java 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/net/jsf/GM4JSFUtil.java 2011-01-27 11:07:16 UTC (rev 1417)
@@ -0,0 +1,23 @@
+package de.schmitzm.net.jsf;
+
+/**
+ * Eine Klasse mit Hilfsroutinen für GoogleMaps4JSF
+ *
+ * @author stefan
+ *
+ */
+public class GM4JSFUtil {
+
+ /**
+ * Innerhalb eines HTMLInformationWindow darf nur beschänktes HTML benutzt
+ * werden. Diese Funktion führt nötige Filter aus.
+ *
+ * @param toFilter
+ * @return
+ */
+ public static String filterHTML(String string) {
+ string = string.replaceAll("\"", """);
+ string = string.replaceAll("'", """);
+ return string;
+ }
+}
Added: trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/EmailThread.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/EmailThread.java 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/EmailThread.java 2011-01-27 11:07:16 UTC (rev 1417)
@@ -0,0 +1,27 @@
+package de.schmitzm.net.mail;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Send an Email on another {@link Thread}.
+ */
+public class EmailThread extends Thread {
+
+ static final Logger log = Logger.getLogger(EmailThread.class);
+
+ public EmailThread(final Mailer mailer, final String email,
+ final String subject, final String body) {
+ super(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ mailer.sendMail(email, subject, body);
+ } catch (Exception e) {
+ log.error("", e);
+ }
+ }
+
+ });
+ }
+}
Added: trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/MailUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/MailUtil.java 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/MailUtil.java 2011-01-27 11:07:16 UTC (rev 1417)
@@ -0,0 +1,229 @@
+package de.schmitzm.net.mail;
+
+import java.awt.Desktop;
+import java.net.URI;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.AddressException;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+import javax.swing.JOptionPane;
+
+import org.apache.log4j.Logger;
+
+import de.schmitzm.lang.LangUtil;
+import de.schmitzm.lang.ResourceProvider;
+import de.schmitzm.swing.ExceptionDialog;
+
+/**
+ * Diese Klasse stellt Hilfsmethoden zum verschicken von Mails bereit.
+ */
+public class MailUtil {
+ /** Mail address for Martin Schmitz. */
+ public static final String MAIL_ADDR_MARTIN_SCHMITZ = "Martin.Schmitz at koeln.de";
+ /** Mail address for Stefan Tzeggai. */
+ public static final String MAIL_ADDR_STEFAN_TZEGGAI = "tzeggai at wikisquare.de";
+ /** Mail address for SCHMITZM bug reports. */
+ public static final String MAIL_ADDR_SCHMITZM_BUGS = "schmitzm-bugs at wikisquare.de";
+
+ private static Logger log = Logger.getLogger(MailUtil.class);
+
+ /**
+ * {@link ResourceProvider} for the localization of the package
+ * {@code schmitzm.Mail}. These are provided in property files under
+ * {@code schmitzm.mail.resource.locales}.
+ */
+ public static ResourceProvider RESOURCE = ResourceProvider.newInstance(
+ LangUtil.extendPackagePath(MailUtil.class,
+ "resource.locales.MailResourceBundle"), Locale.ENGLISH);
+
+ /**
+ * Maximale Laenge des Mail-Bodies, FALLS dieser mit mailto:// - URL
+ * verschickt wird. Ist der Mail-Inhalt laenger, wird er gekuerzt.
+ */
+ private static final int MAX_DESKTOP_MAIL_BODY_SIZE = 1500;
+
+ /**
+ * Use a {@link Mailer} instance if you youse this method often.
+ *
+ * @param recipientsAddress
+ * @param subject
+ * @param text
+ * @param smtpUser
+ * @param smtpCredential
+ * @param smtpAuth
+ * @param smtpHost
+ * @param mailSenderAddress
+ * @throws AddressException
+ * @throws MessagingException
+ */
+ public static void sendSmtpMail(final String recipientsAddress,
+ final String subject, final String text, String smtpUser,
+ String smtpCredential, String smtpAuth, String smtpHost,
+ String mailSenderAddress) throws AddressException,
+ MessagingException {
+ final String senderAddress = mailSenderAddress;
+ log.debug("try: Sende Mail via " + smtpHost + " an "
+ + recipientsAddress + " als " + senderAddress
+ + " with Betreff = " + subject);
+
+ // It is expected that the client supplies values for the properties
+ // listed in Appendix A of the JavaMail spec
+ // (particularly mail.store.protocol, mail.transport.protocol,
+ // mail.host, mail.user, and mail.from
+ Properties mailProps = new Properties();
+ mailProps.setProperty("mail.smtp.user", smtpUser);
+ mailProps.setProperty("mail.smtp.credential", smtpCredential);
+ mailProps.setProperty("mail.sender.address", mailSenderAddress);
+ mailProps.setProperty("mail.smtp.host", smtpHost);
+ mailProps.setProperty("mail.smtp.auth", smtpAuth);
+ // mailProps.setProperty("mail.smtp.starttls.enable",
+ // getCfg("mail.smtp.starttls.enable"));
+ // mailProps.setProperty("mail.smtp.ssl.protocols",
+ // getCfg("mail.smtp.ssl.protocols"));
+
+ final Session session = Session.getInstance(mailProps,
+ new SimpleStringAuthenticator(smtpUser, smtpCredential));
+
+ // Eine neue Message erzeugen
+ final Message msg = new MimeMessage(session);
+
+ // Hier werden die Absender- und Empfängeradressen gesetzt
+ msg.setFrom(new InternetAddress(senderAddress));
+ msg.setRecipients(Message.RecipientType.TO,
+ InternetAddress.parse(recipientsAddress, false));
+
+ // Der Betreff und Body der Message werden gesetzt
+ msg.setSubject(subject);
+
+ // msg.setContent(text, "text/plain");
+ msg.setText(text);
+
+ // Hier lassen sich HEADER-Informationen hinzufügen
+ // msg.setHeader("Test", "Test");
+ msg.setSentDate(new Date());
+
+ // Zum Schluss wird die Mail natürlich noch verschickt
+ Transport.send(msg);
+ }
+
+ /**
+ * Opens the local mail client with a new mail.
+ *
+ * @param mailDestAddr
+ * destination address(es); can be {@code null}
+ * @param mailSubject
+ * mail subject; can be {@code null}
+ * @param mailBody
+ * mail body content; can be {@code null}
+ */
+ public static void sendDesktopMail(String mailDestAddr, String mailSubject,
+ String mailBody) {
+ if (!Desktop.isDesktopSupported()
+ || !Desktop.getDesktop().isSupported(Desktop.Action.MAIL)) {
+ JOptionPane.showMessageDialog(null,
+ RESOURCE.getString("MailUtil.DesktopMail.NotSupported"));
+ return;
+ }
+
+ try {
+ // Mail body can not be infinitely big
+ if (mailBody.length() > MAX_DESKTOP_MAIL_BODY_SIZE)
+ mailBody = mailBody.substring(0, MAX_DESKTOP_MAIL_BODY_SIZE)
+ + "...\n[...]";
+
+ StringBuffer uriMailStr = new StringBuffer();
+ uriMailStr.append(mailDestAddr != null ? mailDestAddr : "");
+ uriMailStr.append("?SUBJECT=").append(
+ mailSubject != null ? mailSubject : "");
+ uriMailStr.append("&BODY=")
+ .append(mailBody != null ? mailBody : "");
+ URI uriMailTo = new URI("mailto", uriMailStr.toString(), null);
+ Desktop.getDesktop().mail(uriMailTo);
+ } catch (Exception err) {
+ ExceptionDialog.show(null, err, null,
+ RESOURCE.getString("MailUtil.DesktopMail.CreationError"));
+ }
+ }
+
+ /**
+ * Opens the local mail client with a new mail for an exception.
+ *
+ * @param mailDestAddr
+ * destination address(es); can be {@code null}
+ * @param err
+ * exception to create a mail for
+ * @param smtpMailer
+ * if not <code>null</code>, sends the email via the mailer.
+ * @param additionalInfo
+ * may be <code>null</code>, adds additional text provided by the
+ * caller
+ * @throws MessagingException
+ * @throws AddressException
+ */
+ public static void sendExceptionMail(String mailDestAddr, Throwable err,
+ Set<Object> additionalInfo, Mailer smtpMailer)
+ throws AddressException, MessagingException {
+ String exceptionMess = err.getMessage();
+ String exceptionStack = LangUtil.getStackTraceFromException(err);
+
+ StringBuffer mailBody = new StringBuffer();
+ mailBody.append("\n").append("Date/Time: ")
+ .append(LangUtil.getCurrentTimeFormatted(null)).append("\n")
+ .append("Exception: ").append(exceptionMess).append("\n")
+ .append("Java version: ")
+ .append(System.getProperty("java.version")).append("\n");
+
+ // insert optinal additional comment
+ for (Object s : additionalInfo) {
+ String ss = LangUtil.trimNewlines(s.toString());
+ mailBody.append(ss + "\n");
+ }
+
+ mailBody.append("Comment: ___________").append("\n").append("\n")
+ .append(exceptionStack);
+ String mailSubject = "Exception-Report: " + exceptionMess;
+
+ if (smtpMailer != null)
+ smtpMailer.sendMail(mailDestAddr, mailSubject, mailBody.toString());
+ else
+ sendDesktopMail(mailDestAddr, mailSubject, mailBody.toString());
+ }
+
+ /**
+ * Opens the local mail client with a new mail for an exception.
+ *
+ * @param mailDestAddr
+ * destination address(es); can be {@code null}
+ * @param err
+ * exception to create a mail for
+ */
+ public static void sendDesktopExceptionMail(String mailDestAddr,
+ Throwable err) {
+ sendDesktopExceptionMail(mailDestAddr, err, null);
+ }
+
+ public static void sendDesktopExceptionMail(String destMailAddr,
+ Throwable error, Set<Object> additionalInfo) {
+ try {
+ sendExceptionMail(destMailAddr, error, additionalInfo, null);
+ } catch (AddressException e) {
+ log.error(
+ "unexpected javax.mail exception while using Desktop mail",
+ e);
+ } catch (MessagingException e) {
+ log.error(
+ "unexpected javax.mail exception while using Desktop mail",
+ e);
+ }
+
+ }
+
+}
Added: trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/Mailer.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/Mailer.java 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/Mailer.java 2011-01-27 11:07:16 UTC (rev 1417)
@@ -0,0 +1,48 @@
+package de.schmitzm.net.mail;
+
+import java.util.Set;
+
+import de.schmitzm.io.MailerInterface;
+
+/**
+ * A Mailer-Instance has all parameters set which are needed to send a mail.
+ */
+public class Mailer implements MailerInterface {
+ final String smtpUser;
+ final String smtpCredential;
+ final String smtpAuth;
+ final String smtpHost;
+ final String mailSenderAddress;
+
+ public Mailer(String smtpUser, String smtpCredential, String smtpAuth,
+ String smtpHost, String mailSenderAddress) {
+ this.smtpUser = smtpUser;
+ this.smtpCredential = smtpCredential;
+ this.smtpAuth = smtpAuth;
+ this.smtpHost = smtpHost;
+ this.mailSenderAddress = mailSenderAddress;
+ }
+
+ @Override
+ public void sendMail(final String recipientsAddress, final String subject,
+ final String text) {
+ try {
+ MailUtil.sendSmtpMail(recipientsAddress, subject, text, smtpUser,
+ smtpCredential, smtpAuth, smtpHost, mailSenderAddress);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ public void sendMail(String mailDestAddr, Throwable error,
+ Set<Object> additionalInfo) {
+ try {
+ MailUtil.sendExceptionMail(mailDestAddr, error, additionalInfo,
+ this);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
Added: trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/SimpleStringAuthenticator.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/SimpleStringAuthenticator.java 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/SimpleStringAuthenticator.java 2011-01-27 11:07:16 UTC (rev 1417)
@@ -0,0 +1,43 @@
+package de.schmitzm.net.mail;
+
+import javax.mail.Authenticator;
+import javax.mail.PasswordAuthentication;
+
+public class SimpleStringAuthenticator extends Authenticator {
+
+ /**
+ * Ein String, der den Usernamen nach der Erzeugung eines Objektes<br>
+ * dieser Klasse enthalten wird.
+ */
+ private final String user;
+
+ /**
+ * Ein String, der das Passwort nach der Erzeugung eines Objektes<br>
+ * dieser Klasse enthalten wird.
+ */
+ private final String password;
+
+ /**
+ * Der Konstruktor erzeugt ein MailAuthenticator Objekt<br>
+ * aus den beiden Parametern user und passwort.
+ *
+ * @param user
+ * String, der Username fuer den Mailaccount.
+ * @param password
+ * String, das Passwort fuer den Mailaccount.
+ */
+ public SimpleStringAuthenticator(final String user, final String password) {
+ this.user = user;
+ this.password = password;
+ }
+
+ /**
+ * Diese Methode gibt ein neues PasswortAuthentication Objekt zurueck.
+ *
+ * @see javax.mail.Authenticator#getPasswordAuthentication()
+ */
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(this.user, this.password);
+ }
+}
\ No newline at end of file
Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/ExceptionDialog.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/ExceptionDialog.java 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/ExceptionDialog.java 2011-01-27 11:07:16 UTC (rev 1417)
@@ -53,7 +53,7 @@
import de.schmitzm.io.MailerInterface;
import de.schmitzm.lang.LangUtil;
-import de.schmitzm.mail.MailUtil;
+import de.schmitzm.net.mail.MailUtil;
/**
* Diese Klasse stellt eine modale Fehler-Meldung dar. Diese besteht neben einer
Deleted: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource.20080424
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource.20080424 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource.20080424 2011-01-27 11:07:16 UTC (rev 1417)
@@ -1,104 +0,0 @@
-/** XULU - This file is part of the eXtendable Unified Land Use Modelling Platform (XULU)
-
- This library 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 2.1 of the License, or (at your option) any later version.
- This library 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 Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
-
- Diese Bibliothek ist freie Software; Sie dürfen sie unter den Bedingungen der GNU Lesser General Public License, wie von der Free Software Foundation veröffentlicht, weiterverteilen und/oder modifizieren; entweder gemäß Version 2.1 der Lizenz oder (nach Ihrer Option) jeder späteren Version.
- Diese Bibliothek wird in der Hoffnung weiterverbreitet, daß sie nützlich sein wird, jedoch OHNE IRGENDEINE GARANTIE, auch ohne die implizierte Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. Mehr Details finden Sie in der GNU Lesser General Public License.
- Sie sollten eine Kopie der GNU Lesser General Public License zusammen mit dieser Bibliothek erhalten haben; falls nicht, schreiben Sie an die Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
- **/
-
-package schmitzm.swing;
-
-import schmitzm.lang.HashtableResourceBundle;
-import java.util.ResourceBundle;
-
-// fuer Doku
-import java.util.Locale;
-
-/**
- * Dieses Standard-ResourceBundle stellt folgende Objekte fuer Swing-Komponenten
- * zur Verfuegung.
- * <table align=center border=2 cellpadding=5><code>
- * <tr><th>Key</th><th>Ressource</th></tr>
- * <tr><td><code>Ok</code></td><td>"Ok"</td></tr>
- * <tr><td><code>Cancel</code></td><td>"Cancel"</td></tr>
- * <tr><td><code>Apply</code></td><td>"Apply"</td></tr>
- * <tr><td><code>Ready</code></td><td>"Ready"</td></tr>
- * <tr><td><code>Open</code></td><td>"Open"</td></tr>
- * <tr><td><code>Close</code></td><td>"Close"</td></tr>
- * <tr><td><code>Save</code></td><td>"Save"</td></tr>
- * <tr><td><code>WaitMess</code></td><td>"Please wait..."</td></tr>
- * <tr><td><code>FileExistsMess</code></td><td>"File already exists"</td></tr>
- * <tr><td><code>Warning</code></td><td>"Warning"</td></tr>
- * <tr><td><code>Error</code></td><td>"Error"</td></tr>
- * <tr><td><code>Details</code></td><td>"Details..."</td></tr>
- * <tr><td><code>Information</code></td><td>"Information"</td></tr>
- * <tr><td><code>Class</code></td><td>"Class"</td></tr>
- * <tr><td><code>Description</code></td><td>"Description"</td></tr>
- * <tr><td><code>InvalidInputMess</code></td><td>"Invalid input"</td></tr>
- * <tr><td><code>Refresh</code></td><td>"Refresh"</td></tr>
- * <tr><td><code>Reload</code></td><td>"Reload"</td></tr>
- * <tr><td><code>Clear</code></td><td>"Clear"</td></tr>
- * <tr><td><code>Skip</code></td><td>"Skip"</td></tr>
- * <tr><td><code>Overwrite</code></td><td>"Overwrite"</td></tr>
- * <tr><td><code>OverwriteAll</code></td><td>"Overwrite all"</td></tr>
- * <tr><td><code>Replace</code></td><td>"Replace"</td></tr>
- * <tr><td><code>CreateDuplicate</code></td><td>"Create duplicate"</td></tr>
- * <tr><td><code>RememberChoice</code></td><td>"Remember this choice"</td></tr>
- * <tr><td><code>Rule</code></td><td>"Rule"</td></tr>
- * <tr><td><code>RuleToolTip</code></td><td>"Insert your arithmetical rule here..."</td></tr>
- * <tr><td><code>Operators</code></td><td>"Operators"</td></tr>
- * <tr><td><code>Start</code></td><td>"Start"</td></tr>
- * <tr><td><code>Calculate</code></td><td>"Calculate"</td></tr>
- * </table>
- * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a> (University of Bonn/Germany)
- * @version 1.0
- */
-public class SwingResource extends HashtableResourceBundle {
- /**
- * Enthaelt eine Referenz auf die Ressourcen in den Default-Locale
- * @see Locale#setDefault(Locale)
- */
- public static final ResourceBundle DEFAULT = ResourceBundle.getBundle(SwingResource.class.getName());
-
- /**
- * Liefert die (Key/Wert)-Paerchen. Die Keys (erste Dimension) muessen aus Strings
- * bestehen.
- */
- public Object[][] getContents() {
- return new Object[][] {
- {"Ok","Ok"},
- {"Cancel","Cancel"},
- {"Apply","Apply"},
- {"Ready","Ready"},
- {"Open","Open"},
- {"Close","Close"},
- {"Save","Save"},
- {"WaitMess","Please wait..."},
- {"FileExists","File already exists"},
- {"Details","Details..."},
- {"Warning","Warning"},
- {"Error","Error"},
- {"Information","Information"},
- {"Class","Class"},
- {"Description","Description"},
- {"InvalidInputMess","Invalid input"},
- {"Refresh","Refresh"},
- {"Reload","Reload"},
- {"Clear","Clear"},
- {"Skip","Skip"},
- {"Overwrite","Overwrite"},
- {"OverwriteAll","Overwrite all"},
- {"Replace","Replace"},
- {"CreateDuplicate","Create duplicate"},
- {"RememberChoice","Remember this choice"},
- {"Rule","Rule"},
- {"RuleToolTip","Insert your arithmetical rule here..."},
- {"Operators","Operators"},
- {"Start","Start"},
- {"Calculate","Calculate"}
- };
- }
-}
Deleted: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource_de.20080424
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource_de.20080424 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource_de.20080424 2011-01-27 11:07:16 UTC (rev 1417)
@@ -1,89 +0,0 @@
-/** XULU - This file is part of the eXtendable Unified Land Use Modelling Platform (XULU)
-
- This library 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 2.1 of the License, or (at your option) any later version.
- This library 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 Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
-
- Diese Bibliothek ist freie Software; Sie dürfen sie unter den Bedingungen der GNU Lesser General Public License, wie von der Free Software Foundation veröffentlicht, weiterverteilen und/oder modifizieren; entweder gemäß Version 2.1 der Lizenz oder (nach Ihrer Option) jeder späteren Version.
- Diese Bibliothek wird in der Hoffnung weiterverbreitet, daß sie nützlich sein wird, jedoch OHNE IRGENDEINE GARANTIE, auch ohne die implizierte Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. Mehr Details finden Sie in der GNU Lesser General Public License.
- Sie sollten eine Kopie der GNU Lesser General Public License zusammen mit dieser Bibliothek erhalten haben; falls nicht, schreiben Sie an die Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
- **/
-
-package schmitzm.swing;
-
-// nur fuer Doku
-import java.util.Locale;
-
-/**
- * Diese Klasse stellt deutsche Ressourcen fuer Swing-Komponenten zur Verfuegung.
- * <table align=center border=2 cellpadding=5><code>
- * <tr><th>Key</th><th>Ressource</th></tr>
- * <tr><td><code>Cancel</code></td><td>"Abbrechen"</td></tr>
- * <tr><td><code>Apply</code></td><td>"Übernehmen"</td></tr>
- * <tr><td><code>Ready</code></td><td>"Fertig"</td></tr>
- * <tr><td><code>Open</code></td><td>"Öffnen"</td></tr>
- * <tr><td><code>Close</code></td><td>"Schliessen"</td></tr>
- * <tr><td><code>Save</code></td><td>"Speichern"</td></tr>
- * <tr><td><code>WaitMess</code></td><td>"Bitte warten..."</td></tr>
- * <tr><td><code>FileExistsMess</code></td><td>"Datei existiert bereits"</td></tr>
- * <tr><td><code>Warning</code></td><td>"Warnung"</td></tr>
- * <tr><td><code>Error</code></td><td>"Fehler"</td></tr>
- * <tr><td><code>Class</code></td><td>"Klasse"</td></tr>
- * <tr><td><code>Description</code></td><td>"Beschreibung"</td></tr>
- * <tr><td><code>InvalidInputMess</code></td><td>"Unzulässige Eingabe"</td></tr>
- * <tr><td><code>Refresh</code></td><td>"Aktualisieren"</td></tr>
- * <tr><td><code>Reload</code></td><td>"Neu laden"</td></tr>
- * <tr><td><code>Clear</code></td><td>"Löschen"</td></tr>
- * <tr><td><code>Skip</code></td><td>"Übergehen"</td></tr>
- * <tr><td><code>Overwrite</code></td><td>"Überschreiben"</td></tr>
- * <tr><td><code>OverwriteAll</code></td><td>"Alle überschreiben"</td></tr>
- * <tr><td><code>Replace</code></td><td>"Ersetzen"</td></tr>
- * <tr><td><code>CreateDuplicate</code></td><td>"Duplikat erzeugen"</td></tr>
- * <tr><td><code>RememberChoice</code></td><td>"Immer diese Auswahl treffen"</td></tr>
- * <tr><td><code>Rule</code></td><td>"Formel"</td></tr>
- * <tr><td><code>RuleToolTip</code></td><td>"Hier eine arithmetische Formel eingeben..."</td></tr>
- * <tr><td><code>Operators</code></td><td>"Operatoren"</td></tr>
- * <tr><td><code>Start</code></td><td>"Start"</td></tr>
- * <tr><td><code>Calculate</code></td><td>"Rechnen"</td></tr>
- * </table>
- * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a> (University of Bonn/Germany)
- * @version 1.0
- */
-public class SwingResource_de extends SwingResource {
- /**
- * Liefert die (Key/Wert)-Paerchen. Die Keys (erste Dimension) muessen aus Strings
- * bestehen.
- */
- public Object[][] getContents() {
- return new Object[][] {
- {"Cancel","Abbrechen"},
- {"Apply","Übernehmen"},
- {"Ready","Fertig"},
- {"Open","Öffnen"},
- {"Close","Schliessen"},
- {"Save","Speichern"},
- {"WaitMess","Bitte warten..."},
- {"FileExists","Datei existiert bereits"},
- {"Warning","Warnung"},
- {"Error","Fehler"},
- {"Class","Klasse"},
- {"Description","Beschreibung"},
- {"InvalidInputMess","Unzulässige Eingabe"},
- {"Refresh","Aktualisieren"},
- {"Reload","Neu laden"},
- {"Clear","Löschen"},
- {"Skip","Übergehen"},
- {"Overwrite","Überschreiben"},
- {"OverwriteAll","Alle überschreiben"},
- {"Replace","Ersetzen"},
- {"CreateDuplicate","Duplikat erzeugen"},
- {"RememberChoice","Immer diese Auswahl treffen"},
- {"Rule","Formel"},
- {"RuleToolTip","Hier eine arithmetische Formel eingeben..."},
- {"Operators","Operatoren"},
- {"Start","Start"},
- {"Calculate","Rechnen"}
- };
- }
-
-}
Deleted: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource_en.20080424
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource_en.20080424 2011-01-27 11:01:02 UTC (rev 1416)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingResource_en.20080424 2011-01-27 11:07:16 UTC (rev 1417)
@@ -1,22 +0,0 @@
-/** XULU - This file is part of the eXtendable Unified Land Use Modelling Platform (XULU)
-
- This library 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 2.1 of the License, or (at your option) any later version.
- This library 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 Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
-
- Diese Bibliothek ist freie Software; Sie dürfen sie unter den Bedingungen der GNU Lesser General Public License, wie von der Free Software Foundation veröffentlicht, weiterverteilen und/oder modifizieren; entweder gemäß Version 2.1 der Lizenz oder (nach Ihrer Option) jeder späteren Version.
- Diese Bibliothek wird in der Hoffnung weiterverbreitet, daß sie nützlich sein wird, jedoch OHNE IRGENDEINE GARANTIE, auch ohne die implizierte Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. Mehr Details finden Sie in der GNU Lesser General Public License.
- Sie sollten eine Kopie der GNU Lesser General Public License zusammen mit dieser Bibliothek erhalten haben; falls nicht, schreiben Sie an die Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
- **/
-
-package schmitzm.swing;
-
-/**
- * Diese Klasse stellt englische Ressourcen fuer Swing-Komponenten zur Verfuegung.
- * Sie ist direkt vom Standard {@link SwingResource} abgeleitet und erweitert
- * diesen z.Zt. noch nicht!
- * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a> (University of Bonn/Germany)
- * @version 1.0
- */
-public class SwingResource_en extends SwingResource {
-}
More information about the Schmitzm-commits
mailing list