- Timestamp:
- 2021-04-11T12:35:15+02:00 (4 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/TagInfoExtract.java
r17333 r17744 484 484 this.osm = new Node(LatLon.ZERO); 485 485 Environment env = applyStylesheet(osm); 486 Cascade c = env. mc.getCascade("default");486 Cascade c = env.getCascade("default"); 487 487 Object image = c.get("icon-image"); 488 488 if (image instanceof MapPaintStyles.IconReference && !((MapPaintStyles.IconReference) image).isDeprecatedIcon()) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java
r15998 r17744 314 314 315 315 /** 316 * Gets the current cascade for the current layer of this environment 317 * @return The cascade 318 */ 319 public Cascade getCascade() { 320 return getCascade(null); 321 } 322 323 /** 316 324 * Gets the current cascade for a given layer 317 325 * @param layer The layer to use, <code>null</code> to use the layer of the {@link Environment} -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java
r17642 r17744 690 690 @Override 691 691 public boolean applies(Environment env) { 692 Cascade cascade = env.getCascade( env.layer);692 Cascade cascade = env.getCascade(); 693 693 return cascade != null && (not ^ cascade.containsKey(id)); 694 694 } … … 866 866 static boolean selected(Environment e) { // NO_UCD (unused code) 867 867 if (e.mc != null) { 868 e. mc.getCascade(e.layer).setDefaultSelectedHandling(false);868 e.getCascade().setDefaultSelectedHandling(false); 869 869 } 870 870 return e.osm.isSelected(); -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java
r16252 r17744 77 77 */ 78 78 public static AreaElement create(final Environment env) { 79 final Cascade c = env. mc.getCascade(env.layer);79 final Cascade c = env.getCascade(); 80 80 MapImage fillImage = null; 81 81 Color color; -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaIconElement.java
r16488 r17744 57 57 */ 58 58 public static AreaIconElement create(final Environment env) { 59 final Cascade c = env.mc.getCascade(env.layer);59 final Cascade c = env.getCascade(); 60 60 MapImage iconImage = NodeElement.createIcon(env); 61 61 if (iconImage != null) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/BoxTextElement.java
r14193 r17744 216 216 if (text.labelCompositionStrategy.compose(env.osm) == null) return null; 217 217 218 Cascade c = env. mc.getCascade(env.layer);218 Cascade c = env.getCascade(); 219 219 220 220 HorizontalTextAlignment hAlign; -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java
r17519 r17744 312 312 313 313 private static LineElement createImpl(Environment env, LineType type) { 314 Cascade c = env. mc.getCascade(env.layer);315 Cascade cDef = env. mc.getCascade("default");314 Cascade c = env.getCascade(); 315 Cascade cDef = env.getCascade("default"); 316 316 Float width = computeWidth(type, c, cDef); 317 317 if (width == null) -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java
r16253 r17744 76 76 if (!allowDefault && symbol == null && mapImage == null) return null; 77 77 78 Cascade c = env. mc.getCascade(env.layer);78 Cascade c = env.getCascade(); 79 79 RotationAngle rotationAngle = createRotationAngle(env); 80 80 return new NodeElement(c, mapImage, symbol, defaultMajorZindex, rotationAngle); … … 102 102 103 103 private static RotationAngle createRotationAngle(Environment env, String key) { 104 Cascade c = env. mc.getCascade(env.layer);104 Cascade c = env.getCascade(); 105 105 106 106 RotationAngle rotationAngle = RotationAngle.NO_ROTATION; … … 145 145 CheckParameterUtil.ensureParameterNotNull(keys, "keys"); 146 146 147 Cascade c = env. mc.getCascade(env.layer);147 Cascade c = env.getCascade(); 148 148 149 149 final IconReference iconRef = c.get(keys[ICON_IMAGE_IDX], null, IconReference.class, true); … … 151 151 return null; 152 152 153 Cascade cDef = env. mc.getCascade("default");153 Cascade cDef = env.getCascade("default"); 154 154 155 155 Float widthOnDefault = cDef.get(keys[ICON_WIDTH_IDX], null, Float.class); … … 196 196 */ 197 197 private static Symbol createSymbol(Environment env) { 198 Cascade c = env. mc.getCascade(env.layer);198 Cascade c = env.getCascade(); 199 199 200 200 Keyword shapeKW = c.get("symbol-shape", null, Keyword.class); … … 206 206 } 207 207 208 Cascade cDef = env. mc.getCascade("default");208 Cascade cDef = env.getCascade("default"); 209 209 Float sizeOnDefault = cDef.get("symbol-size", null, Float.class); 210 210 if (sizeOnDefault != null && sizeOnDefault <= 0) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java
r16700 r17744 109 109 if (pattern == null) 110 110 return null; 111 Cascade c = env. mc.getCascade(env.layer);111 Cascade c = env.getCascade(); 112 112 float offset = c.get(REPEAT_IMAGE_OFFSET, 0f, Float.class); 113 113 float spacing = c.get(REPEAT_IMAGE_SPACING, 0f, Float.class); -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/TextElement.java
r13662 r17744 57 57 if (text == null) 58 58 return null; 59 final Cascade c = env. mc.getCascade(env.layer);59 final Cascade c = env.getCascade(); 60 60 61 61 Keyword positionKeyword = c.get(AreaElement.TEXT_POSITION, null, Keyword.class); … … 74 74 */ 75 75 public static TextElement createForContent(Environment env) { 76 final Cascade c = env. mc.getCascade(env.layer);76 final Cascade c = env.getCascade(); 77 77 Keyword positionKeyword = c.get(AreaElement.TEXT_POSITION, null, Keyword.class); 78 78 if (positionKeyword != null) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/TextLabel.java
r16253 r17744 138 138 public static TextLabel create(Environment env, Color defaultTextColor, boolean defaultAnnotate) { 139 139 CheckParameterUtil.ensureParameterNotNull(defaultTextColor); 140 Cascade c = env. mc.getCascade(env.layer);140 Cascade c = env.getCascade(); 141 141 142 142 LabelCompositionStrategy strategy = buildLabelCompositionStrategy(c, defaultAnnotate);
Note:
See TracChangeset
for help on using the changeset viewer.