- Timestamp:
- 2020-08-03T22:46:16+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/preferences/advanced
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r16630 r16844 219 219 applyFilter(); 220 220 }); 221 table.getSelectionModel().addListSelectionListener(event -> edit.setEnabled(table.getSelectedRowCount() == 1)); 221 222 222 223 JButton reset = new JButton(tr("Reset")); 223 224 p.add(reset, GBC.std().insets(0, 5, 0, 0)); 224 225 reset.addActionListener(e -> table.resetPreferences(gui)); 226 table.getSelectionModel().addListSelectionListener(event -> reset.setEnabled(table.getSelectedRowCount() > 0)); 225 227 226 228 JButton read = new JButton(tr("Read from file")); -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
r16438 r16844 21 21 import javax.swing.JComponent; 22 22 import javax.swing.JLabel; 23 import javax.swing.JOptionPane;24 23 import javax.swing.JPanel; 25 24 import javax.swing.JRadioButton; … … 93 92 public boolean editPreference(final JComponent gui) { 94 93 if (getSelectedRowCount() != 1) { 95 JOptionPane.showMessageDialog(96 gui,97 tr("Please select the row to edit."),98 tr("Warning"),99 JOptionPane.WARNING_MESSAGE100 );101 94 return false; 102 95 } … … 277 270 public void resetPreferences(final JComponent gui) { 278 271 if (getSelectedRowCount() == 0) { 279 JOptionPane.showMessageDialog(280 gui,281 tr("Please select the row to delete."),282 tr("Warning"),283 JOptionPane.WARNING_MESSAGE284 );285 272 return; 286 273 }
Note:
See TracChangeset
for help on using the changeset viewer.