Changeset 35829 in osm for applications/editors/josm/plugins/reltoolbox/src
- Timestamp:
- 2021-10-03T14:14:25+02:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/reltoolbox/src/relcontext
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/ExtraNameFormatHook.java
r33530 r35829 15 15 16 16 @Override 17 public String checkRelationTypeName(IRelation relation, String defaultName) { 17 public String checkRelationTypeName(IRelation<?> relation, String defaultName) { 18 18 return null; 19 19 } … … 25 25 26 26 @Override 27 public String checkFormat(IWay way, String defaultName) { 27 public String checkFormat(IWay<?> way, String defaultName) { 28 28 if (way.get("place") != null && way.get("name") == null && way.get("place_name") != null) 29 29 return way.get("place_name") + " " + defaultName; … … 32 32 33 33 @Override 34 public String checkFormat(IRelation relation, String defaultName) { 34 public String checkFormat(IRelation<?> relation, String defaultName) { 35 35 String type = relation.get("type"); 36 36 if (type != null) { -
applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java
r34788 r35829 78 78 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 79 79 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 80 import org.openstreetmap.josm.gui.tagging.ac.AutoComp letingComboBox;80 import org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBox; 81 81 import org.openstreetmap.josm.spi.preferences.Config; 82 82 import org.openstreetmap.josm.tools.GBC; … … 481 481 } 482 482 } 483 final AutoComp letingComboBox role = new AutoCompletingComboBox();484 role. setPossibleItems(items);483 final AutoCompComboBox<String> role = new AutoCompComboBox<>(); 484 role.getModel().addAllElements(items); 485 485 role.setEditable(true); 486 486 -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateRelationAction.java
r34551 r35829 27 27 import org.openstreetmap.josm.data.osm.RelationMember; 28 28 import org.openstreetmap.josm.gui.MainApplication; 29 import org.openstreetmap.josm.gui.tagging.ac.AutoComp letingComboBox;29 import org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBox; 30 30 import org.openstreetmap.josm.spi.preferences.Config; 31 31 import org.openstreetmap.josm.tools.GBC; … … 103 103 panel.add(new JLabel(tr("Choose a type for the relation:")), GBC.eol().insets(0, 0, 0, 5)); 104 104 105 final AutoComp letingComboBox keys = new AutoCompletingComboBox();106 keys. setPossibleItems(RELATION_TYPES);105 final AutoCompComboBox<String> keys = new AutoCompComboBox<>(); 106 keys.getModel().addAllElements(RELATION_TYPES); 107 107 keys.setEditable(true); 108 108 keys.getEditor().setItem(Config.getPref().get(PREF_LASTTYPE, "multipolygon")); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java
r35602 r35829 34 34 import org.openstreetmap.josm.data.osm.Way; 35 35 import org.openstreetmap.josm.gui.MainApplication; 36 import org.openstreetmap.josm.tools.ImageProvider;37 36 import org.openstreetmap.josm.tools.Shortcut; 38 37 … … 52 51 public ReconstructPolygonAction(ChosenRelation rel) { 53 52 super(tr("Reconstruct polygon"), "dialogs/filter", tr("Reconstruct polygon from multipolygon relation"), 54 Shortcut.registerShortcut("reltoolbox:reconstructpoly", tr("Relation Toolbox: {0}", tr("Reconstruct polygon from multipolygon relation")), 53 Shortcut.registerShortcut("reltoolbox:reconstructpoly", tr("Relation Toolbox: {0}", 54 tr("Reconstruct polygon from multipolygon relation")), 55 55 KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), false); 56 56 this.rel = rel; -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SplittingMultipolygons.java
r34972 r35829 150 150 * Splits a way with regard to containing relations. This modifies the way and the relation, be prepared. 151 151 * @param w The way. 152 * @param n The node to split at. 152 * @param n1 The first node to split at. 153 * @param n2 The second node to split at. 153 154 * @param commands List of commands to add way/relation changing to. If null, never mind. 154 155 * @return Newly created ways. <b>Warning:</b> if commands is no not, newWays contains {@code w}.
Note:
See TracChangeset
for help on using the changeset viewer.