Enum FontWeight

  • All Implemented Interfaces:
    CssProperty, java.io.Serializable, java.lang.Cloneable


    public enum FontWeight
    extends java.lang.Enum<FontWeight>
    implements CssProperty
     font-weight: normal|bold|bolder|lighter|number|initial|inherit;
     number : 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
    
     font-weight: 100 is FontWeight.ONE_HUNDRED, font-weight: 200 is FontWeight.TWO_HUNDRED and so on.
     
    Since:
    1.0.0
    • Method Detail

      • values

        public static FontWeight[] 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 (FontWeight c : FontWeight.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FontWeight valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getEnumName

        public java.lang.String getEnumName​()
        Returns:
        the name of this enum.
        Since:
        1.0.0
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Enum<FontWeight>
      • isValid

        public static boolean isValid​(java.lang.String colorName)
        checks whether the given given colorName is valid , i.e. whether it can have a corresponding object from it.
        Parameters:
        colorName -
        Returns:
        true if the given cssColorName has a corresponding object.
        Since:
        1.0.0
      • getThis

        public static FontWeight getThis​(java.lang.String cssValue)
        gets the corresponding object for the given cssValue or null for invalid cssValue.
        Parameters:
        cssValue - the inbuilt cssValue as per w3 standard.
        Returns:
        the corresponding object for the given cssValue or null for invalid cssValue.
        Since:
        1.0.0
      • getCssName

        public java.lang.String getCssName​()
        Specified by:
        getCssName in interface CssProperty
        Returns:
        the name portion in style, eg align-content for style align-content: center.
      • getCssValue

        public java.lang.String getCssValue​()
        Specified by:
        getCssValue in interface CssProperty
        Returns:
        the value portion in style, eg center for style align-content: center.