Changeset 5275 in josm for trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
- Timestamp:
- 2012-06-09T20:03:41+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r5266 r5275 42 42 * General configurable dialog window. 43 43 * 44 * If dialog is modal, you can use getValue()to retrieve the44 * If dialog is modal, you can use {@link #getValue()} to retrieve the 45 45 * button index. Note that the user can close the dialog 46 46 * by other means. This is usually equivalent to cancel action. 47 47 * 48 * For non-modal dialogs, buttonAction(int)can be overridden.48 * For non-modal dialogs, {@link #buttonAction(int, ActionEvent)} can be overridden. 49 49 * 50 50 * There are various options, see below. 51 51 * 52 52 * Note: The button indices are counted from 1 and upwards. 53 * So for getValue(), setDefaultButton(int) and setCancelButton(int) the54 * first button has index 1.53 * So for {@link #getValue()}, {@link #setDefaultButton(int)} and 54 * {@link #setCancelButton} the first button has index 1. 55 55 * 56 56 * Simple example: 57 * < code>57 * <pre> 58 58 * ExtendedDialog ed = new ExtendedDialog( 59 59 * Main.parent, tr("Dialog Title"), … … 66 66 * // proceed... 67 67 * } 68 * </ code>68 * </pre> 69 69 */ 70 70 public class ExtendedDialog extends JDialog { … … 171 171 172 172 /** 173 * Allows decorating the buttons with tooltips. Expects a n String[] with translated174 * t ooltip texts.173 * Allows decorating the buttons with tooltips. Expects a String array with 174 * translated tooltip texts. 175 175 * 176 176 * @param toolTipTexts the tool tip texts. Ignored, if null. … … 224 224 /** 225 225 * Decorate the dialog with an icon that is shown on the left part of 226 * the window area. (Similar to how it is done in JOptionPane)226 * the window area. (Similar to how it is done in {@link JOptionPane}) 227 227 */ 228 228 public ExtendedDialog setIcon(Icon icon) { … … 232 232 233 233 /** 234 * Convenience method to allow values that would be accepted by JOptionPaneas messageType.234 * Convenience method to allow values that would be accepted by {@link JOptionPane} as messageType. 235 235 */ 236 236 public ExtendedDialog setIcon(int messageType) { … … 253 253 /** 254 254 * Show the dialog to the user. Call this after you have set all options 255 * for the dialog. You can retrieve the result using <code>getValue</code>255 * for the dialog. You can retrieve the result using {@link #getValue()}. 256 256 */ 257 257 public ExtendedDialog showDialog() { … … 273 273 274 274 /** 275 * @return int * The selected button. The count starts with 1. 276 * * A return value of ExtendedDialog.DialogClosedOtherwise means the dialog has been closed otherwise. 275 * Retrieve the user choice after the dialog has been closed. 276 * 277 * @return <ul> <li>The selected button. The count starts with 1.</li> 278 * <li>A return value of {@link #DialogClosedOtherwise} means the dialog has been closed otherwise.</li> 279 * </ul> 277 280 */ 278 281 public int getValue() { … … 283 286 284 287 /** 285 * This is called by showDialog().288 * This is called by {@link #showDialog()}. 286 289 * Only invoke from outside if you need to modify the contentPane 287 290 */ … … 402 405 /** 403 406 * This gets performed whenever a button is clicked or activated 407 * @param buttonIndex the button index (first index is 0) 404 408 * @param evt the button event 405 409 */ … … 574 578 /** 575 579 * This function checks the state of the "Do not show again" checkbox and 576 * writes the corresponding pref 580 * writes the corresponding pref. 577 581 */ 578 582 private void toggleSaveState() {
Note:
See TracChangeset
for help on using the changeset viewer.