diff options
| author | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:31:42 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:31:42 -0600 |
| commit | 6e9bb9178356620bd47d9f2e31abf42b7f1a8f11 (patch) | |
| tree | 6f04b5500462d1f6e26ebcba58c5e9cd56afd442 /altosuilib/AltosUIPreferences.java | |
| parent | e2cefd8593d269ce603aaf33f4a53a5c2dcb3350 (diff) | |
| parent | 87c8bb3956897830da1f7aaca2990a9571767b73 (diff) | |
Merge branch 'master' into branch-1.6
Diffstat (limited to 'altosuilib/AltosUIPreferences.java')
| -rw-r--r-- | altosuilib/AltosUIPreferences.java | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/altosuilib/AltosUIPreferences.java b/altosuilib/AltosUIPreferences.java index 9760494c..5602dc17 100644 --- a/altosuilib/AltosUIPreferences.java +++ b/altosuilib/AltosUIPreferences.java @@ -15,13 +15,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_6; +package org.altusmetrum.altosuilib_8; import java.io.*; import java.util.*; import java.awt.Component; import javax.swing.*; -import org.altusmetrum.altoslib_6.*; +import org.altusmetrum.altoslib_8.*; public class AltosUIPreferences extends AltosPreferences { @@ -55,10 +55,6 @@ public class AltosUIPreferences extends AltosPreferences { public static int position = AltosUILib.position_top_left; - static LinkedList<AltosUIMapCacheListener> map_cache_listeners; - - public static int map_cache = 9; - public static void init() { AltosPreferences.init(new AltosUIPreferencesBackend()); @@ -75,9 +71,6 @@ public class AltosUIPreferences extends AltosPreferences { position = backend.getInt(positionPreference, AltosUILib.position_top_left); position_listeners = new LinkedList<AltosPositionListener>(); - - map_cache = backend.getInt(mapCachePreference, 9); - map_cache_listeners = new LinkedList<AltosUIMapCacheListener>(); } static { init(); } @@ -225,32 +218,4 @@ public class AltosUIPreferences extends AltosPreferences { return position; } } - - public static void register_map_cache_listener(AltosUIMapCacheListener l) { - synchronized(backend) { - map_cache_listeners.add(l); - } - } - - public static void unregister_map_cache_listener(AltosUIMapCacheListener l) { - synchronized (backend) { - map_cache_listeners.remove(l); - } - } - - public static void set_map_cache(int new_map_cache) { - synchronized(backend) { - map_cache = new_map_cache; - backend.putInt(mapCachePreference, map_cache); - flush_preferences(); - for (AltosUIMapCacheListener l: map_cache_listeners) - l.map_cache_changed(map_cache); - } - } - - public static int map_cache() { - synchronized(backend) { - return map_cache; - } - } } |
