- Timestamp:
- 2012-11-08T18:40:06+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r5492 r5572 27 27 import java.net.URL; 28 28 import java.util.ArrayList; 29 import java.util.Arrays; 29 30 import java.util.Collection; 30 31 import java.util.Collections; … … 66 67 import javax.swing.event.TableModelEvent; 67 68 import javax.swing.event.TableModelListener; 69 import javax.swing.filechooser.FileFilter; 68 70 import javax.swing.table.AbstractTableModel; 69 71 import javax.swing.table.DefaultTableCellRenderer; … … 72 74 73 75 import org.openstreetmap.josm.Main; 76 import org.openstreetmap.josm.actions.ExtensionFileFilter; 74 77 import org.openstreetmap.josm.gui.ExtendedDialog; 75 78 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 76 79 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 80 import org.openstreetmap.josm.gui.util.FileFilterAllFiles; 77 81 import org.openstreetmap.josm.gui.widgets.JFileChooserManager; 78 82 import org.openstreetmap.josm.io.MirroredInputStream; … … 752 756 753 757 public void actionPerformed(ActionEvent e) { 754 JFileChooserManager fcm = new JFileChooserManager(true).createFileChooser(); 758 FileFilter ff; 759 if (isMapPaint) { 760 ff = new ExtensionFileFilter("xml,mapcss,css", "xml", tr("Map paint style file (*.xml, *.mapcss)")); 761 } else { 762 ff = new ExtensionFileFilter("xml", "xml", tr("Preset definition file (*.xml)")); 763 } 764 JFileChooserManager fcm = new JFileChooserManager(true) 765 .createFileChooser(true, null, Arrays.asList(ff, FileFilterAllFiles.getInstance()), ff, JFileChooser.FILES_ONLY); 755 766 prepareFileChooser(tfURL.getText(), fcm.getFileChooser()); 756 767 JFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this)); -
trunk/src/org/openstreetmap/josm/gui/widgets/JFileChooserManager.java
r5457 r5572 42 42 * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created. 43 43 * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser. 44 * Then, if the user effe tively choses a file or a directory, this property will be updated to the directory path.44 * Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path. 45 45 * @see #createFileChooser 46 46 */ … … 53 53 * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created. 54 54 * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser. 55 * Then, if the user effe tively choses a file or a directory, this property will be updated to the directory path.55 * Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path. 56 56 * @param defaultDir The default directory used to initialize the JFileChooser if the {@code lastDirProperty} property value is missing. 57 57 * @see #createFileChooser -
trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
r5551 r5572 18 18 import java.util.Enumeration; 19 19 import java.util.HashMap; 20 import java.util.LinkedHashMap;21 20 import java.util.List; 22 21 import java.util.Map;
Note:
See TracChangeset
for help on using the changeset viewer.