Changeset 16593 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-07-19T22:26:57+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/routes
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/routes
- Property svn:ignore
-
old new 1 1 build 2 3 bin
-
- Property svn:ignore
-
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RouteLayer.java
r16428 r16593 35 35 36 36 int index = 0; 37 for (RoutesXMLRoute route:xmlLayer.getRoute()) { 38 Color color = ColorHelper.html2color(route.getColor()); 39 if (color == null) { 40 color = Color.RED; 41 System.err.printf("Routes plugin - unable to convert color (%s)\n", route.getColor()); 37 for (RoutesXMLRoute route:xmlLayer.getRoute()) { 38 if (route.isEnabled()) { 39 Color color = ColorHelper.html2color(route.getColor()); 40 if (color == null) { 41 color = Color.RED; 42 System.err.printf("Routes plugin - unable to convert color (%s)\n", route.getColor()); 43 } 44 routes.add(new RouteDefinition(index++, color, route.getPattern())); 42 45 } 43 routes.add(new RouteDefinition(index++, color, route.getPattern()));44 46 } 45 47 46 /*routes.add(new RouteDefinition(Color.RED,47 "((type:relation | type:way) kct_red=*) | (color=red type=route route=hiking network=cz:kct)"));48 49 routes.add(new RouteDefinition(Color.YELLOW,50 "((type:relation | type:way) kct_yellow=*) | (color=yellow type=route route=hiking network=cz:kct)"));51 52 routes.add(new RouteDefinition(Color.BLUE,53 "((type:relation | type:way) kct_blue=*) | (color=blue type=route route=hiking network=cz:kct)"));54 55 routes.add(new RouteDefinition(Color.GREEN,56 "((type:relation | type:way) kct_green=*) | (color=green type=route route=hiking network=cz:kct)"));57 58 routes.add(new RouteDefinition(Color.MAGENTA,59 "(type:way (ncn=* | (lcn=* | rcn=* ))) | (type:relation type=route route=bicycle)"));60 61 */62 48 if ("wide".equals(Main.pref.get("routes.painter"))) { 63 49 pathPainter = new WideLinePainter(this); -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java
r16428 r16593 61 61 new FileInputStream(getPluginDir() + File.separator + "routes.xml")); 62 62 for (RoutesXMLLayer layer:routes.getLayer()) { 63 routeLayers.add(new RouteLayer(layer)); 63 if (layer.isEnabled()) { 64 routeLayers.add(new RouteLayer(layer)); 65 } 64 66 } 65 67 } catch (Exception e) { -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/ObjectFactory.java
r16428 r16593 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2009.07. 09 at 08:14:28 odp. CEST5 // Generated on: 2009.07.19 at 03:50:48 odp. CEST 6 6 // 7 7 -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/Routes.java
r16428 r16593 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2009.07. 09 at 08:14:28 odp. CEST5 // Generated on: 2009.07.19 at 03:50:48 odp. CEST 6 6 // 7 7 -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/RoutesXMLLayer.java
r16428 r16593 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2009.07. 09 at 08:14:28 odp. CEST5 // Generated on: 2009.07.19 at 03:50:48 odp. CEST 6 6 // 7 7 … … 30 30 * </sequence> 31 31 * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> 32 * <attribute name="enabled" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> 32 33 * </restriction> 33 34 * </complexContent> … … 46 47 @XmlAttribute 47 48 protected String name; 49 @XmlAttribute 50 protected Boolean enabled; 48 51 49 52 /** … … 100 103 } 101 104 105 /** 106 * Gets the value of the enabled property. 107 * 108 * @return 109 * possible object is 110 * {@link Boolean } 111 * 112 */ 113 public boolean isEnabled() { 114 if (enabled == null) { 115 return true; 116 } else { 117 return enabled; 118 } 119 } 120 121 /** 122 * Sets the value of the enabled property. 123 * 124 * @param value 125 * allowed object is 126 * {@link Boolean } 127 * 128 */ 129 public void setEnabled(Boolean value) { 130 this.enabled = value; 131 } 132 102 133 } -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/RoutesXMLRoute.java
r16428 r16593 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2009.07. 09 at 08:14:28 odp. CEST5 // Generated on: 2009.07.19 at 03:50:48 odp. CEST 6 6 // 7 7 … … 29 29 * </sequence> 30 30 * <attribute name="color" type="{http://www.w3.org/2001/XMLSchema}string" /> 31 * <attribute name="enabled" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> 31 32 * </restriction> 32 33 * </complexContent> … … 46 47 @XmlAttribute 47 48 protected String color; 49 @XmlAttribute 50 protected Boolean enabled; 48 51 49 52 /** … … 95 98 } 96 99 100 /** 101 * Gets the value of the enabled property. 102 * 103 * @return 104 * possible object is 105 * {@link Boolean } 106 * 107 */ 108 public boolean isEnabled() { 109 if (enabled == null) { 110 return true; 111 } else { 112 return enabled; 113 } 114 } 115 116 /** 117 * Sets the value of the enabled property. 118 * 119 * @param value 120 * allowed object is 121 * {@link Boolean } 122 * 123 */ 124 public void setEnabled(Boolean value) { 125 this.enabled = value; 126 } 127 97 128 } -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/package-info.java
r16428 r16593 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2009.07. 09 at 08:14:28 odp. CEST5 // Generated on: 2009.07.19 at 03:50:48 odp. CEST 6 6 // 7 7 -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/routes.xsd
r16428 r16593 33 33 </sequence> 34 34 <attribute name="name" type="string"/> 35 <attribute name="enabled" type="boolean" default="true"/> 35 36 </complexType> 36 37 … … 40 41 </sequence> 41 42 <attribute name="color" type="string"/> 43 <attribute name="enabled" type="boolean" default="true"/> 42 44 </complexType> 43 45
Note:
See TracChangeset
for help on using the changeset viewer.