Search in sources :

Example 21 with BackingStoreException

use of java.util.prefs.BackingStoreException in project blue by kunstmusik.

the class DiskRenderSettings method save.

public void save() {
    final Preferences prefs = NbPreferences.forModule(DiskRenderSettings.class);
    prefs.put(PREFIX + CSOUND_EXECUTABLE, csoundExecutable);
    prefs.put(PREFIX + DEFAULT_SR, defaultSr);
    prefs.put(PREFIX + DEFAULT_KSMPS, defaultKsmps);
    prefs.put(PREFIX + DEFAULT_NCHNLS, defaultNchnls);
    prefs.putBoolean(PREFIX + EXTERNAL_PLAY_COMMAND_ENABLED, externalPlayCommandEnabled);
    prefs.put(PREFIX + EXTERNAL_PLAY_COMMAND, externalPlayCommand);
    prefs.put(PREFIX + EXTERNAL_OPEN_COMMAND, externalOpenCommand);
    prefs.putBoolean(PREFIX + FILE_FORMAT_ENABLED, fileFormatEnabled);
    prefs.put(PREFIX + FILE_FORMAT, fileFormat);
    prefs.putBoolean(PREFIX + SAMPLE_FORMAT_ENABLED, sampleFormatEnabled);
    prefs.put(PREFIX + SAMPLE_FORMAT, sampleFormat);
    prefs.putBoolean(PREFIX + SAVE_PEAK_INFORMATION, savePeakInformation);
    prefs.putBoolean(PREFIX + DITHER_OUTPUT, ditherOutput);
    prefs.putBoolean(PREFIX + REWRITE_HEADER, rewriteHeader);
    prefs.putBoolean(PREFIX + NOTE_AMPS_ENABLED, noteAmpsEnabled);
    prefs.putBoolean(PREFIX + WARNINGS_ENABLED, warningsEnabled);
    prefs.putBoolean(PREFIX + OUT_OF_RANGE_ENABLED, outOfRangeEnabled);
    prefs.putBoolean(PREFIX + BENCHMARK_ENABLED, benchmarkEnabled);
    prefs.putBoolean(PREFIX + DISPLAYS_DISABLED, displaysDisabled);
    prefs.put(PREFIX + ADVANCED_SETTINGS, advancedSettings);
    prefs.putBoolean(PREFIX + USE_ZERO_DBFS, useZeroDbFS);
    prefs.put(PREFIX + ZERO_DB_FS, zeroDbFS);
    prefs.put(PREFIX + DISK_RENDER_SERVICE_FACTORY, renderServiceFactory.toString());
    try {
        prefs.sync();
    } catch (BackingStoreException ex) {
        Exceptions.printStackTrace(ex);
    }
}
Also used : BackingStoreException(java.util.prefs.BackingStoreException) NbPreferences(org.openide.util.NbPreferences) Preferences(java.util.prefs.Preferences)

Example 22 with BackingStoreException

use of java.util.prefs.BackingStoreException in project blue by kunstmusik.

the class ProjectDefaultsSettings method save.

public void save() {
    final Preferences prefs = NbPreferences.forModule(ProjectDefaultsSettings.class);
    prefs.put(PREFIX + DEFAULT_AUTHOR, defaultAuthor);
    prefs.putBoolean(PREFIX + MIXER_ENABLED, mixerEnabled);
    prefs.putInt(PREFIX + LAYER_HEIGHT_DEFAULT, layerHeightDefault);
    try {
        prefs.sync();
    } catch (BackingStoreException ex) {
        Exceptions.printStackTrace(ex);
    }
}
Also used : BackingStoreException(java.util.prefs.BackingStoreException) NbPreferences(org.openide.util.NbPreferences) Preferences(java.util.prefs.Preferences)

Example 23 with BackingStoreException

use of java.util.prefs.BackingStoreException in project blue by kunstmusik.

the class RealtimeRenderSettings method save.

