From: Roland Häder Date: Fri, 18 Aug 2017 22:32:40 +0000 (+0200) Subject: Added event for when a locale has changed. The new locale is included in the X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=628749337bb278d97a06db6948b7f3316eaaaf4f;hp=e299dcb87f86c07fe4f1b495f37963b98b2ce35f;p=jcoreee.git Added event for when a locale has changed. The new locale is included in the event class. Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcoreee/events/locale/LocaleChangeEvent.java b/src/org/mxchange/jcoreee/events/locale/LocaleChangeEvent.java new file mode 100644 index 0000000..e8a2a04 --- /dev/null +++ b/src/org/mxchange/jcoreee/events/locale/LocaleChangeEvent.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2017 Roland Häder + * + * 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 org.mxchange.jcoreee.events.locale; + +import java.util.Locale; + +/** + * An event being fired when a helper bean should be cleaned. + *

+ * @author Roland Häder + */ +public class LocaleChangeEvent implements ObservableLocaleChangeEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 14_689_371_541_856L; + + /** + * New locale instance + */ + private final Locale locale; + + /** + * Default constructor with new locale + *

+ * @param locale New locale instance + */ + public LocaleChangeEvent (final Locale locale) { + this.locale = locale; + } + + @Override + public Locale getLocale () { + return this.locale; + } + +} diff --git a/src/org/mxchange/jcoreee/events/locale/ObservableLocaleChangeEvent.java b/src/org/mxchange/jcoreee/events/locale/ObservableLocaleChangeEvent.java new file mode 100644 index 0000000..310aada --- /dev/null +++ b/src/org/mxchange/jcoreee/events/locale/ObservableLocaleChangeEvent.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2017 Roland Häder + * + * 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 org.mxchange.jcoreee.events.locale; + +import java.io.Serializable; +import java.util.Locale; + +/** + * An event being fired when a helper bean should be cleaned. + *

+ * @author Roland Häder + */ +public interface ObservableLocaleChangeEvent extends Serializable { + + /** + * Getter for locale instance + *

+ * @return Locale instance + */ + Locale getLocale (); + +}