Changeset 7578 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
- Timestamp:
- 2014-09-22T22:00:21+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r7434 r7578 89 89 import org.openstreetmap.josm.gui.util.GuiHelper; 90 90 import org.openstreetmap.josm.gui.util.TableHelper; 91 import org.openstreetmap.josm.gui.widgets.JFileChooserManager; 91 import org.openstreetmap.josm.gui.widgets.AbstractFileChooser; 92 import org.openstreetmap.josm.gui.widgets.FileChooserManager; 92 93 import org.openstreetmap.josm.gui.widgets.JosmTextField; 93 94 import org.openstreetmap.josm.io.CachedFile; … … 701 702 } 702 703 703 private static void prepareFileChooser(String url, JFileChooser fc) {704 private static void prepareFileChooser(String url, AbstractFileChooser fc) { 704 705 if (url == null || url.trim().length() == 0) return; 705 706 URL sourceUrl = null; … … 813 814 return; 814 815 } 815 JFileChooserManager fcm = new JFileChooserManager(true)816 FileChooserManager fcm = new FileChooserManager(true) 816 817 .createFileChooser(true, null, Arrays.asList(ff, FileFilterAllFiles.getInstance()), ff, JFileChooser.FILES_ONLY); 817 818 prepareFileChooser(tfURL.getText(), fcm.getFileChooser()); 818 JFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));819 AbstractFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this)); 819 820 if (fc != null) { 820 821 tfURL.setText(fc.getSelectedFile().toString()); … … 1512 1513 @Override 1513 1514 public void actionPerformed(ActionEvent e) { 1514 JFileChooserManager fcm = new JFileChooserManager(true).createFileChooser();1515 FileChooserManager fcm = new FileChooserManager(true).createFileChooser(); 1515 1516 if (!isFile) { 1516 1517 fcm.getFileChooser().setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); 1517 1518 } 1518 1519 prepareFileChooser(tfFileName.getText(), fcm.getFileChooser()); 1519 JFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));1520 AbstractFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this)); 1520 1521 if (fc != null) { 1521 1522 tfFileName.setText(fc.getSelectedFile().toString());
Note:
See TracChangeset
for help on using the changeset viewer.