Changeset 9623 in osm for applications/editors/josm/plugins/slippy_map_chooser/src/OsmMapControl.java
- Timestamp:
- 2008-08-10T20:09:05+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/slippy_map_chooser/src/OsmMapControl.java
r9585 r9623 31 31 32 32 private SizeButton iSizeButton = null; 33 private SourceButton iSourceButton = null; 33 34 34 35 /** 35 36 * Create a new OsmMapControl 36 37 */ 37 public OsmMapControl(SlippyMapChooser navComp, JPanel contentPane, SizeButton sizeButton) { 38 public OsmMapControl(SlippyMapChooser navComp, JPanel contentPane, SizeButton sizeButton, SourceButton sourceButton) { 38 39 this.iSlippyMapChooser = navComp; 39 40 iSlippyMapChooser.addMouseListener(this); … … 53 54 } 54 55 iSizeButton = sizeButton; 56 iSourceButton = sourceButton; 55 57 } 56 58 … … 86 88 public void mouseReleased(MouseEvent e) { 87 89 if (e.getButton() == MouseEvent.BUTTON1) { 90 91 int sourceButton = iSourceButton.hit(e.getPoint()); 92 88 93 if (iSizeButton.hit(e.getPoint())) { 89 94 iSizeButton.toggle(); 90 95 iSlippyMapChooser.resizeSlippyMap(); 91 } else { 96 } 97 else if(sourceButton == SourceButton.HIDE_OR_SHOW) { 98 iSourceButton.toggle(); 99 iSlippyMapChooser.repaint(); 100 101 }else if(sourceButton == SourceButton.MAPNIK || sourceButton == SourceButton.OSMARENDER) { 102 iSlippyMapChooser.toggleMapSource(sourceButton); 103 } 104 else { 92 105 if (e.getClickCount() == 1) { 93 106 iSlippyMapChooser.setSelection(iStartSelectionPoint, e.getPoint()); … … 98 111 } 99 112 } 113 100 114 } 101 115 }
Note:
See TracChangeset
for help on using the changeset viewer.
