Changeset 27874 in osm for applications


Ignore:
Timestamp:
2012-02-19T09:22:19+01:00 (13 years ago)
Author:
akks
Message:

fix MapDust compile error on newer JDK

Location:
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteAddBug.java

    r25828 r27874  
    5050import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
    5151import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
    52 import org.openstreetmap.josm.plugins.mapdust.service.value.Type;
     52import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
    5353
    5454
     
    104104        if (event != null) {
    105105            CreateBugDialog createDialog = (CreateBugDialog) getDialog();
    106             Type type = (Type) (createDialog).getCbbType().getSelectedItem();
     106            BugType type = (BugType) (createDialog).getCbbType().getSelectedItem();
    107107            String nickname = createDialog.getTxtNickname().getText();
    108108            String commentText = createDialog.getTxtDescription().getText();
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/ChangeBugStatusDialog.java

    r25828 r27874  
    280280     * @return the type
    281281     */
    282     public String getType() {
    283         return this.type;
    284     }
     282// caused compile error
     283//    public String getType() {        return this.type;    }
    285284
    286285}
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/FilterBugDialog.java

    r25828 r27874  
    5555import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
    5656import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
    57 import org.openstreetmap.josm.plugins.mapdust.service.value.Type;
     57import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
    5858import org.openstreetmap.josm.tools.ImageProvider;
    5959
     
    6666 */
    6767public class FilterBugDialog extends AbstractDialog {
     68    org.openstreetmap.josm.plugins.mapdust.service.value.BugType ttt=org.openstreetmap.josm.plugins.mapdust.service.value.BugType.WRONG_TURN;
    6869
    6970    /** The serial version UID */
     
    282283
    283284        /* wrong_turn type */
    284         filterTypes[0] = new FilterCheckBox(Type.WRONG_TURN.getKey(),
     285        filterTypes[0] = new FilterCheckBox(BugType.WRONG_TURN.getKey(),
    285286                new Rectangle(110, 90, 20, 25), "dialogs/wrong_turn.png",
    286                 Type.WRONG_TURN.getValue(), new Rectangle(130, 90, 120, 25));
     287                BugType.WRONG_TURN.getValue(), new Rectangle(130, 90, 120, 25));
    287288        /* bad_routing type */
    288         filterTypes[1] = new FilterCheckBox(Type.WRONG_ROUNDABOUT.getKey(),
     289        filterTypes[1] = new FilterCheckBox(BugType.WRONG_ROUNDABOUT.getKey(),
    289290                new Rectangle(270, 90, 20, 25), "dialogs/wrong_roundabout.png",
    290                 Type.WRONG_ROUNDABOUT.getValue(), new Rectangle(290, 90, 180,
     291                BugType.WRONG_ROUNDABOUT.getValue(), new Rectangle(290, 90, 180,
    291292                        25));
    292293        /* oneway_road type */
    293         filterTypes[2] =  new FilterCheckBox(Type.MISSING_STREET.getKey(),
     294        filterTypes[2] =  new FilterCheckBox(BugType.MISSING_STREET.getKey(),
    294295                new Rectangle(110, 125, 20, 25), "dialogs/missing_street.png",
    295                 Type.MISSING_STREET.getValue(), new Rectangle(130, 125, 150,
     296                BugType.MISSING_STREET.getValue(), new Rectangle(130, 125, 150,
    296297                        25));
    297298        /* blocked_street type */
    298         filterTypes[3] = new FilterCheckBox(Type.BLOCKED_STREET.getKey(),
     299        filterTypes[3] = new FilterCheckBox(BugType.BLOCKED_STREET.getKey(),
    299300                new Rectangle(270, 125, 20, 25), "dialogs/blocked_street.png",
    300                 Type.BLOCKED_STREET.getValue(), new Rectangle(290, 125, 180,
     301                BugType.BLOCKED_STREET.getValue(), new Rectangle(290, 125, 180,
    301302                        25));
    302303        /* missing_street type */
    303         filterTypes[4] = new FilterCheckBox(Type.BAD_ROUTING.getKey(),
     304        filterTypes[4] = new FilterCheckBox(BugType.BAD_ROUTING.getKey(),
    304305                new Rectangle(110, 160, 20, 25), "dialogs/bad_routing.png",
    305                 Type.BAD_ROUTING.getValue(), new Rectangle(130, 160, 150, 25));
     306                BugType.BAD_ROUTING.getValue(), new Rectangle(130, 160, 150, 25));
    306307        /* wrong_roundabout type */
    307         filterTypes[5] = new FilterCheckBox(Type.MISSING_SPEEDLIMIT.getKey(),
     308        filterTypes[5] = new FilterCheckBox(BugType.MISSING_SPEEDLIMIT.getKey(),
    308309                new Rectangle(270, 160, 20, 25), "dialogs/missing_speedlimit.png",
    309                 Type.MISSING_SPEEDLIMIT.getValue(), new Rectangle(290, 160,
     310                BugType.MISSING_SPEEDLIMIT.getValue(), new Rectangle(290, 160,
    310311                        180, 25));
    311312        /* missing_speedlimit type */
    312         filterTypes[6] = new FilterCheckBox(Type.OTHER.getKey(),
     313        filterTypes[6] = new FilterCheckBox(BugType.OTHER.getKey(),
    313314                new Rectangle(110, 195, 20, 25), "dialogs/other.png",
    314                 Type.OTHER.getValue(), new Rectangle(130, 195, 150, 25));
     315                BugType.OTHER.getValue(), new Rectangle(130, 195, 150, 25));
    315316        /* other type */
    316         filterTypes[7] = new FilterCheckBox(Type.ONEWAY_ROAD.getKey(),
     317        filterTypes[7] = new FilterCheckBox(BugType.ONEWAY_ROAD.getKey(),
    317318                new Rectangle(270, 195, 20, 25), "dialogs/oneway_road.png",
    318                 Type.ONEWAY_ROAD.getValue(), new Rectangle(290, 195, 180, 25));
     319                BugType.ONEWAY_ROAD.getValue(), new Rectangle(290, 195, 180, 25));
    319320
    320321        if (prevFilter != null && prevFilter.getTypes() != null) {
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/TypesListModel.java

    r25591 r27874  
    3131import javax.swing.AbstractListModel;
    3232import javax.swing.ComboBoxModel;
    33 import org.openstreetmap.josm.plugins.mapdust.service.value.Type;
     33import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
    3434
    3535
    3636/**
    37  * The combo box model for the bug <code>Type</code>s.
     37 * The combo box model for the bug <code>BugType</code>s.
    3838 *
    3939 * @author Bea
     
    4646
    4747    /** The array of types */
    48     private final Type[] types;
     48    private final BugType[] types;
    4949
    5050    /** The selected type */
    51     private Type selection = null;
     51    private BugType selection = null;
    5252
    5353    /**
     
    5555     */
    5656    public TypesListModel() {
    57         this.types = Type.getTypes();
     57        this.types = BugType.getTypes();
    5858    }
    5959
    6060    /**
    61      * Returns the <code>Type</code> from the given position.
     61     * Returns the <code>BugType</code> from the given position.
    6262     *
    6363     * @param index The position of the element
    64      * @return <code>Type</code> from the given position
     64     * @return <code>BugType</code> from the given position
    6565     */
    6666    @Override
     
    8080
    8181    /**
    82      * Returns the selected <code>Type</code> object.
     82     * Returns the selected <code>BugType</code> object.
    8383     *
    8484     * @return selected item
     
    9090
    9191    /**
    92      * Sets the selected <code>Type</code> object.
     92     * Sets the selected <code>BugType</code> object.
    9393     *
    9494     * @param anItem The selected item
     
    9696    @Override
    9797    public void setSelectedItem(Object anItem) {
    98         selection = (Type) anItem;
     98        selection = (BugType) anItem;
    9999    }
    100100}
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ComboBoxRenderer.java

    r24514 r27874  
    3636import javax.swing.JList;
    3737import javax.swing.ListCellRenderer;
    38 import org.openstreetmap.josm.plugins.mapdust.service.value.Type;
     38import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
    3939import org.openstreetmap.josm.tools.ImageProvider;
    4040
     
    6565        JLabel label = (JLabel) defaultRenderer.getListCellRendererComponent(
    6666                list, value, index, isSelected, cellHasFocus);
    67         if (value instanceof Type) {
    68             Type type = (Type) value;
     67        if (value instanceof BugType) {
     68            BugType type = (BugType) value;
    6969            String iconPath = "bugs/normal/open_" + type.getKey() + ".png";
    7070            String text = type.getValue();
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/converter/MapdustConverter.java

    r25828 r27874  
    4242import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
    4343import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
    44 import org.openstreetmap.josm.plugins.mapdust.service.value.Type;
     44import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
    4545
    4646
     
    8585                bug.setStatus(status);
    8686                /* sets the type */
    87                 Type type = Type.getType(bugProperties.getType());
     87                BugType type = BugType.getType(bugProperties.getType());
    8888                bug.setType(type);
    8989                /* sets the relevance */
     
    177177                bug.setStatus(status);
    178178                /* sets the type */
    179                 Type type = Type.getType(bugProperties.getType());
     179                BugType type = BugType.getType(bugProperties.getType());
    180180                bug.setType(type);
    181181                /* sets the relevance */
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustBug.java

    r25828 r27874  
    6060
    6161    /** The type of the object */
    62     private Type type;
     62    private BugType type;
    6363
    6464    /** The relevance of the object */
     
    105105     * @param nickname The nickname of the user who created the bug
    106106     */
    107     public MapdustBug(LatLon latLon, Type type, String description,
     107    public MapdustBug(LatLon latLon, BugType type, String description,
    108108            String nickname) {
    109109        this.latLon = latLon;
     
    136136     */
    137137    public MapdustBug(Long id, LatLon latLon, Address address,
    138             Date dateCreated, Date dateUpdated, Status status, Type type,
     138            Date dateCreated, Date dateUpdated, Status status, BugType type,
    139139            MapdustRelevance relevance, String description,
    140140            boolean isDefaultDescription, String nickname, String skoUid,
     
    255255     * @return the type
    256256     */
    257     public Type getType() {
     257    public BugType getType() {
    258258        return type;
    259259    }
     
    264264     * @param type the type to set
    265265     */
    266     public void setType(Type type) {
     266    public void setType(BugType type) {
    267267        this.type = type;
    268268    }
Note: See TracChangeset for help on using the changeset viewer.