Changeset 3308 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-06-04T21:29:06+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/StyleSourceEditor.java
r3083 r3308 93 93 tblActiveStyles.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 94 94 tblActiveStyles.setTableHeader(null); 95 tblActiveStyles.getColumnModel().getColumn(0).setCellEditor(new FileOrUrlCellEditor( ));95 tblActiveStyles.getColumnModel().getColumn(0).setCellEditor(new FileOrUrlCellEditor(true)); 96 96 tblActiveStyles.setRowHeight(20); 97 97 activeStylesModel.setActiveStyles(Main.pref.getCollection(stylesPreferencesKey, null)); … … 117 117 tblIconPaths.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 118 118 tblIconPaths.setTableHeader(null); 119 tblIconPaths.getColumnModel().getColumn(0).setCellEditor(new FileOrUrlCellEditor( ));119 tblIconPaths.getColumnModel().getColumn(0).setCellEditor(new FileOrUrlCellEditor(false)); 120 120 tblIconPaths.setRowHeight(20); 121 121 iconPathsModel.setIconPaths(Main.pref.getCollection(iconsPreferenceKey, null)); … … 816 816 private String value; 817 817 private JFileChooser fileChooser; 818 private boolean isFile; 818 819 819 820 protected JFileChooser getFileChooser() { 820 821 if (fileChooser == null) { 821 822 this.fileChooser = new JFileChooser(); 823 if(!isFile) 824 fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); 822 825 } 823 826 return fileChooser; … … 854 857 } 855 858 856 public FileOrUrlCellEditor() { 859 public FileOrUrlCellEditor(boolean isFile) { 860 this.isFile = isFile; 857 861 listeners = new CopyOnWriteArrayList<CellEditorListener>(); 858 862 build();
Note:
See TracChangeset
for help on using the changeset viewer.