Changeset 18193 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2021-09-03T03:12:33+02:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r18116 r18193 780 780 /** 781 781 * Gets a unique toolbar key to store this layer as toolbar item 782 * @return The k ay.782 * @return The key. 783 783 */ 784 784 public String getToolbarName() { -
trunk/src/org/openstreetmap/josm/data/osm/event/IDataSelectionListener.java
r17867 r18193 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.osm.event; 3 4 import java.util.Collections; 5 import java.util.HashSet; 6 import java.util.LinkedHashSet; 7 import java.util.Set; 8 import java.util.stream.Collectors; 9 import java.util.stream.Stream; 3 10 4 11 import org.openstreetmap.josm.data.osm.DataSelectionListener; … … 10 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 11 18 import org.openstreetmap.josm.tools.CheckParameterUtil; 12 13 import java.util.Collections;14 import java.util.HashSet;15 import java.util.LinkedHashSet;16 import java.util.Set;17 import java.util.stream.Collectors;18 import java.util.stream.Stream;19 19 20 20 /** … … 266 266 267 267 /** 268 * Create a {@ link DataSelectionListener.SelectionRemoveEvent}268 * Create a {@code SelectionRemoveEvent} 269 269 * @param source The source dataset 270 270 * @param old The old primitives that were previously selected. The caller needs to ensure that this set is not modified. -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerRule.java
r17642 r18193 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.validation.tests; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 6 import java.awt.geom.Area; 7 import java.io.Reader; 8 import java.io.StringReader; 9 import java.util.ArrayList; 10 import java.util.Collection; 11 import java.util.HashMap; 12 import java.util.HashSet; 13 import java.util.List; 14 import java.util.Map; 15 import java.util.Objects; 16 import java.util.Optional; 17 import java.util.Set; 18 import java.util.function.Predicate; 19 import java.util.regex.Matcher; 20 import java.util.regex.Pattern; 21 import java.util.stream.Collectors; 3 22 4 23 import org.openstreetmap.josm.command.Command; … … 29 48 import org.openstreetmap.josm.tools.Logging; 30 49 import org.openstreetmap.josm.tools.Utils; 31 32 import java.awt.geom.Area;33 import java.io.Reader;34 import java.io.StringReader;35 import java.util.ArrayList;36 import java.util.Collection;37 import java.util.HashMap;38 import java.util.HashSet;39 import java.util.List;40 import java.util.Map;41 import java.util.Objects;42 import java.util.Optional;43 import java.util.Set;44 import java.util.function.Predicate;45 import java.util.regex.Matcher;46 import java.util.regex.Pattern;47 import java.util.stream.Collectors;48 49 import static org.openstreetmap.josm.tools.I18n.tr;50 50 51 51 /** … … 227 227 /** 228 228 * Determines the {@code index}-th key/value/tag (depending on {@code type}) of the 229 * {@link Selector.GeneralSelector}.229 * {@link org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector}. 230 230 * 231 231 * @param matchingSelector matching selector -
trunk/src/org/openstreetmap/josm/data/vector/DataStore.java
r17867 r18193 25 25 * A class that stores data (essentially a simple {@link DataSet}) 26 26 * @author Taylor Smock 27 * @param <O> Type of OSM primitive 28 * @param <N> Type of node 29 * @param <W> Type of way 30 * @param <R> Type of relation 27 31 * @since 17862 28 32 */ -
trunk/src/org/openstreetmap/josm/data/vector/VectorDataSet.java
r18052 r18193 36 36 import org.openstreetmap.josm.data.osm.event.IDataSelectionEventSource; 37 37 import org.openstreetmap.josm.data.osm.event.IDataSelectionListener; 38 import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionAddEvent; 39 import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionChangeEvent; 40 import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionRemoveEvent; 41 import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionReplaceEvent; 42 import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionToggleEvent; 38 43 import org.openstreetmap.josm.gui.mappaint.ElemStyles; 39 44 import org.openstreetmap.josm.tools.ListenerList; … … 296 301 297 302 /** 298 * Get the current Read/Write lock 299 * @implNoteThis changes based off of zoom level. Please do not use this in a finally block303 * Get the current Read/Write lock. 304 * This changes based off of zoom level. Please do not use this in a finally block 300 305 * @return The current read/write lock 301 306 */ … … 328 333 329 334 /** 330 * Mark some primitives as highlighted 335 * Mark some primitives as highlighted. 336 * API is *highly likely* to change, as the inherited methods are modified to accept primitives other than OSM primitives. 331 337 * @param primitives The primitives to highlight 332 * @apiNote This is *highly likely* to change, as the inherited methods are modified to accept primitives other than OSM primitives.333 338 */ 334 339 public void setHighlighted(Collection<PrimitiveId> primitives) { … … 423 428 424 429 private void toggleSelectedImpl(Stream<? extends PrimitiveId> osm) { 425 this.doSelectionChange(old -> new IDataSelectionListener.SelectionToggleEvent<>(this, old,430 this.doSelectionChange(old -> new SelectionToggleEvent<>(this, old, 426 431 osm.flatMap(this::getPrimitivesById).filter(Objects::nonNull))); 427 432 } … … 438 443 439 444 private void setSelectedImpl(Stream<? extends PrimitiveId> osm) { 440 this.doSelectionChange(old -> new IDataSelectionListener.SelectionReplaceEvent<>(this, old,445 this.doSelectionChange(old -> new SelectionReplaceEvent<>(this, old, 441 446 osm.filter(Objects::nonNull).flatMap(this::getPrimitivesById).filter(Objects::nonNull))); 442 447 } … … 453 458 454 459 private void addSelectedImpl(Stream<? extends PrimitiveId> osm) { 455 this.doSelectionChange(old -> new IDataSelectionListener.SelectionAddEvent<>(this, old,460 this.doSelectionChange(old -> new SelectionAddEvent<>(this, old, 456 461 osm.flatMap(this::getPrimitivesById).filter(Objects::nonNull))); 457 462 } … … 473 478 474 479 private void clearSelectionImpl(Stream<? extends PrimitiveId> osm) { 475 this.doSelectionChange(old -> new IDataSelectionListener.SelectionRemoveEvent<>(this, old,480 this.doSelectionChange(old -> new SelectionRemoveEvent<>(this, old, 476 481 osm.flatMap(this::getPrimitivesById).filter(Objects::nonNull))); 477 482 } … … 481 486 * <p> 482 487 * This is the only method that changes the current selection state. 483 * @param command A generator that generates the {@link DataSelectionListener.SelectionChangeEvent}488 * @param command A generator that generates the {@link SelectionChangeEvent} 484 489 * for the given base set of currently selected primitives. 485 490 * @return true iff the command did change the selection. 486 491 */ 487 492 private boolean doSelectionChange(final Function<Set<VectorPrimitive>, 488 IDataSelectionListener.SelectionChangeEvent<VectorPrimitive, VectorNode, VectorWay, VectorRelation, VectorDataSet>> command) {493 SelectionChangeEvent<VectorPrimitive, VectorNode, VectorWay, VectorRelation, VectorDataSet>> command) { 489 494 synchronized (this.selectionLock) { 490 IDataSelectionListener.SelectionChangeEvent<VectorPrimitive, VectorNode, VectorWay, VectorRelation, VectorDataSet> event =495 SelectionChangeEvent<VectorPrimitive, VectorNode, VectorWay, VectorRelation, VectorDataSet> event = 491 496 command.apply(currentSelectedPrimitives.stream().map(this::getPrimitiveById).collect(Collectors.toSet())); 492 497 if (event.isNop()) { … … 570 575 * Try to read something (here to avoid boilerplate) 571 576 * 577 * @param lock The lock 572 578 * @param supplier The reading function 573 579 * @param <T> The return type … … 589 595 /** 590 596 * Try to write something (here to avoid boilerplate) 591 * 597 * @param lock lock 592 598 * @param runnable The writing function 593 599 */ -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompComboBox.java
r18192 r18193 221 221 * @deprecated Has been moved to the model, where it belongs. Use 222 222 * {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel#addAllStrings} instead. Probably you want to use 223 * {@link org.openstreetmap.josm.gui. widgets.HistoryComboBoxModel.Preferences#load} and224 * {@link org.openstreetmap.josm.gui. widgets.HistoryComboBoxModel.Preferences#save}.223 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and 224 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}. 225 225 */ 226 226 @Deprecated … … 239 239 * @deprecated Has been moved to the model, where it belongs. Use 240 240 * {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel#addAllStrings} instead. Probably you want to use 241 * {@link org.openstreetmap.josm.gui. widgets.HistoryComboBoxModel.Preferences#load} and242 * {@link org.openstreetmap.josm.gui. widgets.HistoryComboBoxModel.Preferences#save}.241 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and 242 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}. 243 243 */ 244 244 @Deprecated -
trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java
r18173 r18193 39 39 * @return the items as strings 40 40 * @deprecated Has been moved to the model, where it belongs. Use 41 * {@link HistoryComboBoxModel#asStringList} instead. 42 * {@link HistoryComboBoxModel.Preferences#load} and43 * {@link HistoryComboBoxModel.Preferences#save}.41 * {@link HistoryComboBoxModel#asStringList} instead. Probably you want to use 42 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and 43 * {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}. 44 44 */ 45 45 @Deprecated
Note:
See TracChangeset
for help on using the changeset viewer.