Class CSS20Attribute
- java.lang.Object
-
- com.adobe.fontengine.inlineformatting.css20.CSS20Attribute
-
public final class CSS20Attribute extends java.lang.Object
This class holds the CSS attributes that can be used to tag anAttributedRun
. Objects of this class are used as the value entries of theElementAttribute.CSS20Attribute
tag.Concurrency
Instances of this class are immutable after construction and contain no mutable static data. Therefore, they are threadsafe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CSS20Attribute.CSSStretchValue
This class provides an enumeration of the possible values for the CSS Stretch attribute.static class
CSS20Attribute.CSSStyleValue
This class provides an enumeration of the possible values for the CSS Style attribute.static class
CSS20Attribute.CSSVariantValue
This class provides an enumeration of the possible values for the CSS Variant attribute.static class
CSS20Attribute.CSSWeightValue
This class provides an enumeration of the possible values for the CSS Weight attribute.
-
Constructor Summary
Constructors Constructor Description CSS20Attribute(CSS20Attribute properties)
Copy constructor.CSS20Attribute(java.lang.String[] familyNames, CSS20Attribute.CSSStyleValue style, CSS20Attribute.CSSVariantValue variant, CSS20Attribute.CSSStretchValue stretch, CSS20Attribute.CSSWeightValue weight, double pointSize)
Constructor.CSS20Attribute(java.lang.String[] familyNames, CSS20Attribute.CSSStyleValue style, CSS20Attribute.CSSVariantValue variant, CSS20Attribute.CSSStretchValue stretch, CSS20Attribute.CSSWeightValue weight, double pointSize, double opticalSize)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getFamilyNames()
java.util.List
getFamilyNamesList()
double
getOpticalSize()
double
getPointSize()
CSS20Attribute.CSSStretchValue
getStretch()
CSS20Attribute.CSSStyleValue
getStyle()
CSS20Attribute.CSSVariantValue
getVariant()
int
getWeight()
java.lang.String
toString()
-
-
-
Constructor Detail
-
CSS20Attribute
public CSS20Attribute(java.lang.String[] familyNames, CSS20Attribute.CSSStyleValue style, CSS20Attribute.CSSVariantValue variant, CSS20Attribute.CSSStretchValue stretch, CSS20Attribute.CSSWeightValue weight, double pointSize, double opticalSize)
Constructor. It is highly recommended that theString
objects have had thejava.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 benull
style
- the font stylevariant
- the font variantweight
- the font weightstretch
- the font stretchpointSize
- 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(java.lang.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 theString
objects have had thejava.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 benull
style
- the font stylevariant
- the font variantweight
- the font weightstretch
- the font stretchpointSize
- 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 java.util.List getFamilyNamesList()
- Returns:
- - the familyNames.
-
getFamilyNames
public java.lang.String[] getFamilyNames()
-
getStyle
public CSS20Attribute.CSSStyleValue getStyle()
- Returns:
- - the style.
-
getWeight
public int getWeight()
- Returns:
- - the weight after resolving for "bolder" and "lighter".
-
getVariant
public CSS20Attribute.CSSVariantValue getVariant()
- Returns:
- - the variant.
-
getStretch
public CSS20Attribute.CSSStretchValue getStretch()
- Returns:
- - the stretch.
-
getPointSize
public double getPointSize()
- Returns:
- - the point size.
-
getOpticalSize
public double getOpticalSize()
- Returns:
- - the optical size.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-