Code example for Preferences

Methods: putInt

0
        return new CartoonControl(this);
    } 
 
    @Override 
    public void applyStudioConfig(Preferences prefs) {
        prefs.putInt("scale", scale);
        prefs.putInt("colorsplit", colorSplit);
        prefs.putInt("contoursize", contourSize);
    } 
 
    @Override 
    public void loadFromStudioConfig(Preferences prefs) {
        scale = prefs.getInt("scale", scale);
        colorSplit = prefs.getInt("colorsplit", colorSplit);
        contourSize = prefs.getInt("contoursize", contourSize);
    } 
}