- Timestamp:
- 2016-12-08T09:48:55+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java
r9371 r11370 5 5 6 6 /** 7 * A ninterval of the form "lower < x <= upper" where 0 <= lower < upper.7 * A scale interval of the form "lower < x <= upper" where 0 <= lower < upper. 8 8 * (upper can be Double.POSITIVE_INFINITY) 9 9 * immutable class -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r11038 r11370 8 8 import java.util.List; 9 9 import java.util.NoSuchElementException; 10 import java.util.Set; 10 11 import java.util.function.IntFunction; 11 12 import java.util.function.IntSupplier; 12 import java.util.Set;13 13 import java.util.regex.PatternSyntaxException; 14 14 … … 57 57 boolean matches(Environment env); 58 58 59 /** 60 * Returns the subpart, if supported. A subpart identifies different rendering layers (<code>::subpart</code> syntax). 61 * @return the subpart, if supported 62 * @throws UnsupportedOperationException if not supported 63 */ 59 64 Subpart getSubpart(); 60 65 66 /** 67 * Returns the scale range, an interval of the form "lower < x <= upper" where 0 <= lower < upper. 68 * @return the scale range, if supported 69 * @throws UnsupportedOperationException if not supported 70 */ 61 71 Range getRange(); 62 72 … … 75 85 Selector optimizedBaseCheck(); 76 86 87 /** 88 * The type of child of parent selector. 89 * @see ChildOrParentSelector 90 */ 77 91 enum ChildOrParentSelectorType { 78 92 CHILD, PARENT, ELEMENT_OF, CROSSING, SIBLING … … 91 105 * node[traffic_calming] < way { ... } // example (way that has a traffic calming node) 92 106 * </pre> 93 * 107 * <p>Child: see <a href="https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Childselector">wiki</a> 108 * <br>Parent: see <a href="https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Parentselector">wiki</a></p> 94 109 */ 95 110 class ChildOrParentSelector implements Selector { … … 482 497 } 483 498 499 /** 500 * In a child selector, conditions on the link between a parent and a child object. 501 * See <a href="https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Linkselector">wiki</a> 502 */ 484 503 class LinkSelector extends AbstractSelector { 485 504 … … 511 530 @Override 512 531 public String toString() { 513 return "LinkSelector{ " + "conditions=" + conds + '}';532 return "LinkSelector{conditions=" + conds + '}'; 514 533 } 515 534 } 516 535 536 /** 537 * General selector. See <a href="https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Selectors">wiki</a> 538 */ 517 539 class GeneralSelector extends OptimizedGeneralSelector { 518 540 … … 536 558 } 537 559 560 /** 561 * Superclass of {@link GeneralSelector}. Used to create an "optimized" copy of this selector that omits the base check. 562 * @see Selector#optimizedBaseCheck 563 */ 538 564 class OptimizedGeneralSelector extends AbstractSelector { 539 565 public final String base; … … 651 677 public String toString() { 652 678 return base + (Range.ZERO_TO_INFINITY.equals(range) ? "" : range) + Utils.join("", conds) 653 + (subpart != null && subpart != Subpart.DEFAULT_SUBPART ? "::" + subpart: "");679 + (subpart != null && subpart != Subpart.DEFAULT_SUBPART ? ("::" + subpart) : ""); 654 680 } 655 681 }
Note:
See TracChangeset
for help on using the changeset viewer.