Changeset 14052 in josm for trunk/src/org/openstreetmap/josm/gui/MapViewState.java
- Timestamp:
- 2018-07-26T22:01:31+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapViewState.java
r13387 r14052 3 3 4 4 import java.awt.Container; 5 import java.awt.GraphicsEnvironment;6 5 import java.awt.Point; 7 6 import java.awt.geom.AffineTransform; … … 146 145 147 146 private static Point findTopLeftOnScreen(JComponent position) { 148 if (GraphicsEnvironment.isHeadless()) { 149 // in our imaginary universe the window is always (10, 10) from the top left of the screen 150 Point topLeftInWindow = findTopLeftInWindow(position); 151 return new Point(topLeftInWindow.x + 10, topLeftInWindow.y + 10); 152 } else { 153 try { 154 return position.getLocationOnScreen(); 155 } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) { 156 throw BugReport.intercept(e).put("position", position).put("parent", position::getParent); 157 } 147 try { 148 return position.getLocationOnScreen(); 149 } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) { 150 throw BugReport.intercept(e).put("position", position).put("parent", position::getParent); 158 151 } 159 152 }
Note:
See TracChangeset
for help on using the changeset viewer.