Changeset 7852 in josm for trunk/src/org/openstreetmap/josm/gui/layer
- Timestamp:
- 2014-12-20T04:16:30+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
r7820 r7852 30 30 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 31 31 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 32 import org.openstreetmap.josm.gui.dialogs.Note Dialog;32 import org.openstreetmap.josm.gui.dialogs.NotesDialog; 33 33 import org.openstreetmap.josm.io.NoteExporter; 34 34 import org.openstreetmap.josm.io.XmlWriter; … … 99 99 ImageIcon icon = null; 100 100 if (note.getId() < 0) { 101 icon = Note Dialog.ICON_NEW_SMALL;101 icon = NotesDialog.ICON_NEW_SMALL; 102 102 } else if (note.getState() == State.closed) { 103 icon = Note Dialog.ICON_CLOSED_SMALL;103 icon = NotesDialog.ICON_CLOSED_SMALL; 104 104 } else { 105 icon = Note Dialog.ICON_OPEN_SMALL;105 icon = NotesDialog.ICON_OPEN_SMALL; 106 106 } 107 107 int width = icon.getIconWidth(); … … 139 139 140 140 g.setColor(ColorHelper.html2color(Main.pref.get("color.selected"))); 141 g.drawRect(p.x - (Note Dialog.ICON_SMALL_SIZE / 2), p.y - NoteDialog.ICON_SMALL_SIZE, NoteDialog.ICON_SMALL_SIZE - 1, NoteDialog.ICON_SMALL_SIZE - 1);142 143 int tx = p.x + (Note Dialog.ICON_SMALL_SIZE / 2) + 5;144 int ty = p.y - Note Dialog.ICON_SMALL_SIZE - 1;141 g.drawRect(p.x - (NotesDialog.ICON_SMALL_SIZE / 2), p.y - NotesDialog.ICON_SMALL_SIZE, NotesDialog.ICON_SMALL_SIZE - 1, NotesDialog.ICON_SMALL_SIZE - 1); 142 143 int tx = p.x + (NotesDialog.ICON_SMALL_SIZE / 2) + 5; 144 int ty = p.y - NotesDialog.ICON_SMALL_SIZE - 1; 145 145 g.translate(tx, ty); 146 146 … … 159 159 @Override 160 160 public Icon getIcon() { 161 return Note Dialog.ICON_OPEN_SMALL;161 return NotesDialog.ICON_OPEN_SMALL; 162 162 } 163 163 … … 219 219 Point notePoint = Main.map.mapView.getPoint(note.getLatLon()); 220 220 //move the note point to the center of the icon where users are most likely to click when selecting 221 notePoint.setLocation(notePoint.getX(), notePoint.getY() - Note Dialog.ICON_SMALL_SIZE / 2);221 notePoint.setLocation(notePoint.getX(), notePoint.getY() - NotesDialog.ICON_SMALL_SIZE / 2); 222 222 double dist = clickPoint.distanceSq(notePoint); 223 223 if (minDistance > dist && clickPoint.distance(notePoint) < snapDistance ) {
Note:
See TracChangeset
for help on using the changeset viewer.