public class ImageJMATLABPrefService extends DefaultPrefService
PrefService
implementation specific for use within MATLAB. MATLAB
has known bugs regarding java.util.prefs.Preferences
, so we need the
ability to disable their use, via a setEnabled(boolean)
method.Constructor and Description |
---|
ImageJMATLABPrefService() |
Modifier and Type | Method and Description |
---|---|
void |
clear(Class<?> c) |
void |
clear(Class<?> prefClass,
String key) |
void |
clear(String key) |
void |
clearAll() |
String |
get(Class<?> c,
String name) |
String |
get(Class<?> c,
String name,
String defaultValue) |
String |
get(String name) |
String |
get(String name,
String defaultValue) |
boolean |
getBoolean(Class<?> c,
String name,
boolean defaultValue) |
boolean |
getBoolean(String name,
boolean defaultValue) |
double |
getDouble(Class<?> c,
String name,
double defaultValue) |
double |
getDouble(String name,
double defaultValue) |
float |
getFloat(Class<?> c,
String name,
float defaultValue) |
float |
getFloat(String name,
float defaultValue) |
int |
getInt(Class<?> c,
String name,
int defaultValue) |
int |
getInt(String name,
int defaultValue) |
List<String> |
getList(Class<?> prefClass) |
List<String> |
getList(Class<?> prefClass,
String key) |
List<String> |
getList(String key) |
long |
getLong(Class<?> c,
String name,
long defaultValue) |
long |
getLong(String name,
long defaultValue) |
Map<String,String> |
getMap(Class<?> prefClass) |
Map<String,String> |
getMap(Class<?> prefClass,
String key) |
Map<String,String> |
getMap(String key) |
void |
put(Class<?> c,
String name,
boolean value) |
void |
put(Class<?> c,
String name,
double value) |
void |
put(Class<?> c,
String name,
float value) |
void |
put(Class<?> c,
String name,
int value) |
void |
put(Class<?> c,
String name,
long value) |
void |
put(Class<?> c,
String name,
String value) |
void |
put(String name,
boolean value) |
void |
put(String name,
double value) |
void |
put(String name,
float value) |
void |
put(String name,
int value) |
void |
put(String name,
long value) |
void |
put(String name,
String value) |
void |
putList(Class<?> prefClass,
List<String> list) |
void |
putList(Class<?> prefClass,
List<String> list,
String key) |
void |
putList(List<String> list,
String key) |
void |
putMap(Class<?> prefClass,
Map<String,String> map) |
void |
putMap(Class<?> prefClass,
Map<String,String> map,
String key) |
void |
putMap(Map<String,String> map,
String key) |
void |
remove(Class<?> prefClass,
String key) |
static void |
setEnabled(boolean enabled)
Sets whether or not this
PrefService is enabled. |
clear, getIterable, getList, getMap, put, put, putList, putList, putMap, putMap, remove
initialize
getContext, setContext, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIterable, putIterable, putIterable
registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
public static void setEnabled(boolean enabled)
PrefService
is enabled. If so, it will
behave like a DefaultPrefService
. If not, all methods will return
empty objects, 0 values, or be NO-OPs.
NB: this method needs to be static so that it can be called before a
Context
is created.
public boolean getBoolean(String name, boolean defaultValue)
public double getDouble(String name, double defaultValue)
public float getFloat(String name, float defaultValue)
public int getInt(String name, int defaultValue)
public long getLong(String name, long defaultValue)
public void put(String name, boolean value)
public void put(String name, double value)
public void put(String name, float value)
public void put(String name, int value)
public void put(String name, long value)
public String get(Class<?> c, String name, String defaultValue)
get
in interface PrefService
get
in class DefaultPrefService
public boolean getBoolean(Class<?> c, String name, boolean defaultValue)
getBoolean
in interface PrefService
getBoolean
in class DefaultPrefService
public double getDouble(Class<?> c, String name, double defaultValue)
getDouble
in interface PrefService
getDouble
in class DefaultPrefService
public float getFloat(Class<?> c, String name, float defaultValue)
getFloat
in interface PrefService
getFloat
in class DefaultPrefService
public int getInt(Class<?> c, String name, int defaultValue)
getInt
in interface PrefService
getInt
in class DefaultPrefService
public long getLong(Class<?> c, String name, long defaultValue)
getLong
in interface PrefService
getLong
in class DefaultPrefService
public void put(Class<?> c, String name, String value)
put
in interface PrefService
put
in class DefaultPrefService
public void put(Class<?> c, String name, boolean value)
put
in interface PrefService
put
in class DefaultPrefService
public void put(Class<?> c, String name, double value)
put
in interface PrefService
put
in class DefaultPrefService
public void put(Class<?> c, String name, float value)
put
in interface PrefService
put
in class DefaultPrefService
public void put(Class<?> c, String name, int value)
put
in interface PrefService
put
in class DefaultPrefService
public void put(Class<?> c, String name, long value)
put
in interface PrefService
put
in class DefaultPrefService
public void clear(Class<?> c)
clear
in interface PrefService
clear
in class DefaultPrefService
public void clearAll()
clearAll
in interface PrefService
clearAll
in class DefaultPrefService
public void clear(String key)
public void clear(Class<?> prefClass, String key)
clear
in interface PrefService
clear
in class DefaultPrefService
public void remove(Class<?> prefClass, String key)
remove
in interface PrefService
remove
in class DefaultPrefService
public void putMap(Class<?> prefClass, Map<String,String> map)
putMap
in interface PrefService
putMap
in class DefaultPrefService
public Map<String,String> getMap(Class<?> prefClass, String key)
getMap
in interface PrefService
getMap
in class DefaultPrefService
public Map<String,String> getMap(Class<?> prefClass)
getMap
in interface PrefService
getMap
in class DefaultPrefService
public void putList(Class<?> prefClass, List<String> list)
putList
in interface PrefService
putList
in class DefaultPrefService
public List<String> getList(Class<?> prefClass, String key)
getList
in interface PrefService
getList
in class DefaultPrefService
public List<String> getList(Class<?> prefClass)
getList
in interface PrefService
getList
in class DefaultPrefService
Copyright © 2014–2022 ImageJ. All rights reserved.