public void save() {
    final Preferences prefs = NbPreferences.forModule(RealtimeRenderSettings.class);
    prefs.put(PREFIX + CSOUND_EXECUTABLE, csoundExecutable);
    prefs.put(PREFIX + DEFAULT_SR, defaultSr);
    prefs.put(PREFIX + DEFAULT_KSMPS, defaultKsmps);
    prefs.put(PREFIX + DEFAULT_NCHNLS, defaultNchnls);
    prefs.putBoolean(PREFIX + AUDIO_DRIVER_ENABLED, audioDriverEnabled);
    prefs.put(PREFIX + AUDIO_DRIVER, audioDriver);
    prefs.putBoolean(PREFIX + AUDIO_OUT_ENABLED, audioOutEnabled);
    prefs.put(PREFIX + AUDIO_OUT_TEXT, audioOutText);
    prefs.putBoolean(PREFIX + AUDIO_IN_ENABLED, audioInEnabled);
    prefs.put(PREFIX + AUDIO_IN_TEXT, audioInText);
    prefs.putBoolean(PREFIX + MIDI_DRIVER_ENABLED, midiDriverEnabled);
    prefs.put(PREFIX + MIDI_DRIVER, midiDriver);
    prefs.putBoolean(PREFIX + MIDI_OUT_ENABLED, midiOutEnabled);
    prefs.put(PREFIX + MIDI_OUT_TEXT, midiOutText.toString());
    prefs.putBoolean(PREFIX + MIDI_IN_ENABLED, midiInEnabled);
    prefs.put(PREFIX + MIDI_IN_TEXT, midiInText);
    prefs.putBoolean(PREFIX + HARDWARE_BUFFER_ENABLED, hardwareBufferEnabled);
    prefs.putInt(PREFIX + HARDWARE_BUFFER_SIZE, hardwareBufferSize);
    prefs.putBoolean(PREFIX + SOFTWARE_BUFFER_ENABLED, softwareBufferEnabled);
    prefs.putInt(PREFIX + SOFTWARE_BUFFER_SIZE, softwareBufferSize);
    prefs.putBoolean(PREFIX + NOTE_AMPS_ENABLED, noteAmpsEnabled);
    prefs.putBoolean(PREFIX + WARNINGS_ENABLED, warningsEnabled);
    prefs.putBoolean(PREFIX + OUT_OF_RANGE_ENABLED, outOfRangeEnabled);
    prefs.putBoolean(PREFIX + BENCHMARK_ENABLED, benchmarkEnabled);
    prefs.putBoolean(PREFIX + DISPLAYS_DISABLED, displaysDisabled);
    prefs.put(PREFIX + ADVANCED_SETTINGS, advancedSettings);
    prefs.putBoolean(PREFIX + USE_ZERO_DBFS, useZeroDbFS);
    prefs.put(PREFIX + ZERO_DB_FS, zeroDbFS);
    prefs.put(PREFIX + REALTIME_RENDER_SERVICE_FACTORY, renderServiceFactory.toString());
    try {
        prefs.sync();
    } catch (BackingStoreException ex) {
        Exceptions.printStackTrace(ex);
    }
}
Also used : BackingStoreException(java.util.prefs.BackingStoreException) NbPreferences(org.openide.util.NbPreferences) Preferences(java.util.prefs.Preferences)

Example 24 with BackingStoreException

use of java.util.prefs.BackingStoreException in project blue by kunstmusik.

the class PlaybackSettings method save.

public void save() {
    final Preferences prefs = NbPreferences.forModule(PlaybackSettings.class);
    prefs.putInt(PREFIX + PLAYBACK_FPS, playbackFPS);
    prefs.putFloat(PREFIX + PLAYBACK_LATENCY_CORRECTION, playbackLatencyCorrection);
    try {
        prefs.sync();
    } catch (BackingStoreException ex) {
        Exceptions.printStackTrace(ex);
    }
}
Also used : BackingStoreException(java.util.prefs.BackingStoreException) NbPreferences(org.openide.util.NbPreferences) Preferences(java.util.prefs.Preferences)

Example 25 with BackingStoreException

use of java.util.prefs.BackingStoreException in project gephi by gephi.

the class PaletteManager method store.

private void store() {
    Preferences prefs = getPreferences();
    // clear the backing store
    try {
        prefs.clear();
    } catch (BackingStoreException ex) {
    }
    int i = 0;
    for (Palette palette : recentPalette) {
        try {
            prefs.putByteArray(COLORS + i, serializeColors(palette.getColors()));
        } catch (Exception e) {
            Exceptions.printStackTrace(e);
        }
        i++;
    }
}
Also used : BackingStoreException(java.util.prefs.BackingStoreException) Preferences(java.util.prefs.Preferences) NbPreferences(org.openide.util.NbPreferences) IOException(java.io.IOException) BackingStoreException(java.util.prefs.BackingStoreException)

Aggregations

BackingStoreException (java.util.prefs.BackingStoreException)112 Preferences (java.util.prefs.Preferences)95 NbPreferences (org.openide.util.NbPreferences)14 File (java.io.File)11 IOException (java.io.IOException)10 ArrayList (java.util.ArrayList)9 HashMap (java.util.HashMap)4 AutoCompletePreferences (org.jabref.logic.autocompleter.AutoCompletePreferences)4 FieldContentParserPreferences (org.jabref.logic.bibtex.FieldContentParserPreferences)4 LatexFieldFormatterPreferences (org.jabref.logic.bibtex.LatexFieldFormatterPreferences)4 BibtexKeyPatternPreferences (org.jabref.logic.bibtexkeypattern.BibtexKeyPatternPreferences)4 CleanupPreferences (org.jabref.logic.cleanup.CleanupPreferences)4 ImportFormatPreferences (org.jabref.logic.importer.ImportFormatPreferences)4 JournalAbbreviationPreferences (org.jabref.logic.journals.JournalAbbreviationPreferences)4 LayoutFormatterPreferences (org.jabref.logic.layout.LayoutFormatterPreferences)4 FileLinkPreferences (org.jabref.logic.layout.format.FileLinkPreferences)4 NameFormatterPreferences (org.jabref.logic.layout.format.NameFormatterPreferences)4 ProxyPreferences (org.jabref.logic.net.ProxyPreferences)4 OpenOfficePreferences (org.jabref.logic.openoffice.OpenOfficePreferences)4 ProtectedTermsPreferences (org.jabref.logic.protectedterms.ProtectedTermsPreferences)4