Changeset 10256 in josm for trunk/src/org
- Timestamp:
- 2016-05-21T01:35:55+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/NotificationManager.java
r10001 r10256 109 109 110 110 int margin = 5; 111 int x, y;112 111 JFrame parentWindow = (JFrame) Main.parent; 113 112 Dimension size = currentNotificationPanel.getPreferredSize(); 114 if (Main.isDisplayingMapView() && Main.map.mapView.getHeight() > 0) { 115 MapView mv = Main.map.mapView; 116 Point mapViewPos = SwingUtilities.convertPoint(mv.getParent(), mv.getX(), mv.getY(), Main.parent); 117 x = mapViewPos.x + margin; 118 y = mapViewPos.y + mv.getHeight() - Main.map.statusLine.getHeight() - size.height - margin; 119 } else { 120 x = margin; 121 y = parentWindow.getHeight() - Main.toolbar.control.getSize().height - size.height - margin; 122 } 123 parentWindow.getLayeredPane().add(currentNotificationPanel, JLayeredPane.POPUP_LAYER, 0); 124 125 currentNotificationPanel.setLocation(x, y); 113 if (parentWindow != null) { 114 int x; 115 int y; 116 if (Main.isDisplayingMapView() && Main.map.mapView.getHeight() > 0) { 117 MapView mv = Main.map.mapView; 118 Point mapViewPos = SwingUtilities.convertPoint(mv.getParent(), mv.getX(), mv.getY(), Main.parent); 119 x = mapViewPos.x + margin; 120 y = mapViewPos.y + mv.getHeight() - Main.map.statusLine.getHeight() - size.height - margin; 121 } else { 122 x = margin; 123 y = parentWindow.getHeight() - Main.toolbar.control.getSize().height - size.height - margin; 124 } 125 parentWindow.getLayeredPane().add(currentNotificationPanel, JLayeredPane.POPUP_LAYER, 0); 126 127 currentNotificationPanel.setLocation(x, y); 128 } 126 129 currentNotificationPanel.setSize(size); 127 130
Note:
See TracChangeset
for help on using the changeset viewer.