001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.plugins; 003 004import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 005import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory; 006 007/** 008 * Preference settings factory for plugins. 009 * @since 1742 010 */ 011public class PluginPreferenceFactory implements PreferenceSettingFactory { 012 013 private final PluginProxy plugin; 014 015 /** 016 * Constructs a new {@code PluginPreferenceFactory}. 017 * @param plugin plugin proxy 018 */ 019 public PluginPreferenceFactory(PluginProxy plugin) { 020 this.plugin = plugin; 021 } 022 023 @Override 024 public PreferenceSetting createPreferenceSetting() { 025 return plugin.getPreferenceSetting(); 026 } 027 028}