- Timestamp:
- 2022-03-23T20:21:04+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java
r18019 r18414 712 712 713 713 /** 714 * {@code closed} tests whether the way is closed or the relation is a closed multipolygon714 * {@code :closed} tests whether the way is closed or the relation is a closed multipolygon 715 715 * @param e MapCSS environment 716 716 * @return {@code true} if the way is closed or the relation is a closed multipolygon … … 719 719 if (e.osm instanceof IWay<?> && ((IWay<?>) e.osm).isClosed()) 720 720 return true; 721 return e.osm instanceof IRelation<?> && ((IRelation<?>) e.osm).isMultipolygon();721 return e.osm instanceof IRelation<?> && e.osm.isMultipolygon(); 722 722 } 723 723 … … 733 733 734 734 /** 735 * {@code ;new} tests whether the object is new.735 * {@code :new} tests whether the object is new. 736 736 * @param e MapCSS environment 737 737 * @return {@code true} if the object is new … … 784 784 785 785 /** 786 * {@code unconnected}: tests whether the object is aunconnected node.787 * @param e MapCSS environment 788 * @return {@code true} if the object is a unconnected node786 * {@code :unconnected} tests whether the object is an unconnected node. 787 * @param e MapCSS environment 788 * @return {@code true} if the object is an unconnected node 789 789 */ 790 790 static boolean unconnected(Environment e) { … … 793 793 794 794 /** 795 * {@code righthandtraffic} checks if there is right-hand traffic at the current location.795 * {@code :righthandtraffic} checks if there is right-hand traffic at the current location. 796 796 * @param e MapCSS environment 797 797 * @return {@code true} if there is right-hand traffic at the current location … … 803 803 804 804 /** 805 * {@code clockwise} whether the way is closed and oriented clockwise,805 * {@code :clockwise} whether the way is closed and oriented clockwise, 806 806 * or non-closed and the 1st, 2nd and last node are in clockwise order. 807 807 * @param e MapCSS environment … … 814 814 815 815 /** 816 * {@code anticlockwise} whether the way is closed and oriented anticlockwise,816 * {@code :anticlockwise} whether the way is closed and oriented anticlockwise, 817 817 * or non-closed and the 1st, 2nd and last node are in anticlockwise order. 818 818 * @param e MapCSS environment … … 825 825 826 826 /** 827 * {@code unclosed-multipolygon} tests whether the object is an unclosed multipolygon.827 * {@code :unclosed-multipolygon} tests whether the object is an unclosed multipolygon. 828 828 * @param e MapCSS environment 829 829 * @return {@code true} if the object is an unclosed multipolygon … … 838 838 839 839 /** 840 * {@code in-downloaded-area} tests whether the object is within source area ("downloaded area").840 * {@code :in-downloaded-area} tests whether the object is within source area ("downloaded area"). 841 841 * @param e MapCSS environment 842 842 * @return {@code true} if the object is within source area ("downloaded area") … … 847 847 } 848 848 849 /** 850 * {@code :completely_downloaded} tests whether the object is completely downloaded 851 * @param e MapCSS environment 852 * @return {@code true} if the object is completely downloaded 853 */ 849 854 static boolean completely_downloaded(Environment e) { 850 855 if (e.osm instanceof IRelation<?>) { … … 862 867 if (e.osm instanceof IWay<?> && ((IWay<?>) e.osm).isClosed()) 863 868 return true; 864 if (e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon()) {869 if (e.osm instanceof Relation && e.osm.isMultipolygon()) { 865 870 Multipolygon multipolygon = MultipolygonCache.getInstance().get((Relation) e.osm); 866 871 return multipolygon != null && multipolygon.getOpenEnds().isEmpty(); … … 869 874 } 870 875 876 /** 877 * {@code :selected} tests whether the object is selected in the editor 878 * @param e MapCSS environment 879 * @return {@code true} if the object is selected 880 */ 871 881 static boolean selected(Environment e) { 872 882 if (e.mc != null) { … … 877 887 878 888 /** 879 * Check if the object is highlighted (i.e.,is hovered over)889 * {@code :highlighted} tests whether the object is highlighted (i.e. is hovered over) 880 890 * @param e The MapCSS environment 881 891 * @return {@code true} if the object is highlighted
Note:
See TracChangeset
for help on using the changeset viewer.