Changeset 33828 in osm for applications/editors/josm/plugins/indoor_sweepline
- Timestamp:
- 2017-11-17T21:21:04+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/indoor_sweepline
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/indoor_sweepline/build.xml
r32680 r33828 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 0580"/>7 <property name="plugin.main.version" value="12643"/> 8 8 9 9 <property name="plugin.author" value="Roland M. Olbricht"/> -
applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/Beam.java
r32601 r33828 152 152 } 153 153 154 private class StripPosition {154 private static class StripPosition { 155 155 StripPosition(int nodeIndex, double offset) { 156 156 this.nodeIndex = nodeIndex; -
applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweepline.java
r32601 r33828 5 5 import javax.swing.JMenuItem; 6 6 7 import org.openstreetmap.josm. Main;7 import org.openstreetmap.josm.gui.MainApplication; 8 8 import org.openstreetmap.josm.plugins.Plugin; 9 9 import org.openstreetmap.josm.plugins.PluginInformation; … … 21 21 22 22 public static void refreshMenu() { 23 JMenu menu = Main .main.menu.moreToolsMenu;23 JMenu menu = MainApplication.getMenu().moreToolsMenu; 24 24 if (menu.isVisible()) 25 25 menu.addSeparator(); -
applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineController.java
r32601 r33828 6 6 import javax.swing.DefaultComboBoxModel; 7 7 8 import org.openstreetmap.josm.Main;9 8 import org.openstreetmap.josm.data.coor.LatLon; 9 import org.openstreetmap.josm.gui.MainApplication; 10 10 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 11 11 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; … … 17 17 18 18 public IndoorSweeplineController(OsmDataLayer activeLayer, LatLon center) { 19 Main .getLayerManager().addLayerChangeListener(this);19 MainApplication.getLayerManager().addLayerChangeListener(this); 20 20 layer = activeLayer; 21 21 model = new IndoorSweeplineModel(activeLayer, center); -
applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineModel.java
r32601 r33828 3 3 4 4 import java.util.List; 5 import java.util.Objects; 5 6 import java.util.Vector; 6 7 7 8 import javax.swing.DefaultComboBoxModel; 8 9 9 import org.openstreetmap.josm.Main;10 10 import org.openstreetmap.josm.data.coor.LatLon; 11 import org.openstreetmap.josm.gui.MainApplication; 11 12 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 13 … … 197 198 private void updateOsmModel() { 198 199 distributeWays(); 199 Main.map.mapView.repaint(); 200 } 201 202 public class SweepPolygonCursor { 200 MainApplication.getMap().mapView.repaint(); 201 } 202 203 public static class SweepPolygonCursor { 204 public int stripIndex; 205 public int partIndex; 206 203 207 public SweepPolygonCursor(int stripIndex, int partIndex) { 204 208 this.stripIndex = stripIndex; … … 206 210 } 207 211 208 public boolean equals(SweepPolygonCursor rhs) { 209 return rhs != null 210 && stripIndex == rhs.stripIndex && partIndex == rhs.partIndex; 211 } 212 213 public int stripIndex; 214 public int partIndex; 212 @Override 213 public int hashCode() { 214 return Objects.hash(stripIndex, partIndex); 215 } 216 217 @Override 218 public boolean equals(Object obj) { 219 if (this == obj) 220 return true; 221 if (obj == null || getClass() != obj.getClass()) 222 return false; 223 SweepPolygonCursor other = (SweepPolygonCursor) obj; 224 return Objects.equals(partIndex, other.partIndex) 225 && Objects.equals(stripIndex, other.stripIndex); 226 } 215 227 } 216 228 … … 228 240 } 229 241 230 Boolean truePtr = new Boolean(true);242 Boolean truePtr = Boolean.TRUE; 231 243 for (int i = 0; i < stripRefs.size(); ++i) { 232 244 Vector<Boolean> refs = stripRefs.elementAt(i); -
applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineWizardAction.java
r32601 r33828 10 10 import org.openstreetmap.josm.Main; 11 11 import org.openstreetmap.josm.actions.JosmAction; 12 import org.openstreetmap.josm. data.projection.Projections;12 import org.openstreetmap.josm.gui.MainApplication; 13 13 import org.openstreetmap.josm.gui.layer.Layer; 14 14 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; … … 25 25 super(tr("Concourse wizard ..."), null, 26 26 tr("Opens up a wizard to create a concourse"), null, false); 27 Main .getLayerManager().addLayerChangeListener(this);27 MainApplication.getLayerManager().addLayerChangeListener(this); 28 28 } 29 29 … … 36 36 JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent), 37 37 "The default layer is not an OSM layer."); 38 else if (Main .map== null)38 else if (MainApplication.getMap() == null) 39 39 JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent), 40 40 "No map found."); 41 else if (Main .map.mapView == null)41 else if (MainApplication.getMap().mapView == null) 42 42 JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent), 43 43 "No map view found."); 44 44 else 45 45 new IndoorSweeplineController((OsmDataLayer) layer, 46 Projections.inverseProject(Main.map.mapView.getCenter()));46 Main.getProjection().eastNorth2latlon(MainApplication.getMap().mapView.getCenter())); 47 47 } 48 48 49 49 @Override 50 50 public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) { 51 layer = Main .getLayerManager().getActiveLayer();51 layer = MainApplication.getLayerManager().getActiveLayer(); 52 52 } 53 53 -
applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineWizardDialog.java
r32601 r33828 33 33 34 34 import org.openstreetmap.josm.Main; 35 import org.openstreetmap.josm.tools.Logging; 35 36 36 37 public class IndoorSweeplineWizardDialog extends JDialog { … … 90 91 } 91 92 } catch (IllegalStateException ex) { 92 Main.trace(ex);93 Logging.trace(ex); 93 94 } 94 95 … … 96 97 level.setText(controller.getLevel()); 97 98 } catch (IllegalStateException ex) { 98 Main.trace(ex);99 Logging.trace(ex); 99 100 } 100 101 … … 369 370 controller.setStripWidth(beamIndex, Double.parseDouble(stripWidth.getText())); 370 371 } catch (NumberFormatException ex) { 371 Main.trace(ex);372 Logging.trace(ex); 372 373 } 373 374 … … 410 411 } 411 412 412 private class StructureTableModel extends DefaultTableModel {413 private static class StructureTableModel extends DefaultTableModel { 413 414 @Override 414 415 public boolean isCellEditable(int row, int column) { … … 473 474 Double.parseDouble(((TableModel) e.getSource()).getValueAt(row, column).toString())); 474 475 } catch (NumberFormatException ex) { 475 Main.trace(ex);476 Logging.trace(ex); 476 477 } 477 478 } else if (column == 1 && beamIndex % 2 == 0) { … … 492 493 } 493 494 494 private class GridbagPanel extends JPanel {495 private static class GridbagPanel extends JPanel { 495 496 GridbagPanel() { 496 497 gridbag = new GridBagLayout();
Note:
See TracChangeset
for help on using the changeset viewer.