I'm not familiar with the preferences API, but making a fluid API that you access statically is pretty simple.
For instance, to have something like Preferences.set().background(green).border(yellow);
, you could do the following:
public class Preferences {
private Preferences(){}
public static Preferences set() {
return new Preferences();
}
public Preferences background(Color color) {
//set color on real preferences
return this;
}
public Preferences border(Color color) {
//set color on real preferences
return this;
}
}