- Timestamp:
- 2018-02-28T20:10:44+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ButtonMarker.java
r12846 r13475 52 52 buttonRectangle.setLocation(screen.x+4, screen.y+2); 53 53 paintIcon(mv, g, screen.x+4, screen.y+2); 54 Border b; 55 Point mousePosition = mv.getMousePosition(); 56 57 // mouse is inside the window 58 if (mousePosition != null && mousePressed && containsPoint(mousePosition)) { 59 b = BorderFactory.createBevelBorder(BevelBorder.LOWERED); 60 } else { 61 b = BorderFactory.createBevelBorder(BevelBorder.RAISED); 54 boolean lowered = false; 55 if (mousePressed) { 56 Point mousePosition = mv.getMousePosition(); // slow and can throw NPE, see JDK-6840067 57 // mouse is inside the window 58 lowered = mousePosition != null && containsPoint(mousePosition); 62 59 } 60 Border b = BorderFactory.createBevelBorder(lowered ? BevelBorder.LOWERED : BevelBorder.RAISED); 63 61 Insets inset = b.getBorderInsets(mv); 64 62 Rectangle r = new Rectangle(buttonRectangle);
Note:
See TracChangeset
for help on using the changeset viewer.