Changeset 1004 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2008-09-22T03:53:47+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/DontShowAgainInfo.java
r745 r1004 17 17 18 18 public static boolean show(String prefKey, String msg) { 19 return show(prefKey, new JLabel(msg), true );19 return show(prefKey, new JLabel(msg), true, JOptionPane.OK_CANCEL_OPTION, JOptionPane.OK_OPTION); 20 20 } 21 21 22 22 public static boolean show(String prefKey, String msg, Boolean state) { 23 return show(prefKey, new JLabel(msg), state );23 return show(prefKey, new JLabel(msg), state, JOptionPane.OK_CANCEL_OPTION, JOptionPane.OK_OPTION); 24 24 } 25 25 26 26 public static boolean show(String prefKey, Container msg) { 27 return show(prefKey, msg, true );27 return show(prefKey, msg, true, JOptionPane.OK_CANCEL_OPTION, JOptionPane.OK_OPTION); 28 28 } 29 29 30 public static boolean show(String prefKey, Container msg, Boolean state ) {30 public static boolean show(String prefKey, Container msg, Boolean state, int options, int true_option) { 31 31 if (!Main.pref.getBoolean("message."+prefKey)) { 32 32 JCheckBox dontshowagain = new JCheckBox(tr("Do not show again")); … … 35 35 all.add(msg, GBC.eop()); 36 36 all.add(dontshowagain, GBC.eol()); 37 int answer = JOptionPane.showConfirmDialog(Main.parent, all, tr("Information"), JOptionPane.OK_CANCEL_OPTION);38 if (answer != JOptionPane.OK_OPTION)37 int answer = JOptionPane.showConfirmDialog(Main.parent, all, tr("Information"), options); 38 if (answer != true_option) 39 39 return false; 40 40 Main.pref.put("message."+prefKey, dontshowagain.isSelected());
Note:
See TracChangeset
for help on using the changeset viewer.