Ignore:
Timestamp:
2017-11-28T00:56:29+01:00 (2 years ago)
Author:
Don-vip
Message:

see #15310 - remove most of deprecated APIs

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Changeset.java

    r12809 r13173  
    105105
    106106    /**
    107      * Visitor pattern.
    108      * @param v visitor
    109      * @deprecated no longer supported
    110      */
    111     @Deprecated
    112     public void visit(org.openstreetmap.josm.data.osm.visitor.Visitor v) {
    113         v.visit(this);
    114     }
    115 
    116     /**
    117107     * Compares this changeset to another, based on their identifier.
    118108     * @param other other changeset
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r13161 r13173  
    5555import org.openstreetmap.josm.data.projection.ProjectionChangeListener;
    5656import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    57 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager;
    5857import org.openstreetmap.josm.tools.ListenerList;
    5958import org.openstreetmap.josm.tools.Logging;
     
    208207        // the listener, projection change listeners are managed as WeakReferences.
    209208        Main.addProjectionChangeListener(this);
    210         addSelectionListener((DataSelectionListener) e -> fireDeprecatedSelectionChange(e.getSelection()));
     209        addSelectionListener((DataSelectionListener) e -> fireSelectionChange(e.getSelection()));
    211210    }
    212211
     
    335334
    336335    /**
    337      * Returns the autocompletion manager, which maintains a list of used tags for autocompletion.
    338      * @return the autocompletion manager
    339      * @deprecated to be removed end of 2017. Use {@link AutoCompletionManager#of(DataSet)} instead.
    340      */
    341     @Deprecated
    342     public AutoCompletionManager getAutoCompletionManager() {
    343         return AutoCompletionManager.of(this);
    344     }
    345 
    346     /**
    347336     * The API version that created this data set, if any.
    348337     */
     
    365354    public void setVersion(String version) {
    366355        this.version = version;
    367     }
    368 
    369     /**
    370      * Determines if upload is being discouraged.
    371      * (i.e. this dataset contains private data which should not be uploaded)
    372      * @return {@code true} if upload is being discouraged, {@code false} otherwise
    373      * @see #setUploadDiscouraged
    374      * @deprecated use {@link #getUploadPolicy()}
    375      */
    376     @Deprecated
    377     public boolean isUploadDiscouraged() {
    378         return uploadPolicy == UploadPolicy.DISCOURAGED || uploadPolicy == UploadPolicy.BLOCKED;
    379     }
    380 
    381     /**
    382      * Sets the "upload discouraged" flag.
    383      * @param uploadDiscouraged {@code true} if this dataset contains private data which should not be uploaded
    384      * @see #isUploadDiscouraged
    385      * @deprecated use {@link #setUploadPolicy(UploadPolicy)}
    386      */
    387     @Deprecated
    388     public void setUploadDiscouraged(boolean uploadDiscouraged) {
    389         if (uploadPolicy != UploadPolicy.BLOCKED) {
    390             this.uploadPolicy = uploadDiscouraged ? UploadPolicy.DISCOURAGED : UploadPolicy.NORMAL;
    391         }
    392356    }
    393357
     
    676640    }
    677641
    678     /**
    679      * Notifies all registered {@link SelectionChangedListener} about the current selection in
    680      * this dataset.
    681      * @deprecated You should never need to do this from the outside.
    682      */
    683     @Deprecated
    684     public void fireSelectionChanged() {
    685         fireDeprecatedSelectionChange(getAllSelected());
    686     }
    687 
    688     private static void fireDeprecatedSelectionChange(Collection<? extends OsmPrimitive> currentSelection) {
     642    private static void fireSelectionChange(Collection<? extends OsmPrimitive> currentSelection) {
    689643        for (SelectionChangedListener l : selListeners) {
    690644            l.selectionChanged(currentSelection);
     
    827781        highlightedWaySegments = waySegments;
    828782        fireHighlightingChanged();
    829     }
    830 
    831     /**
    832      * Sets the current selection to the primitives in <code>selection</code>.
    833      * Notifies all {@link SelectionChangedListener} if <code>fireSelectionChangeEvent</code> is true.
    834      *
    835      * @param selection the selection
    836      * @param fireSelectionChangeEvent true, if the selection change listeners are to be notified; false, otherwise
    837      * @deprecated Use {@link #setSelected(Collection)} instead. To be removed end of 2017. Does not seem to be used by plugins.
    838      */
    839     @Deprecated
    840     public void setSelected(Collection<? extends PrimitiveId> selection, boolean fireSelectionChangeEvent) {
    841         setSelected(selection);
    842783    }
    843784
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r13012 r13173  
    9393     * Uses the {@link Main#getProjection() global projection} to project the lat/lon-coordinates.
    9494     * <p>
    95      * Method {@link org.openstreetmap.josm.data.coor.ILatLon#getEastNorth()} of
    96      * implemented interface <code>ILatLon</code> is deprecated, but this method is not.
    9795     * @return the east north coordinates or {@code null} if {@link #isLatLonKnown()}
    9896     * is false.
    9997     */
    100     @SuppressWarnings("deprecation")
    101     @Override
    10298    public EastNorth getEastNorth() {
    10399        return getEastNorth(Main.getProjection());
     
    223219    }
    224220
    225     /**
    226      * @deprecated no longer supported
    227      */
    228     @Override
    229     @Deprecated
    230     public void accept(org.openstreetmap.josm.data.osm.visitor.Visitor visitor) {
    231         visitor.visit(this);
    232     }
    233 
    234221    @Override
    235222    public void accept(OsmPrimitiveVisitor visitor) {
  • trunk/src/org/openstreetmap/josm/data/osm/NodeData.java

    r12778 r13173  
    7575    }
    7676
    77     /**
    78      * @deprecated use {@link #getEastNorth(org.openstreetmap.josm.data.projection.Projecting)}
    79      */
    80     @Override
    81     @Deprecated
    82     public EastNorth getEastNorth() {
    83         // No internal caching of projected coordinates needed. In contrast to getEastNorth()
    84         // on Node, this method is rarely used. Caching would be overkill.
    85         return Main.getProjection().latlon2eastNorth(getCoor());
    86     }
    87 
    8877    @Override
    8978    public void setEastNorth(EastNorth eastNorth) {
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r13070 r13173  
    10241024
    10251025    /**
    1026      * <p>Visits {@code org.openstreetmap.josm.data.osm.visitor.Visitor} for all referrers.</p>
    1027      *
    1028      * @param visitor the visitor. Ignored, if null.
    1029      * @deprecated use {@link #visitReferrers(OsmPrimitiveVisitor)}
    1030      */
    1031     @Deprecated
    1032     public void visitReferrers(org.openstreetmap.josm.data.osm.visitor.Visitor visitor) {
    1033         visitReferrers((OsmPrimitiveVisitor) visitor);
    1034     }
    1035 
    1036     /**
    10371026     * <p>Visits {@code visitor} for all referrers.</p>
    10381027     *
     
    10901079     * visitor function.
    10911080     * @param visitor The visitor from which the visit() function must be called.
    1092      * @deprecated will be removed along with {@link org.openstreetmap.josm.data.osm.visitor.Visitor}
    1093      */
    1094     @Deprecated
    1095     public abstract void accept(org.openstreetmap.josm.data.osm.visitor.Visitor visitor);
    1096 
    1097     /**
    1098      * Implementation of the visitor scheme. Subclasses have to call the correct
    1099      * visitor function.
    1100      * @param visitor The visitor from which the visit() function must be called.
    11011081     * @since 12809
    11021082     */
  • trunk/src/org/openstreetmap/josm/data/osm/Relation.java

    r12846 r13173  
    174174    public OsmPrimitiveType getMemberType(int idx) {
    175175        return members[idx].getType();
    176     }
    177 
    178     /**
    179      * @deprecated no longer supported
    180      */
    181     @Override
    182     @Deprecated
    183     public void accept(org.openstreetmap.josm.data.osm.visitor.Visitor visitor) {
    184         visitor.visit(this);
    185176    }
    186177
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r13033 r13173  
    205205        }
    206206        return chunkSet;
    207     }
    208 
    209     /**
    210      * @deprecated no longer supported
    211      */
    212     @Deprecated
    213     @Override public void accept(org.openstreetmap.josm.data.osm.visitor.Visitor visitor) {
    214         visitor.visit(this);
    215207    }
    216208
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r13150 r13173  
    472472     * be replaced by plain fill, when it covers a certain fraction of the total area
    473473     * @param disabled If this should be drawn with a special disabled style.
    474      * @param text Ignored. Use {@link #drawText} instead.
    475      * @deprecated use {@link #drawArea(Relation r, Color color, MapImage fillImage, Float extent, Float extentThreshold, boolean disabled)}
    476      */
    477     @Deprecated
    478     public void drawArea(Relation r, Color color, MapImage fillImage, Float extent, Float extentThreshold, boolean disabled, TextLabel text) {
    479         drawArea(r, color, fillImage, extent, extentThreshold, disabled);
    480     }
    481 
    482     /**
    483      * Draws a multipolygon area.
    484      * @param r The multipolygon relation
    485      * @param color The color to fill the area with.
    486      * @param fillImage The image to fill the area with. Overrides color.
    487      * @param extent if not null, area will be filled partially; specifies, how
    488      * far to fill from the boundary towards the center of the area;
    489      * if null, area will be filled completely
    490      * @param extentThreshold if not null, determines if the partial filled should
    491      * be replaced by plain fill, when it covers a certain fraction of the total area
    492      * @param disabled If this should be drawn with a special disabled style.
    493474     * @since 12285
    494475     */
     
    516497            }
    517498        }
    518     }
    519 
    520     /**
    521      * Draws an area defined by a way. They way does not need to be closed, but it should.
    522      * @param w The way.
    523      * @param color The color to fill the area with.
    524      * @param fillImage The image to fill the area with. Overrides color.
    525      * @param extent if not null, area will be filled partially; specifies, how
    526      * far to fill from the boundary towards the center of the area;
    527      * if null, area will be filled completely
    528      * @param extentThreshold if not null, determines if the partial filled should
    529      * be replaced by plain fill, when it covers a certain fraction of the total area
    530      * @param disabled If this should be drawn with a special disabled style.
    531      * @param text Ignored. Use {@link #drawText} instead.
    532      * @deprecated use {@link #drawArea(Way w, Color color, MapImage fillImage, Float extent, Float extentThreshold, boolean disabled)}
    533      */
    534     @Deprecated
    535     public void drawArea(Way w, Color color, MapImage fillImage, Float extent, Float extentThreshold, boolean disabled, TextLabel text) {
    536         drawArea(w, color, fillImage, extent, extentThreshold, disabled);
    537499    }
    538500
Note: See TracChangeset for help on using the changeset viewer.