Enum ECSSProperty

  • All Implemented Interfaces:
    com.helger.commons.name.IHasName, ICSSVersionAware, Serializable, Comparable<ECSSProperty>

    public enum ECSSProperty
    extends Enum<ECSSProperty>
    implements com.helger.commons.name.IHasName, ICSSVersionAware
    Contains a list of most CSS property names.
    Source of Webkit property names: http://trac.webkit.org/export/0/trunk/Source/WebCore/css/CSSPropertyNames.in

    MS specific property names: http://msdn.microsoft.com/en-us/library/ie/hh772373%28v=vs.85%29.aspx
    http://blogs.msdn.com/b/ie/archive/2008/09/08/microsoft-css-vendor-extensions .aspx

    Mozilla specific property names: https://developer.mozilla.org/en/CSS_Reference/Mozilla_Extensions

    CSS 3.0: see ECSSSpecification
    Author:
    Philip Helger
    • Method Detail

      • values

        public static ECSSProperty[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ECSSProperty c : ECSSProperty.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ECSSProperty valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getName

        @Nonnull
        @Nonempty
        public String getName()
        Specified by:
        getName in interface com.helger.commons.name.IHasName
        Returns:
        The name of this property. E.g. color or -webkit-writing-mode
      • getVendorIndependentName

        @Nonnull
        @Nonempty
        public String getVendorIndependentName()
        Returns:
        The name of the property without an eventually present vendor prefix.
        Since:
        3.9.0
      • getAllSpecifications

        @Nonnull
        @ReturnsMutableCopy
        public Set<ECSSSpecification> getAllSpecifications()
        Returns:
        A copy with all specifications, where the property is defined. Never null but maybe empty.
      • isVendorSpecific

        public boolean isVendorSpecific​(@Nonnull
                                        ECSSVendorPrefix eVendorPrefix)
        Check if this property is specific to the passed vendor prefix.
        Parameters:
        eVendorPrefix - The vendor prefix to check. May not be null.
        Returns:
        true if this property is specific to this vendor, false otherwise.
        Since:
        3.9.0
      • isVendorSpecific

        public boolean isVendorSpecific()
        Returns:
        true if this property is vendor specific.
        Since:
        3.9.0
      • getUsedVendorPrefix

        @Nullable
        public ECSSVendorPrefix getUsedVendorPrefix()
        Returns:
        The vendor prefix used by this property or null if this property is vendor independent.
        Since:
        3.9.0
      • getPropertyNameHandlingHacks

        @Nullable
        public static String getPropertyNameHandlingHacks​(@Nullable
                                                          String sName)
        Get the real name of the property without hacking prefixes. This method strips the first leading '*', '_' or '$' from the name.
        Parameters:
        sName - The source name. May be null.
        Returns:
        null if the source was null or the string without the leading hack indicator.
      • getFromNameOrNullHandlingHacks

        @Nullable
        public static ECSSProperty getFromNameOrNullHandlingHacks​(@Nullable
                                                                  String sName)
        Get the CSS property with the specified name, but without hacking prefixes. This method strips the first leading '*', '_' or '$' from the name before it searches.
        Parameters:
        sName - The source name. May be null.
        Returns:
        null if the source was null or if no such property is known.
        See Also:
        getPropertyNameHandlingHacks(String)