Changeset 34562 in osm for applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java
- Timestamp:
- 2018-08-18T20:27:59+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java
r33839 r34562 13 13 import java.util.ArrayList; 14 14 import java.util.Iterator; 15 import java.util.List;16 15 import java.util.TreeSet; 17 16 … … 23 22 import javax.swing.JTextField; 24 23 25 import org.openstreetmap.josm.Main;26 24 import org.openstreetmap.josm.data.osm.Node; 25 import org.openstreetmap.josm.data.osm.OsmDataManager; 27 26 import org.openstreetmap.josm.data.osm.OsmPrimitive; 28 27 import org.openstreetmap.josm.data.osm.Way; 29 import org.openstreetmap.josm.data.tagging.ac.AutoCompletionItem;30 import org.openstreetmap.josm.data.tagging.ac.AutoCompletionSet;31 28 import org.openstreetmap.josm.gui.ExtendedDialog; 32 29 import org.openstreetmap.josm.gui.MainApplication; … … 34 31 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager; 35 32 import org.openstreetmap.josm.gui.util.WindowGeometry; 33 import org.openstreetmap.josm.spi.preferences.Config; 36 34 import org.openstreetmap.josm.tools.GBC; 37 35 … … 96 94 public HouseNumberInputDialog(HouseNumberInputHandler handler, Way street, String streetName, 97 95 String buildingType, boolean relationExists, ArrayList<Node> housenumbers) { 98 super(Main .parent,96 super(MainApplication.getMainFrame(), 99 97 tr("Terrace a house"), 100 98 new String[] {tr("OK"), tr("Cancel")}, … … 117 115 getRootPane().setDefaultButton(defaultButton); 118 116 pack(); 119 setRememberWindowGeometry(getClass().getName() + ".geometry", WindowGeometry.centerInWindow(Main .parent, getPreferredSize()));117 setRememberWindowGeometry(getClass().getName() + ".geometry", WindowGeometry.centerInWindow(MainApplication.getMainFrame(), getPreferredSize())); 120 118 lo.requestFocusInWindow(); 121 119 } … … 179 177 final String txt = relationExists ? tr("add to existing associatedStreet relation") : tr("create an associatedStreet relation"); 180 178 181 handleRelationCheckBox = new JCheckBox(txt, relationExists ? Main.pref.getBoolean(HANDLE_RELATION, true) : false);182 keepOutlineCheckBox = new JCheckBox(tr("keep outline way"), Main.pref.getBoolean(KEEP_OUTLINE, false));179 handleRelationCheckBox = new JCheckBox(txt, relationExists ? Config.getPref().getBoolean(HANDLE_RELATION, true) : false); 180 keepOutlineCheckBox = new JCheckBox(tr("keep outline way"), Config.getPref().getBoolean(KEEP_OUTLINE, false)); 183 181 184 182 inputPanel = new JPanel(); … … 314 312 if (buildingComboBox == null) { 315 313 buildingComboBox = new AutoCompletingComboBox(); 316 buildingComboBox.setPossibleAcItems(AutoCompletionManager.of( Main.main.getEditDataSet()).getTagValues("building"));314 buildingComboBox.setPossibleAcItems(AutoCompletionManager.of(OsmDataManager.getInstance().getEditDataSet()).getTagValues("building")); 317 315 buildingComboBox.setEditable(true); 318 316 if (buildingType != null && !buildingType.isEmpty()) { … … 333 331 if (segments == null) { 334 332 segments = new JTextField(); 335 segments.setText( Main.pref.get(DEFAULT_SEGMENTS, "2"));333 segments.setText(Config.getPref().get(DEFAULT_SEGMENTS, "2")); 336 334 } 337 335 return segments; … … 348 346 interpolation.add(tr("All")); 349 347 interpolation.add(tr("Even/Odd")); 350 if ( Main.pref.getInt(INTERPOLATION, 2) == 1) {348 if (Config.getPref().getInt(INTERPOLATION, 2) == 1) { 351 349 interpolation.select(tr("All")); 352 350 } else {
Note:
See TracChangeset
for help on using the changeset viewer.