Ignore:
Timestamp:
2017-09-21T12:41:32+02:00 (22 months ago)
Author:
bastiK
Message:

see #15229 - move remaining classes to spi.preferences package, to make it self-contained

  • extract event listener classes from Preferences (duplicated, for smooth transition)
  • move *Setting classes
Location:
trunk/src/org/openstreetmap/josm/spi/preferences
Files:
3 added
2 edited
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/spi/preferences/AbstractPreferences.java

    r12853 r12881  
    55import java.util.Map;
    66
    7 import org.openstreetmap.josm.data.preferences.ListListSetting;
    8 import org.openstreetmap.josm.data.preferences.ListSetting;
    9 import org.openstreetmap.josm.data.preferences.MapListSetting;
    10 import org.openstreetmap.josm.data.preferences.Setting;
    11 import org.openstreetmap.josm.data.preferences.StringSetting;
    127import org.openstreetmap.josm.tools.Logging;
    138
  • trunk/src/org/openstreetmap/josm/spi/preferences/AbstractSetting.java

    r12879 r12881  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.data.preferences;
     2package org.openstreetmap.josm.spi.preferences;
    33
    44import java.util.Objects;
     
    88 *
    99 * @param <T> The setting type
    10  * @since 9759
     10 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences})
    1111 */
    1212public abstract class AbstractSetting<T> implements Setting<T> {
  • trunk/src/org/openstreetmap/josm/spi/preferences/IPreferences.java

    r12853 r12881  
    55import java.util.List;
    66import java.util.Map;
    7 
    8 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
    97
    108/**
  • trunk/src/org/openstreetmap/josm/spi/preferences/ListListSetting.java

    r12879 r12881  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.data.preferences;
     2package org.openstreetmap.josm.spi.preferences;
    33
    44import java.util.ArrayList;
     
    99/**
    1010 * Setting containing a {@link List} of {@code List}s of {@link String} values.
    11  * @since 9759
     11 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences})
    1212 */
    1313public class ListListSetting extends AbstractSetting<List<List<String>>> {
  • trunk/src/org/openstreetmap/josm/spi/preferences/ListSetting.java

    r12879 r12881  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.data.preferences;
     2package org.openstreetmap.josm.spi.preferences;
    33
    44import java.util.ArrayList;
     
    99/**
    1010 * Setting containing a {@link List} of {@link String} values.
    11  * @since 9759
     11 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences})
    1212 */
    1313public class ListSetting extends AbstractSetting<List<String>> {
  • trunk/src/org/openstreetmap/josm/spi/preferences/MapListSetting.java

    r12879 r12881  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.data.preferences;
     2package org.openstreetmap.josm.spi.preferences;
    33
    44import java.util.ArrayList;
     
    1010/**
    1111 * Setting containing a {@link List} of {@link Map}s of {@link String} values.
    12  * @since 9759
     12 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences})
    1313 */
    1414public class MapListSetting extends AbstractSetting<List<Map<String, String>>> {
  • trunk/src/org/openstreetmap/josm/spi/preferences/Setting.java

    r12879 r12881  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.data.preferences;
    3 
    4 import org.openstreetmap.josm.data.Preferences;
     2package org.openstreetmap.josm.spi.preferences;
    53
    64/**
     
    108 *
    119 * @param <T> the data type for the value
    12  * @since 9759
     10 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences})
    1311 */
    1412public interface Setting<T> {
     
    7270     * For default preferences. A setting is marked as new, if it has been seen
    7371     * in the current session.
    74      * Methods like {@link Preferences#get(java.lang.String, java.lang.String)},
     72     * Methods like {@link IPreferences#get(java.lang.String, java.lang.String)},
    7573     * can be called from different parts of the code with the same key. In this case,
    7674     * the supplied default value must match. However, this is only an error if the mismatching
  • trunk/src/org/openstreetmap/josm/spi/preferences/SettingVisitor.java

    r12879 r12881  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.data.preferences;
     2package org.openstreetmap.josm.spi.preferences;
    33
    44/**
    55 * Visitor interface for {@link Setting} implementations.
    6  * @since 9759
     6 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences})
    77 */
    88public interface SettingVisitor {
  • trunk/src/org/openstreetmap/josm/spi/preferences/StringSetting.java

    r12879 r12881  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.data.preferences;
     2package org.openstreetmap.josm.spi.preferences;
    33
    44/**
    55 * Setting containing a {@link String} value.
    6  * @since 9759
     6 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences})
    77 */
    88public class StringSetting extends AbstractSetting<String> {
Note: See TracChangeset for help on using the changeset viewer.