Changeset 27874 in osm for applications
- Timestamp:
- 2012-02-19T09:22:19+01:00 (13 years ago)
- 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 50 50 import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug; 51 51 import org.openstreetmap.josm.plugins.mapdust.service.value.Status; 52 import org.openstreetmap.josm.plugins.mapdust.service.value. Type;52 import org.openstreetmap.josm.plugins.mapdust.service.value.BugType; 53 53 54 54 … … 104 104 if (event != null) { 105 105 CreateBugDialog createDialog = (CreateBugDialog) getDialog(); 106 Type type = (Type) (createDialog).getCbbType().getSelectedItem();106 BugType type = (BugType) (createDialog).getCbbType().getSelectedItem(); 107 107 String nickname = createDialog.getTxtNickname().getText(); 108 108 String commentText = createDialog.getTxtDescription().getText(); -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/ChangeBugStatusDialog.java
r25828 r27874 280 280 * @return the type 281 281 */ 282 public String getType() { 283 return this.type; 284 } 282 // caused compile error 283 // public String getType() { return this.type; } 285 284 286 285 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/FilterBugDialog.java
r25828 r27874 55 55 import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance; 56 56 import org.openstreetmap.josm.plugins.mapdust.service.value.Status; 57 import org.openstreetmap.josm.plugins.mapdust.service.value. Type;57 import org.openstreetmap.josm.plugins.mapdust.service.value.BugType; 58 58 import org.openstreetmap.josm.tools.ImageProvider; 59 59 … … 66 66 */ 67 67 public class FilterBugDialog extends AbstractDialog { 68 org.openstreetmap.josm.plugins.mapdust.service.value.BugType ttt=org.openstreetmap.josm.plugins.mapdust.service.value.BugType.WRONG_TURN; 68 69 69 70 /** The serial version UID */ … … 282 283 283 284 /* wrong_turn type */ 284 filterTypes[0] = new FilterCheckBox( Type.WRONG_TURN.getKey(),285 filterTypes[0] = new FilterCheckBox(BugType.WRONG_TURN.getKey(), 285 286 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)); 287 288 /* bad_routing type */ 288 filterTypes[1] = new FilterCheckBox( Type.WRONG_ROUNDABOUT.getKey(),289 filterTypes[1] = new FilterCheckBox(BugType.WRONG_ROUNDABOUT.getKey(), 289 290 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, 291 292 25)); 292 293 /* oneway_road type */ 293 filterTypes[2] = new FilterCheckBox( Type.MISSING_STREET.getKey(),294 filterTypes[2] = new FilterCheckBox(BugType.MISSING_STREET.getKey(), 294 295 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, 296 297 25)); 297 298 /* blocked_street type */ 298 filterTypes[3] = new FilterCheckBox( Type.BLOCKED_STREET.getKey(),299 filterTypes[3] = new FilterCheckBox(BugType.BLOCKED_STREET.getKey(), 299 300 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, 301 302 25)); 302 303 /* missing_street type */ 303 filterTypes[4] = new FilterCheckBox( Type.BAD_ROUTING.getKey(),304 filterTypes[4] = new FilterCheckBox(BugType.BAD_ROUTING.getKey(), 304 305 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)); 306 307 /* wrong_roundabout type */ 307 filterTypes[5] = new FilterCheckBox( Type.MISSING_SPEEDLIMIT.getKey(),308 filterTypes[5] = new FilterCheckBox(BugType.MISSING_SPEEDLIMIT.getKey(), 308 309 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, 310 311 180, 25)); 311 312 /* missing_speedlimit type */ 312 filterTypes[6] = new FilterCheckBox( Type.OTHER.getKey(),313 filterTypes[6] = new FilterCheckBox(BugType.OTHER.getKey(), 313 314 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)); 315 316 /* other type */ 316 filterTypes[7] = new FilterCheckBox( Type.ONEWAY_ROAD.getKey(),317 filterTypes[7] = new FilterCheckBox(BugType.ONEWAY_ROAD.getKey(), 317 318 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)); 319 320 320 321 if (prevFilter != null && prevFilter.getTypes() != null) { -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/TypesListModel.java
r25591 r27874 31 31 import javax.swing.AbstractListModel; 32 32 import javax.swing.ComboBoxModel; 33 import org.openstreetmap.josm.plugins.mapdust.service.value. Type;33 import org.openstreetmap.josm.plugins.mapdust.service.value.BugType; 34 34 35 35 36 36 /** 37 * The combo box model for the bug <code> Type</code>s.37 * The combo box model for the bug <code>BugType</code>s. 38 38 * 39 39 * @author Bea … … 46 46 47 47 /** The array of types */ 48 private final Type[] types;48 private final BugType[] types; 49 49 50 50 /** The selected type */ 51 private Type selection = null;51 private BugType selection = null; 52 52 53 53 /** … … 55 55 */ 56 56 public TypesListModel() { 57 this.types = Type.getTypes();57 this.types = BugType.getTypes(); 58 58 } 59 59 60 60 /** 61 * Returns the <code> Type</code> from the given position.61 * Returns the <code>BugType</code> from the given position. 62 62 * 63 63 * @param index The position of the element 64 * @return <code> Type</code> from the given position64 * @return <code>BugType</code> from the given position 65 65 */ 66 66 @Override … … 80 80 81 81 /** 82 * Returns the selected <code> Type</code> object.82 * Returns the selected <code>BugType</code> object. 83 83 * 84 84 * @return selected item … … 90 90 91 91 /** 92 * Sets the selected <code> Type</code> object.92 * Sets the selected <code>BugType</code> object. 93 93 * 94 94 * @param anItem The selected item … … 96 96 @Override 97 97 public void setSelectedItem(Object anItem) { 98 selection = ( Type) anItem;98 selection = (BugType) anItem; 99 99 } 100 100 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ComboBoxRenderer.java
r24514 r27874 36 36 import javax.swing.JList; 37 37 import javax.swing.ListCellRenderer; 38 import org.openstreetmap.josm.plugins.mapdust.service.value. Type;38 import org.openstreetmap.josm.plugins.mapdust.service.value.BugType; 39 39 import org.openstreetmap.josm.tools.ImageProvider; 40 40 … … 65 65 JLabel label = (JLabel) defaultRenderer.getListCellRendererComponent( 66 66 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; 69 69 String iconPath = "bugs/normal/open_" + type.getKey() + ".png"; 70 70 String text = type.getValue(); -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/converter/MapdustConverter.java
r25828 r27874 42 42 import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance; 43 43 import org.openstreetmap.josm.plugins.mapdust.service.value.Status; 44 import org.openstreetmap.josm.plugins.mapdust.service.value. Type;44 import org.openstreetmap.josm.plugins.mapdust.service.value.BugType; 45 45 46 46 … … 85 85 bug.setStatus(status); 86 86 /* sets the type */ 87 Type type =Type.getType(bugProperties.getType());87 BugType type = BugType.getType(bugProperties.getType()); 88 88 bug.setType(type); 89 89 /* sets the relevance */ … … 177 177 bug.setStatus(status); 178 178 /* sets the type */ 179 Type type =Type.getType(bugProperties.getType());179 BugType type = BugType.getType(bugProperties.getType()); 180 180 bug.setType(type); 181 181 /* sets the relevance */ -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustBug.java
r25828 r27874 60 60 61 61 /** The type of the object */ 62 private Type type;62 private BugType type; 63 63 64 64 /** The relevance of the object */ … … 105 105 * @param nickname The nickname of the user who created the bug 106 106 */ 107 public MapdustBug(LatLon latLon, Type type, String description,107 public MapdustBug(LatLon latLon, BugType type, String description, 108 108 String nickname) { 109 109 this.latLon = latLon; … … 136 136 */ 137 137 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, 139 139 MapdustRelevance relevance, String description, 140 140 boolean isDefaultDescription, String nickname, String skoUid, … … 255 255 * @return the type 256 256 */ 257 public Type getType() {257 public BugType getType() { 258 258 return type; 259 259 } … … 264 264 * @param type the type to set 265 265 */ 266 public void setType( Type type) {266 public void setType(BugType type) { 267 267 this.type = type; 268 268 }
Note:
See TracChangeset
for help on using the changeset viewer.