projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Deliver firmware for Tmega 2.0 and TBT 3.0 for Windows too
[fw/altos]
/
altosuilib
/
AltosUIPreferencesBackend.java
diff --git
a/altosuilib/AltosUIPreferencesBackend.java
b/altosuilib/AltosUIPreferencesBackend.java
index 7a2f91f02f643d7a20ecd0a095787e387f5b356b..3d212dc5af61adaed24b3c6c516ac09ab362b940 100644
(file)
--- a/
altosuilib/AltosUIPreferencesBackend.java
+++ b/
altosuilib/AltosUIPreferencesBackend.java
@@
-15,17
+15,17
@@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altosuilib;
+package org.altusmetrum.altosuilib
_11
;
import java.io.File;
import java.util.prefs.*;
import java.io.File;
import java.util.prefs.*;
-import org.altusmetrum.altoslib.*;
+import org.altusmetrum.altoslib
_11
.*;
import javax.swing.filechooser.FileSystemView;
import javax.swing.filechooser.FileSystemView;
-public class AltosUIPreferencesBackend
implement
s AltosPreferencesBackend {
+public class AltosUIPreferencesBackend
extend
s AltosPreferencesBackend {
private Preferences _preferences = null;
private Preferences _preferences = null;
-
+
public AltosUIPreferencesBackend() {
_preferences = Preferences.userRoot().node("/org/altusmetrum/altosui");
}
public AltosUIPreferencesBackend() {
_preferences = Preferences.userRoot().node("/org/altusmetrum/altosui");
}
@@
-62,6
+62,14
@@
public class AltosUIPreferencesBackend implements AltosPreferencesBackend {
_preferences.putBoolean(key, value);
}
_preferences.putBoolean(key, value);
}
+ public byte[] getBytes(String key, byte[] def) {
+ return _preferences.getByteArray(key, def);
+ }
+
+ public void putBytes(String key, byte[] value) {
+ _preferences.putByteArray(key, value);
+ }
+
public boolean nodeExists(String key) {
try {
return _preferences.nodeExists(key);
public boolean nodeExists(String key) {
try {
return _preferences.nodeExists(key);
@@
-98,4
+106,8
@@
public class AltosUIPreferencesBackend implements AltosPreferencesBackend {
/* Use the file system view default directory */
return FileSystemView.getFileSystemView().getDefaultDirectory();
}
/* Use the file system view default directory */
return FileSystemView.getFileSystemView().getDefaultDirectory();
}
+
+ public void debug(String format, Object ... arguments) {
+ System.out.printf(format, arguments);
+ }
}
}