Class ElementAttribute

  • All Implemented Interfaces:
    Attribute

    public final class ElementAttribute
    extends java.lang.Object
    implements Attribute
    This class defines attributes which can be placed on elements on AttributedRuns.

    In addition to defining the type for element attribute keys, this class defines a number of well-known element attributes, and in particular all the attributes which are exchanged between an inline formatter and its clients. For each such attribute, we define the possible values.

    Other ElementAttribute objects can be created and used by the client of an inline formatter. However, these keys will be ignored by the inline formatters of this package.

    Concurrency

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

      • locale

        public static final ElementAttribute locale
        The locale for which to format. The value is a com.adobe.agl.util.ULocale.
      • fontStyle

        public static final ElementAttribute fontStyle
        The font style used to render an element. The value must be a FontStyle
      • digitCase

        public static final ElementAttribute digitCase
        Digit case. The value must be a DigitCase. While digitCase can be specified on any digit (i.e. not just Latin digits), it is unlikely to have any effect on digits which normally occur in a non-cased script (e.g. Arabic digits).
      • alternate

        public static final ElementAttribute alternate
        The alternate to use for this glyph. The value must be an Integer.
      • isGlyph

        public static final ElementAttribute isGlyph
        Whether the element is a glyph or a character. The value must be java.lang.Boolean.TRUE or java.lang.Boolean.FALSE. If the value is TRUE, then the font attribute must be set.
      • pointSize

        public static final ElementAttribute pointSize
        The point size of an element. The value must be a Double.
      • bidiLevel

        public static final ElementAttribute bidiLevel
        The Unicode bidi level of this element. The value must be an Integer in the range 0..63.
      • joiningType

        public static final ElementAttribute joiningType
        The joining type for this element. This attribute can be set by the inline formatter client on glyph elements, to indicate how they participate in Arabic joining. The value must be an Integer, the value of which is one of com.adobe.agl.lang.Ucharacter.JoiningType.*. If this attribute is absent on a glyph element, then it is assumed to have the value UCharacter.JoiningType.NON_JOINING. Inline formatters compute the joining type of character elements.
    • Constructor Detail

      • ElementAttribute

        public ElementAttribute​(java.lang.String name)
        Create a new ElementAttribute.
        Parameters:
        name - for debugging purposes
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object