Changeset 5002 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2012-02-19T19:43:23+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/PseudoCommand.java
r4918 r5002 15 15 abstract public class PseudoCommand { 16 16 /** 17 * Provide a description that can be presented in a list or tree view.18 * @deprecated This abstract method is deprecated.19 * On 2012-03-01, this abstract method will be removed.20 * At the same moment, the methods {@link #getDescrpitionText()} and {@link #getDescrpitionIcon()}21 * will be made abstract.22 * For a smooth transition, replace {@link #getDescription()} by implementations of23 * {@link #getDescrpitionText()} and {@link #getDescrpitionIcon()} as early as possible.24 * {@link #getDescription()} is no longer abstract and can therefore be removed.25 */26 @Deprecated27 public Object getDescription() {28 return null;29 }30 31 /**32 17 * Provides a description text representing this command. 33 18 */ 34 public String getDescriptionText() { 35 Object o = getDescription(); 36 if (o instanceof JLabel) { 37 return ((JLabel) o).getText(); 38 } else { 39 return o.toString(); 40 } 41 } 19 abstract public String getDescriptionText(); 42 20 43 21 /** … … 45 23 */ 46 24 public Icon getDescriptionIcon() { 47 Object o = getDescription(); 48 if (o instanceof JLabel) { 49 return ((JLabel) o).getIcon(); 50 } else { 51 return null; 52 } 25 return null; 53 26 } 54 27
Note: See TracChangeset
for help on using the changeset viewer.