Class Preferences
This class does not use the Properties class because .properties files use ISO 8859-1 encoding, which is highly likely to be a problem when trying to save sketch folders and locations. Like the rest of Processing, we use UTF8.
We don't use the Java Preferences API because it would entail writing to the registry (on Windows), or an obscure file location (on Mac OS X) and make it far more difficult (impossible) to remove the preferences.txt to reset them (when they become corrupt), or to find the the file to make edits for numerous obscure preferences that are not part of the preferences window. If we added a generic editor (e.g. about:config in Mozilla) for such things, we could start using the Java Preferences API. But wow, that sounds like a lot of work. Not unlike writing this paragraph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic booleangetBoolean(String attribute) static intgetInteger(String attribute)
-
Constructor Details
-
Preferences
public Preferences()
-
-
Method Details
-
get
-
getBoolean
-
getInteger
-