Class CSS20Attribute


  • public final class CSS20Attribute
    extends Object
    This class holds the CSS attributes that can be used to tag an AttributedRun. Objects of this class are used as the value entries of the ElementAttribute.CSS20Attribute tag.

    Concurrency

    Instances of this class are immutable after construction and contain no mutable static data. Therefore, they are threadsafe.
    • Constructor Detail

      • CSS20Attribute

        public CSS20Attribute​(String[] familyNames,
                              CSS20Attribute.CSSStyleValue style,
                              CSS20Attribute.CSSVariantValue variant,
                              CSS20Attribute.CSSStretchValue stretch,
                              CSS20Attribute.CSSWeightValue weight,
                              double pointSize,
                              double opticalSize)
        Constructor. It is highly recommended that the String objects have had the java.lang.String.intern() method called on them. This will greatly improve the performance of the formatting operations.
        Parameters:
        familyNames - array of the font family names - this must not be null
        style - the font style
        variant - the font variant
        weight - the font weight
        stretch - the font stretch
        pointSize - the point size (this must be equal to or greater than zero)
        opticalSize - the optical size used for selecting optical font variants
      • CSS20Attribute

        public CSS20Attribute​(String[] familyNames,
                              CSS20Attribute.CSSStyleValue style,
                              CSS20Attribute.CSSVariantValue variant,
                              CSS20Attribute.CSSStretchValue stretch,
                              CSS20Attribute.CSSWeightValue weight,
                              double pointSize)
        Constructor. This is a convenience constructor that assumes that the optical size is equal to the point size. This is likely to the be the case for most uses. It is highly recommended that the String objects have had the java.lang.String.intern() method called on them. This will greatly improve the performance of the formatting operations.
        Parameters:
        familyNames - array of the font family names - this must not be null
        style - the font style
        variant - the font variant
        weight - the font weight
        stretch - the font stretch
        pointSize - the point size (this must be equal to or greater than zero)
      • CSS20Attribute

        public CSS20Attribute​(CSS20Attribute properties)
        Copy constructor.
        Parameters:
        properties -
    • Method Detail

      • getFamilyNamesList

        public List getFamilyNamesList()
        Returns:
        - the familyNames.
      • getFamilyNames

        public String[] getFamilyNames()
      • getWeight

        public int getWeight()
        Returns:
        - the weight after resolving for "bolder" and "lighter".
      • getPointSize

        public double getPointSize()
        Returns:
        - the point size.
      • getOpticalSize

        public double getOpticalSize()
        Returns:
        - the optical size.