Changeset 5951 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2013-05-10T04:24:25+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r5926 r5951 33 33 34 34 public static class ButtonSpec { 35 public String text; 36 public Icon icon; 37 public String tooltipText; 38 public String helpTopic; 39 35 public final String text; 36 public final Icon icon; 37 public final String tooltipText; 38 public final String helpTopic; 39 public final boolean enabled; 40 40 41 /** 41 * 42 * @param text 43 * @param icon 44 * @param tooltipText 42 * Constructs a new {@code ButtonSpec}. 43 * @param text the button text 44 * @param icon the icon to display. Can be null 45 * @param tooltipText the tooltip text. Can be null. 45 46 * @param helpTopic the help topic. Can be null. 46 47 */ 47 48 public ButtonSpec(String text, Icon icon, String tooltipText, String helpTopic) { 49 this(text, icon, tooltipText, helpTopic, true); 50 } 51 52 /** 53 * Constructs a new {@code ButtonSpec}. 54 * @param text the button text 55 * @param icon the icon to display. Can be null 56 * @param tooltipText the tooltip text. Can be null. 57 * @param helpTopic the help topic. Can be null. 58 * @param enabled the enabled status 59 * @since 5951 60 */ 61 public ButtonSpec(String text, Icon icon, String tooltipText, String helpTopic, boolean enabled) { 48 62 this.text = text; 49 63 this.icon = icon; 50 64 this.tooltipText = tooltipText; 51 65 this.helpTopic = helpTopic; 66 this.enabled = enabled; 52 67 } 53 68 } … … 95 110 } 96 111 b.setFocusable(true); 112 b.setEnabled(spec.enabled); 97 113 buttons.add(b); 98 114 }
Note:
See TracChangeset
for help on using the changeset viewer.