Logo Search packages:      
Sourcecode: jlgui version File versions  Download package

void javazoom::jlgui::player::amp::util::Config::load (  )  [inline]

Loads configuration.

Definition at line 550 of file Config.java.

References javazoom::jlgui::player::amp::util::ini::Configuration::add(), javazoom::jlgui::player::amp::util::ini::Configuration::get(), javazoom::jlgui::player::amp::util::ini::Configuration::getBoolean(), and javazoom::jlgui::player::amp::util::ini::Configuration::getInt().

Referenced by load().

    {
        _config = new Configuration(CONFIG_FILE_NAME);
        // Creates config entries if needed.
        if (_config.get(AUDIO_DEVICE) == null) _config.add(AUDIO_DEVICE, _audioDevice);
        if (_config.get(VISUAL_MODE) == null) _config.add(VISUAL_MODE, _visualMode);
        if (_config.get(LAST_URL) == null) _config.add(LAST_URL, _lastUrl);
        if (_config.get(LAST_EQUALIZER) == null) _config.add(LAST_EQUALIZER, _lastEqualizer);
        if (_config.get(LAST_DIR) == null) _config.add(LAST_DIR, _lastDir);
        if (_config.get(LAST_SKIN_DIR) == null) _config.add(LAST_SKIN_DIR, _lastSkinDir);
        if (_config.get(TAGINFO_POLICY) == null) _config.add(TAGINFO_POLICY, _taginfoPolicy);
        if (_config.getInt(ORIGINE_X) == -1) _config.add(ORIGINE_X, _x);
        if (_config.getInt(ORIGINE_Y) == -1) _config.add(ORIGINE_Y, _y);
        if (_config.get(LAST_SKIN) == null) _config.add(LAST_SKIN, _defaultSkin);
        if (_config.get(LAST_PLAYLIST) == null) _config.add(LAST_PLAYLIST, _playlistFilename);
        if (_config.get(PLAYLIST_IMPL) == null) _config.add(PLAYLIST_IMPL, _playlist);
        if (_config.get(TAGINFO_MPEG_IMPL) == null) _config.add(TAGINFO_MPEG_IMPL, _taginfoMpeg);
        if (_config.get(TAGINFO_OGGVORBIS_IMPL) == null) _config.add(TAGINFO_OGGVORBIS_IMPL, _taginfoOggVorbis);
        if (_config.get(TAGINFO_APE_IMPL) == null) _config.add(TAGINFO_APE_IMPL, _taginfoAPE);
        if (_config.get(TAGINFO_FLAC_IMPL) == null) _config.add(TAGINFO_FLAC_IMPL, _taginfoFlac);
        if (_config.get(EXTENSIONS) == null) _config.add(EXTENSIONS, _extensions);
        if (_config.get(PROXY_SERVER) == null) _config.add(PROXY_SERVER, _proxyServer);
        if (_config.getInt(PROXY_PORT) == -1) _config.add(PROXY_PORT, _proxyPort);
        if (_config.getInt(VOLUME_VALUE) == -1) _config.add(VOLUME_VALUE, _volume);
        if (_config.get(PROXY_LOGIN) == null) _config.add(PROXY_LOGIN, _proxyLogin);
        if (_config.get(PROXY_PASSWORD) == null) _config.add(PROXY_PASSWORD, _proxyPassword);
        if (!_config.getBoolean(PLAYLIST_ENABLED)) _config.add(PLAYLIST_ENABLED, _playlistEnabled);
        if (!_config.getBoolean(SHUFFLE_ENABLED)) _config.add(SHUFFLE_ENABLED, _shuffleEnabled);
        if (!_config.getBoolean(REPEAT_ENABLED)) _config.add(REPEAT_ENABLED, _repeatEnabled);
        if (!_config.getBoolean(EQUALIZER_ENABLED)) _config.add(EQUALIZER_ENABLED, _equalizerEnabled);
        if (!_config.getBoolean(EQUALIZER_ON)) _config.add(EQUALIZER_ON, _equalizerOn);
        if (!_config.getBoolean(EQUALIZER_AUTO)) _config.add(EQUALIZER_AUTO, _equalizerAuto);
        if (!_config.getBoolean(SCREEN_LIMIT)) _config.add(SCREEN_LIMIT, _screenLimit);
        // Reads config entries
        _audioDevice = _config.get(AUDIO_DEVICE, _audioDevice);
        _visualMode = _config.get(VISUAL_MODE, _visualMode);
        _lastUrl = _config.get(LAST_URL, _lastUrl);
        _lastEqualizer = _config.get(LAST_EQUALIZER, _lastEqualizer);
        _lastDir = _config.get(LAST_DIR, _lastDir);
        _lastSkinDir = _config.get(LAST_SKIN_DIR, _lastSkinDir);
        _x = _config.getInt(ORIGINE_X, _x);
        _y = _config.getInt(ORIGINE_Y, _y);
        _defaultSkin = _config.get(LAST_SKIN, _defaultSkin);
        _playlistFilename = _config.get(LAST_PLAYLIST, _playlistFilename);
        _taginfoPolicy = _config.get(TAGINFO_POLICY, _taginfoPolicy);
        _extensions = _config.get(EXTENSIONS, _extensions);
        _playlist = _config.get(PLAYLIST_IMPL, _playlist);
        _taginfoMpeg = _config.get(TAGINFO_MPEG_IMPL, _taginfoMpeg);
        _taginfoOggVorbis = _config.get(TAGINFO_OGGVORBIS_IMPL, _taginfoOggVorbis);
        _taginfoAPE = _config.get(TAGINFO_APE_IMPL, _taginfoAPE);
        _taginfoFlac = _config.get(TAGINFO_FLAC_IMPL, _taginfoFlac);
        _proxyServer = _config.get(PROXY_SERVER, _proxyServer);
        _proxyPort = _config.getInt(PROXY_PORT, _proxyPort);
        _volume = _config.getInt(VOLUME_VALUE, _volume);
        _proxyLogin = _config.get(PROXY_LOGIN, _proxyLogin);
        _proxyPassword = _config.get(PROXY_PASSWORD, _proxyPassword);
        _playlistEnabled = _config.getBoolean(PLAYLIST_ENABLED, _playlistEnabled);
        _shuffleEnabled = _config.getBoolean(SHUFFLE_ENABLED, _shuffleEnabled);
        _repeatEnabled = _config.getBoolean(REPEAT_ENABLED, _repeatEnabled);
        _equalizerEnabled = _config.getBoolean(EQUALIZER_ENABLED, _equalizerEnabled);
        _equalizerOn = _config.getBoolean(EQUALIZER_ON, _equalizerOn);
        _equalizerAuto = _config.getBoolean(EQUALIZER_AUTO, _equalizerAuto);
        _screenLimit = _config.getBoolean(SCREEN_LIMIT, _screenLimit);
    }


Generated by  Doxygen 1.6.0   Back to index