Changeset 32556 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/RasterImageGeoreferencer.java
- Timestamp:
- 2016-07-04T14:18:17+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/RasterImageGeoreferencer.java
r32425 r32556 1 // License: GPL. For details, see LICENSE file. 1 2 package cadastre_fr; 2 3 … … 39 40 private int initialClickDelay; 40 41 41 public void addListener() {42 public void addListener() { 42 43 Main.map.mapView.addMouseListener(this); 43 44 } … … 51 52 mode = cGetCorners; 52 53 countMouseClicked = 0; 53 initialClickDelay = Main.pref.getInteger("cadastrewms.georef-click-delay", 200);54 initialClickDelay = Main.pref.getInteger("cadastrewms.georef-click-delay", 200); 54 55 mouseClickedTime = System.currentTimeMillis(); 55 Object[] options = { "OK", "Cancel"};56 int ret = JOptionPane.showOptionDialog( 56 Object[] options = {"OK", "Cancel"}; 57 int ret = JOptionPane.showOptionDialog(null, 57 58 tr("Click first corner for image cropping\n(two points required)"), 58 59 tr("Image cropping"), … … 75 76 countMouseClicked = 0; 76 77 mode = cGetLambertCrosspieces; 77 initialClickDelay = Main.pref.getInteger("cadastrewms.georef-click-delay", 200);78 initialClickDelay = Main.pref.getInteger("cadastrewms.georef-click-delay", 200); 78 79 mouseClickedTime = System.currentTimeMillis(); 79 Object[] options = { "OK", "Cancel"};80 int ret = JOptionPane.showOptionDialog( 80 Object[] options = {"OK", "Cancel"}; 81 int ret = JOptionPane.showOptionDialog(null, 81 82 tr("Click first Lambert crosspiece for georeferencing\n(two points required)"), 82 83 tr("Image georeferencing"), … … 91 92 } 92 93 93 public boolean isRunning() 94 { 94 public boolean isRunning() { 95 95 return (countMouseClicked != 0 || mode != 0); 96 96 } … … 101 101 Main.info("mouse click bounce detected"); 102 102 return; // mouse click anti-bounce 103 } 104 else 103 } else 105 104 mouseClickedTime = System.currentTimeMillis(); 106 105 if (e.getButton() != MouseEvent.BUTTON1) … … 115 114 // ignore clicks outside the image 116 115 if (ea.east() < wmsLayer.getImage(0).min.east() || ea.east() > wmsLayer.getImage(0).max.east() 117 || ea.north() < wmsLayer.getImage(0).min.north() || ea.north() > wmsLayer.getImage(0).max.north()) 118 { 116 || ea.north() < wmsLayer.getImage(0).min.north() || ea.north() > wmsLayer.getImage(0).max.north()) { 119 117 Main.info("ignore click outside the image"); 120 118 return; … … 144 142 } 145 143 146 147 144 /** 148 145 * … … 150 147 */ 151 148 private boolean canceledOrRestartCurrAction(String action) { 152 Object[] options = { "Cancel", "Retry"};153 int selectedValue = JOptionPane.showOptionDialog( 149 Object[] options = {"Cancel", "Retry"}; 150 int selectedValue = JOptionPane.showOptionDialog(null, 154 151 tr("Do you want to cancel completely\n"+ 155 152 "or just retry "+action+" ?"), "", … … 177 174 private void affineTransform(EastNorth org1, EastNorth org2, EastNorth dst1, EastNorth dst2) { 178 175 // handle an NPE case I'm not able to reproduce 179 if(org1==null || org2==null || dst1==null || dst2==null) 180 { 176 if (org1 == null || org2 == null || dst1 == null || dst2 == null) { 181 177 JOptionPane.showMessageDialog(Main.parent, 182 178 tr("Ooops. I failed to catch all coordinates\n"+ … … 286 282 */ 287 283 private boolean continueCropping() { 288 Object[] options = { "OK", "Cancel"};289 int ret = JOptionPane.showOptionDialog( 284 Object[] options = {"OK", "Cancel"}; 285 int ret = JOptionPane.showOptionDialog(null, 290 286 tr("Click second corner for image cropping"), 291 287 tr("Image cropping"), … … 316 312 */ 317 313 private boolean continueGeoreferencing() { 318 Object[] options = { "OK", "Cancel"};319 int ret = JOptionPane.showOptionDialog( 314 Object[] options = {"OK", "Cancel"}; 315 int ret = JOptionPane.showOptionDialog(null, 320 316 tr("Click second Lambert crosspiece for georeferencing"), 321 317 tr("Image georeferencing"),
Note:
See TracChangeset
for help on using the changeset viewer.