Changeset 13265 in josm
- Timestamp:
- 2017-12-31T03:09:43+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r13040 r13265 348 348 } 349 349 } 350 toolBarActions.removeAll(); 350 351 for (int i = 0; i < toolBarToggle.getComponentCount(); ++i) { 351 352 if (toolBarToggle.getComponent(i) instanceof Destroyable) { … … 353 354 } 354 355 } 356 toolBarToggle.removeAll(); 355 357 356 358 statusLine.destroy(); 357 359 mapView.destroy(); 358 360 keyDetector.unregister(); 361 362 allDialogs.clear(); 363 allDialogButtons.clear(); 364 allMapModeButtons.clear(); 359 365 } 360 366 -
trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
r11746 r13265 330 330 } 331 331 } 332 mSpltPane.removeAll(); 333 allDialogs.clear(); 334 panels.clear(); 332 335 } 333 336 -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r12881 r13265 50 50 import org.openstreetmap.josm.Main; 51 51 import org.openstreetmap.josm.actions.JosmAction; 52 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;53 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;54 52 import org.openstreetmap.josm.data.preferences.BooleanProperty; 55 53 import org.openstreetmap.josm.data.preferences.ParametrizedEnumProperty; … … 70 68 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 71 69 import org.openstreetmap.josm.spi.preferences.Config; 70 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 71 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 72 72 import org.openstreetmap.josm.tools.Destroyable; 73 73 import org.openstreetmap.josm.tools.GBC; … … 288 288 289 289 private ToggleDialogAction(String name, String iconName, String tooltip, Shortcut shortcut) { 290 super(name, iconName, tooltip, shortcut, false );290 super(name, iconName, tooltip, shortcut, false, false); 291 291 } 292 292 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r13264 r13265 63 63 import org.openstreetmap.josm.gui.layer.JumpToMarkerActions.JumpToPreviousMarker; 64 64 import org.openstreetmap.josm.gui.layer.Layer; 65 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 66 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; 67 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent; 68 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent; 65 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 69 66 import org.openstreetmap.josm.gui.util.GuiHelper; 70 67 import org.openstreetmap.josm.tools.ImageProvider; … … 102 99 private MouseMotionAdapter mouseMotionAdapter; 103 100 private MapModeChangeListener mapModeListener; 101 private ActiveLayerChangeListener activeLayerChangeListener; 104 102 105 103 /** Mouse position where the last image was selected. */ … … 992 990 mapModeListener.mapModeChange(null, MainApplication.getMap().mapMode); 993 991 994 MainApplication.getLayerManager().addActiveLayerChangeListener(e -> {992 activeLayerChangeListener = e -> { 995 993 if (MainApplication.getLayerManager().getActiveLayer() == this) { 996 994 // only in select mode it is possible to click the images 997 995 MainApplication.getMap().selectSelectTool(false); 998 996 } 999 }); 1000 1001 MainApplication.getLayerManager().addLayerChangeListener(new LayerChangeListener() { 1002 @Override 1003 public void layerAdded(LayerAddEvent e) { 1004 // Do nothing 1005 } 1006 1007 @Override 1008 public void layerRemoving(LayerRemoveEvent e) { 1009 if (e.getRemovedLayer() == GeoImageLayer.this) { 1010 stopLoadThumbs(); 1011 MapView mapView = MainApplication.getMap().mapView; 1012 mapView.removeMouseListener(mouseAdapter); 1013 mapView.removeMouseMotionListener(mouseMotionAdapter); 1014 MapFrame.removeMapModeChangeListener(mapModeListener); 1015 currentPhoto = -1; 1016 if (data != null) { 1017 data.clear(); 1018 } 1019 data = null; 1020 // stop listening to layer change events 1021 MainApplication.getLayerManager().removeLayerChangeListener(this); 1022 } 1023 } 1024 1025 @Override 1026 public void layerOrderChanged(LayerOrderChangeEvent e) { 1027 // Do nothing 1028 } 1029 }); 997 }; 998 MainApplication.getLayerManager().addActiveLayerChangeListener(activeLayerChangeListener); 1030 999 1031 1000 MapFrame map = MainApplication.getMap(); … … 1036 1005 1037 1006 @Override 1007 public synchronized void destroy() { 1008 super.destroy(); 1009 stopLoadThumbs(); 1010 MapView mapView = MainApplication.getMap().mapView; 1011 mapView.removeMouseListener(mouseAdapter); 1012 mapView.removeMouseMotionListener(mouseMotionAdapter); 1013 MapFrame.removeMapModeChangeListener(mapModeListener); 1014 MainApplication.getLayerManager().removeActiveLayerChangeListener(activeLayerChangeListener); 1015 currentPhoto = -1; 1016 if (data != null) { 1017 data.clear(); 1018 } 1019 data = null; 1020 } 1021 1022 @Override 1038 1023 public LayerPainter attachToMapView(MapViewEvent event) { 1039 1024 MapView.addZoomChangeListener(this); 1040 return super.attachToMapView(event); 1025 return new CompatibilityModeLayerPainter() { 1026 @Override 1027 public void detachFromMapView(MapViewEvent event) { 1028 MapView.removeZoomChangeListener(GeoImageLayer.this); 1029 } 1030 }; 1041 1031 } 1042 1032 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
r13220 r13265 34 34 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 35 35 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 36 import org.openstreetmap.josm.tools.Destroyable; 36 37 import org.openstreetmap.josm.tools.ExifReader; 37 38 import org.openstreetmap.josm.tools.ImageProvider; … … 43 44 * Offers basic mouse interaction (zoom, drag) and on-screen text. 44 45 */ 45 public class ImageDisplay extends JComponent implements PreferenceChangedListener {46 public class ImageDisplay extends JComponent implements Destroyable, PreferenceChangedListener { 46 47 47 48 /** The file that is currently displayed */ … … 63 64 /** The tracker to load the images */ 64 65 private final MediaTracker tracker = new MediaTracker(this); 66 67 private final ImgDisplayMouseListener mouseListener = new ImgDisplayMouseListener(); 65 68 66 69 private String osdText; … … 663 666 */ 664 667 public ImageDisplay() { 665 ImgDisplayMouseListener mouseListener = new ImgDisplayMouseListener();666 668 addMouseListener(mouseListener); 667 669 addMouseWheelListener(mouseListener); … … 669 671 Config.getPref().addPreferenceChangeListener(this); 670 672 preferenceChanged(null); 673 } 674 675 @Override 676 public void destroy() { 677 removeMouseListener(mouseListener); 678 removeMouseWheelListener(mouseListener); 679 removeMouseMotionListener(mouseListener); 680 Config.getPref().removePreferenceChangeListener(this); 671 681 } 672 682 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
r13264 r13265 15 15 import java.text.SimpleDateFormat; 16 16 17 import javax.swing.AbstractAction;18 17 import javax.swing.Box; 19 18 import javax.swing.JButton; 20 import javax.swing.JComponent;21 19 import javax.swing.JPanel; 22 20 import javax.swing.JToggleButton; 23 21 22 import org.openstreetmap.josm.actions.JosmAction; 24 23 import org.openstreetmap.josm.gui.MainApplication; 25 24 import org.openstreetmap.josm.gui.dialogs.DialogsPanel.Action; … … 41 40 public final class ImageViewerDialog extends ToggleDialog implements LayerChangeListener, ActiveLayerChangeListener { 42 41 43 private static final String COMMAND_ZOOM = "zoom";44 private static final String COMMAND_CENTERVIEW = "centre";45 private static final String COMMAND_NEXT = "next";46 private static final String COMMAND_REMOVE = "remove";47 private static final String COMMAND_REMOVE_FROM_DISK = "removefromdisk";48 private static final String COMMAND_PREVIOUS = "previous";49 private static final String COMMAND_COLLAPSE = "collapse";50 private static final String COMMAND_FIRST = "first";51 private static final String COMMAND_LAST = "last";52 private static final String COMMAND_COPY_PATH = "copypath";42 private final ImageZoomAction imageZoomAction = new ImageZoomAction(); 43 private final ImageCenterViewAction imageCenterViewAction = new ImageCenterViewAction(); 44 private final ImageNextAction imageNextAction = new ImageNextAction(); 45 private final ImageRemoveAction imageRemoveAction = new ImageRemoveAction(); 46 private final ImageRemoveFromDiskAction imageRemoveFromDiskAction = new ImageRemoveFromDiskAction(); 47 private final ImagePreviousAction imagePreviousAction = new ImagePreviousAction(); 48 private final ImageCollapseAction imageCollapseAction = new ImageCollapseAction(); 49 private final ImageFirstAction imageFirstAction = new ImageFirstAction(); 50 private final ImageLastAction imageLastAction = new ImageLastAction(); 51 private final ImageCopyPathAction imageCopyPathAction = new ImageCopyPathAction(); 53 52 54 53 private final ImageDisplay imgDisplay = new ImageDisplay(); … … 90 89 Dimension buttonDim = new Dimension(26, 26); 91 90 92 ImageAction prevAction = new ImageAction(COMMAND_PREVIOUS, new ImageProvider("dialogs", "previous"), tr("Previous")); 93 btnPrevious = new JButton(prevAction); 91 btnPrevious = new JButton(imagePreviousAction); 94 92 btnPrevious.setPreferredSize(buttonDim); 95 Shortcut scPrev = Shortcut.registerShortcut(96 "geoimage:previous", tr("Geoimage: {0}", tr("Show previous Image")), KeyEvent.VK_PAGE_UP, Shortcut.DIRECT);97 final String previousImage = "Previous Image";98 MainApplication.registerActionShortcut(prevAction, scPrev);99 btnPrevious.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scPrev.getKeyStroke(), previousImage);100 btnPrevious.getActionMap().put(previousImage, prevAction);101 93 btnPrevious.setEnabled(false); 102 94 103 final String removePhoto = tr("Remove photo from layer"); 104 ImageAction delAction = new ImageAction(COMMAND_REMOVE, new ImageProvider("dialogs", "delete"), removePhoto); 105 JButton btnDelete = new JButton(delAction); 95 JButton btnDelete = new JButton(imageRemoveAction); 106 96 btnDelete.setPreferredSize(buttonDim); 107 Shortcut scDelete = Shortcut.registerShortcut( 108 "geoimage:deleteimagefromlayer", tr("Geoimage: {0}", tr("Remove photo from layer")), KeyEvent.VK_DELETE, Shortcut.SHIFT); 109 MainApplication.registerActionShortcut(delAction, scDelete); 110 btnDelete.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scDelete.getKeyStroke(), removePhoto); 111 btnDelete.getActionMap().put(removePhoto, delAction); 112 113 ImageAction delFromDiskAction = new ImageAction(COMMAND_REMOVE_FROM_DISK, 114 new ImageProvider("dialogs", "geoimage/deletefromdisk"), tr("Delete image file from disk")); 115 JButton btnDeleteFromDisk = new JButton(delFromDiskAction); 97 98 JButton btnDeleteFromDisk = new JButton(imageRemoveFromDiskAction); 116 99 btnDeleteFromDisk.setPreferredSize(buttonDim); 117 Shortcut scDeleteFromDisk = Shortcut.registerShortcut( 118 "geoimage:deletefilefromdisk", tr("Geoimage: {0}", tr("Delete File from disk")), KeyEvent.VK_DELETE, Shortcut.CTRL_SHIFT); 119 final String deleteImage = "Delete image file from disk"; 120 MainApplication.registerActionShortcut(delFromDiskAction, scDeleteFromDisk); 121 btnDeleteFromDisk.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scDeleteFromDisk.getKeyStroke(), deleteImage); 122 btnDeleteFromDisk.getActionMap().put(deleteImage, delFromDiskAction); 123 124 ImageAction copyPathAction = new ImageAction(COMMAND_COPY_PATH, new ImageProvider("copy"), tr("Copy image path")); 125 JButton btnCopyPath = new JButton(copyPathAction); 100 101 JButton btnCopyPath = new JButton(imageCopyPathAction); 126 102 btnCopyPath.setPreferredSize(buttonDim); 127 Shortcut scCopyPath = Shortcut.registerShortcut( 128 "geoimage:copypath", tr("Geoimage: {0}", tr("Copy image path")), KeyEvent.VK_C, Shortcut.ALT_CTRL_SHIFT); 129 final String copyImage = "Copy image path"; 130 MainApplication.registerActionShortcut(copyPathAction, scCopyPath); 131 btnCopyPath.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scCopyPath.getKeyStroke(), copyImage); 132 btnCopyPath.getActionMap().put(copyImage, copyPathAction); 133 134 ImageAction nextAction = new ImageAction(COMMAND_NEXT, new ImageProvider("dialogs", "next"), tr("Next")); 135 btnNext = new JButton(nextAction); 103 104 btnNext = new JButton(imageNextAction); 136 105 btnNext.setPreferredSize(buttonDim); 137 Shortcut scNext = Shortcut.registerShortcut(138 "geoimage:next", tr("Geoimage: {0}", tr("Show next Image")), KeyEvent.VK_PAGE_DOWN, Shortcut.DIRECT);139 final String nextImage = "Next Image";140 MainApplication.registerActionShortcut(nextAction, scNext);141 btnNext.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scNext.getKeyStroke(), nextImage);142 btnNext.getActionMap().put(nextImage, nextAction);143 106 btnNext.setEnabled(false); 144 107 145 MainApplication.registerActionShortcut( 146 new ImageAction(COMMAND_FIRST, null, null), 147 Shortcut.registerShortcut( 148 "geoimage:first", tr("Geoimage: {0}", tr("Show first Image")), KeyEvent.VK_HOME, Shortcut.DIRECT) 149 ); 150 MainApplication.registerActionShortcut( 151 new ImageAction(COMMAND_LAST, null, null), 152 Shortcut.registerShortcut( 153 "geoimage:last", tr("Geoimage: {0}", tr("Show last Image")), KeyEvent.VK_END, Shortcut.DIRECT) 154 ); 155 156 tbCentre = new JToggleButton(new ImageAction(COMMAND_CENTERVIEW, 157 new ImageProvider("dialogs", "centreview"), tr("Center view"))); 108 tbCentre = new JToggleButton(imageCenterViewAction); 158 109 tbCentre.setPreferredSize(buttonDim); 159 110 160 JButton btnZoomBestFit = new JButton(new ImageAction(COMMAND_ZOOM, 161 new ImageProvider("dialogs", "zoom-best-fit"), tr("Zoom best fit and 1:1"))); 111 JButton btnZoomBestFit = new JButton(imageZoomAction); 162 112 btnZoomBestFit.setPreferredSize(buttonDim); 163 113 164 btnCollapse = new JButton(new ImageAction(COMMAND_COLLAPSE, 165 new ImageProvider("dialogs", "collapse"), tr("Move dialog to the side pane"))); 114 btnCollapse = new JButton(imageCollapseAction); 166 115 btnCollapse.setPreferredSize(new Dimension(20, 20)); 167 116 btnCollapse.setAlignmentY(Component.TOP_ALIGNMENT); … … 202 151 MainApplication.getLayerManager().removeActiveLayerChangeListener(this); 203 152 MainApplication.getLayerManager().removeLayerChangeListener(this); 153 // Manually destroy actions until JButtons are replaced by standard SideButtons 154 imageFirstAction.destroy(); 155 imageLastAction.destroy(); 156 imagePreviousAction.destroy(); 157 imageNextAction.destroy(); 158 imageCenterViewAction.destroy(); 159 imageCollapseAction.destroy(); 160 imageCopyPathAction.destroy(); 161 imageRemoveAction.destroy(); 162 imageRemoveFromDiskAction.destroy(); 163 imageZoomAction.destroy(); 204 164 super.destroy(); 205 } 206 207 class ImageAction extends AbstractAction { 208 private final String action; 209 210 ImageAction(String action, ImageProvider provider, String toolTipText) { 211 this.action = action; 212 putValue(SHORT_DESCRIPTION, toolTipText); 213 if (provider != null) { 214 provider.getResource().attachImageIcon(this, true); 215 } 216 } 217 218 @Override 219 public void actionPerformed(ActionEvent e) { 220 if (COMMAND_NEXT.equals(action)) { 221 if (currentLayer != null) { 222 currentLayer.showNextPhoto(); 223 } 224 } else if (COMMAND_PREVIOUS.equals(action)) { 225 if (currentLayer != null) { 226 currentLayer.showPreviousPhoto(); 227 } 228 } else if (COMMAND_FIRST.equals(action) && currentLayer != null) { 165 dialog = null; 166 } 167 168 private class ImageNextAction extends JosmAction { 169 ImageNextAction() { 170 super(null, new ImageProvider("dialogs", "next"), tr("Next"), Shortcut.registerShortcut( 171 "geoimage:next", tr("Geoimage: {0}", tr("Show next Image")), KeyEvent.VK_PAGE_DOWN, Shortcut.DIRECT), 172 false, null, false); 173 } 174 175 @Override 176 public void actionPerformed(ActionEvent e) { 177 if (currentLayer != null) { 178 currentLayer.showNextPhoto(); 179 } 180 } 181 } 182 183 private class ImagePreviousAction extends JosmAction { 184 ImagePreviousAction() { 185 super(null, new ImageProvider("dialogs", "previous"), tr("Previous"), Shortcut.registerShortcut( 186 "geoimage:previous", tr("Geoimage: {0}", tr("Show previous Image")), KeyEvent.VK_PAGE_UP, Shortcut.DIRECT), 187 false, null, false); 188 } 189 190 @Override 191 public void actionPerformed(ActionEvent e) { 192 if (currentLayer != null) { 193 currentLayer.showPreviousPhoto(); 194 } 195 } 196 } 197 198 private class ImageFirstAction extends JosmAction { 199 ImageFirstAction() { 200 super(null, (ImageProvider) null, null, Shortcut.registerShortcut( 201 "geoimage:first", tr("Geoimage: {0}", tr("Show first Image")), KeyEvent.VK_HOME, Shortcut.DIRECT), 202 false, null, false); 203 } 204 205 @Override 206 public void actionPerformed(ActionEvent e) { 207 if (currentLayer != null) { 229 208 currentLayer.showFirstPhoto(); 230 } else if (COMMAND_LAST.equals(action) && currentLayer != null) { 209 } 210 } 211 } 212 213 private class ImageLastAction extends JosmAction { 214 ImageLastAction() { 215 super(null, (ImageProvider) null, null, Shortcut.registerShortcut( 216 "geoimage:last", tr("Geoimage: {0}", tr("Show last Image")), KeyEvent.VK_END, Shortcut.DIRECT), 217 false, null, false); 218 } 219 220 @Override 221 public void actionPerformed(ActionEvent e) { 222 if (currentLayer != null) { 231 223 currentLayer.showLastPhoto(); 232 } else if (COMMAND_CENTERVIEW.equals(action)) { 233 final JToggleButton button = (JToggleButton) e.getSource(); 234 centerView = button.isEnabled() && button.isSelected(); 235 if (centerView && currentEntry != null && currentEntry.getPos() != null) { 236 MainApplication.getMap().mapView.zoomTo(currentEntry.getPos()); 237 } 238 } else if (COMMAND_ZOOM.equals(action)) { 239 imgDisplay.zoomBestFitOrOne(); 240 } else if (COMMAND_REMOVE.equals(action)) { 241 if (currentLayer != null) { 242 currentLayer.removeCurrentPhoto(); 243 } 244 } else if (COMMAND_REMOVE_FROM_DISK.equals(action)) { 245 if (currentLayer != null) { 246 currentLayer.removeCurrentPhotoFromDisk(); 247 } 248 } else if (COMMAND_COPY_PATH.equals(action)) { 249 if (currentLayer != null) { 250 currentLayer.copyCurrentPhotoPath(); 251 } 252 } else if (COMMAND_COLLAPSE.equals(action)) { 253 collapseButtonClicked = true; 254 detachedDialog.getToolkit().getSystemEventQueue().postEvent(new WindowEvent(detachedDialog, WindowEvent.WINDOW_CLOSING)); 255 } 224 } 225 } 226 } 227 228 private class ImageCenterViewAction extends JosmAction { 229 ImageCenterViewAction() { 230 super(null, new ImageProvider("dialogs", "centreview"), tr("Center view"), null, 231 false, null, false); 232 } 233 234 @Override 235 public void actionPerformed(ActionEvent e) { 236 final JToggleButton button = (JToggleButton) e.getSource(); 237 centerView = button.isEnabled() && button.isSelected(); 238 if (centerView && currentEntry != null && currentEntry.getPos() != null) { 239 MainApplication.getMap().mapView.zoomTo(currentEntry.getPos()); 240 } 241 } 242 } 243 244 private class ImageZoomAction extends JosmAction { 245 ImageZoomAction() { 246 super(null, new ImageProvider("dialogs", "zoom-best-fit"), tr("Zoom best fit and 1:1"), null, 247 false, null, false); 248 } 249 250 @Override 251 public void actionPerformed(ActionEvent e) { 252 imgDisplay.zoomBestFitOrOne(); 253 } 254 } 255 256 private class ImageRemoveAction extends JosmAction { 257 ImageRemoveAction() { 258 super(null, new ImageProvider("dialogs", "delete"), tr("Remove photo from layer"), Shortcut.registerShortcut( 259 "geoimage:deleteimagefromlayer", tr("Geoimage: {0}", tr("Remove photo from layer")), KeyEvent.VK_DELETE, Shortcut.SHIFT), 260 false, null, false); 261 } 262 263 @Override 264 public void actionPerformed(ActionEvent e) { 265 if (currentLayer != null) { 266 currentLayer.removeCurrentPhoto(); 267 } 268 } 269 } 270 271 private class ImageRemoveFromDiskAction extends JosmAction { 272 ImageRemoveFromDiskAction() { 273 super(null, new ImageProvider("dialogs", "geoimage/deletefromdisk"), tr("Delete image file from disk"), 274 Shortcut.registerShortcut( 275 "geoimage:deletefilefromdisk", tr("Geoimage: {0}", tr("Delete File from disk")), KeyEvent.VK_DELETE, Shortcut.CTRL_SHIFT), 276 false, null, false); 277 } 278 279 @Override 280 public void actionPerformed(ActionEvent e) { 281 if (currentLayer != null) { 282 currentLayer.removeCurrentPhotoFromDisk(); 283 } 284 } 285 } 286 287 private class ImageCopyPathAction extends JosmAction { 288 ImageCopyPathAction() { 289 super(null, new ImageProvider("copy"), tr("Copy image path"), Shortcut.registerShortcut( 290 "geoimage:copypath", tr("Geoimage: {0}", tr("Copy image path")), KeyEvent.VK_C, Shortcut.ALT_CTRL_SHIFT), 291 false, null, false); 292 } 293 294 @Override 295 public void actionPerformed(ActionEvent e) { 296 if (currentLayer != null) { 297 currentLayer.copyCurrentPhotoPath(); 298 } 299 } 300 } 301 302 private class ImageCollapseAction extends JosmAction { 303 ImageCollapseAction() { 304 super(null, new ImageProvider("dialogs", "collapse"), tr("Move dialog to the side pane"), null, 305 false, null, false); 306 } 307 308 @Override 309 public void actionPerformed(ActionEvent e) { 310 collapseButtonClicked = true; 311 detachedDialog.getToolkit().getSystemEventQueue().postEvent(new WindowEvent(detachedDialog, WindowEvent.WINDOW_CLOSING)); 256 312 } 257 313 } … … 455 511 } 456 512 } 457 458 513 } -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r12808 r13265 245 245 if (name != null) { 246 246 childMap.remove(name); 247 } else { 248 childMap.values().removeIf(child::equals); 247 249 } 248 250 }
Note:
See TracChangeset
for help on using the changeset viewer.