Ignore:
Timestamp:
2012-02-19T19:18:51+01:00 (13 years ago)
Author:
stoecker
Message:

fix deprecation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RemoveRelationMemberCommand.java

    r22046 r27887  
    77import java.util.Collection;
    88
    9 import javax.swing.JLabel;
     9import javax.swing.Icon;
    1010
    1111import org.openstreetmap.josm.Main;
     
    6363    @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {}
    6464
    65     @Override public JLabel getDescription() {
     65    @Override public String getDescriptionText() {
    6666        String msg = "";
    6767        switch(OsmPrimitiveType.from(member.getMember())) {
     
    7070            case RELATION: msg = marktr("Remove relation ''{0}'' at position {1} from relation ''{2}''"); break;
    7171        }
    72         return new JLabel(
    73                 tr(msg,
    74                         member.getMember().getDisplayName(DefaultNameFormatter.getInstance()),
    75                         relation.getMembers().indexOf(member),
    76                         relation.getDisplayName(DefaultNameFormatter.getInstance())
    77                 ),
    78                 ImageProvider.get(OsmPrimitiveType.from(relation)),
    79                 JLabel.HORIZONTAL
    80         );
     72        return tr(msg,
     73            member.getMember().getDisplayName(DefaultNameFormatter.getInstance()),
     74            relation.getMembers().indexOf(member),
     75            relation.getDisplayName(DefaultNameFormatter.getInstance()));
     76    }
     77
     78    @Override public Icon getDescriptionIcon() {
     79        return ImageProvider.get(OsmPrimitiveType.from(relation));
    8180    }
    8281}
Note: See TracChangeset for help on using the changeset viewer.