|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.text.AttributedCharacterIterator.Attribute | +--com.ibm.textlayout.attributes.TextAttribute
This class contains a number of keys (or attributes) for specifying text styles in a Map. A text style is a collection of key-value pairs, where the key represents a certain characteristic (such as size) and the value tells how that characteristic is realized (ie what the size is).
All of the attributes in TextAttribute specify a class for their value. Map does not enforce these class specifications; however, text rendering code will tend to fail with a ClassCastException if a key's value has an unexpected class.
Some attributes are meaningful for entire paragraphs, not individual characters. These attributes are documented as applying to paragraphs. All other attributes apply to characters.
Many of the field names and values in this class
are taken from the JDK 1.2
java.awt.font.TextAttribute class
.
Map
, Serialized FormField Summary | |
static java.lang.Object |
BACKGROUND
|
static java.lang.Object |
BIDI_EMBEDDING
Attribute key for the embedding level for nested bidirectional runs. |
static java.lang.Object |
CHAR_REPLACEMENT
|
static java.lang.Object |
EXTRA_FIRST_LINE_SPACING
|
static java.lang.Object |
EXTRA_LINE_SPACING
|
static java.lang.Object |
FAMILY
|
static java.lang.Object |
FIRST_LINE_INDENT
Amount beyond leading margin to indent the first line of a paragraph. |
static java.lang.Integer |
FLUSH_CENTER
|
static java.lang.Integer |
FLUSH_LEADING
|
static java.lang.Integer |
FLUSH_TRAILING
|
static java.lang.Object |
FONT
|
static java.lang.Object |
FOREGROUND
Attribute key for the foreground and background color adornment. |
static java.lang.Integer |
FULLY_JUSTIFIED
Value of LINE_FLUSH for full justification. |
static java.lang.Object |
JUSTIFICATION
Attribute key for the justification of a paragraph. |
static java.lang.Float |
JUSTIFICATION_FULL
Justify the line to the full requested width. |
static java.lang.Float |
JUSTIFICATION_NONE
Do not allow the line to be justified. |
static java.lang.Object |
LEADING_MARGIN
Leading and trailing margin in paragraph. |
static java.lang.Object |
LINE_FLUSH
Flush lines left, right, or center. |
static java.lang.Object |
MIN_FIRST_LINE_SPACING
|
static java.lang.Object |
MIN_LINE_SPACING
|
static java.lang.Object |
OFFSET
|
static java.lang.Object |
POSTURE
|
static java.lang.Float |
POSTURE_OBLIQUE
|
static java.lang.Object |
RUN_DIRECTION
Attribute key for the run direction of the line. |
static java.lang.Boolean |
RUN_DIRECTION_LTR
Left-to-right run direction. |
static java.lang.Boolean |
RUN_DIRECTION_RTL
Right-to-left run direction. |
static java.lang.Object |
SIZE
|
static java.lang.Object |
STRIKETHROUGH
|
static java.lang.Boolean |
STRIKETHROUGH_ON
|
static java.lang.Object |
SUPERSCRIPT
|
static java.lang.Integer |
SUPERSCRIPT_SUB
|
static java.lang.Integer |
SUPERSCRIPT_SUPER
|
static java.lang.Object |
TAB_RULER
Tab ruler. |
static java.lang.Object |
TRAILING_MARGIN
|
static java.lang.Object |
UNDERLINE
|
static java.lang.Integer |
UNDERLINE_ON
|
static java.lang.Object |
WEIGHT
|
static java.lang.Float |
WEIGHT_BOLD
|
Fields inherited from class java.text.AttributedCharacterIterator.Attribute |
INPUT_METHOD_SEGMENT, LANGUAGE, READING |
Constructor Summary | |
protected |
TextAttribute(java.lang.String name)
|
Method Summary | |
protected java.lang.Object |
readResolve()
|
Methods inherited from class java.text.AttributedCharacterIterator.Attribute |
equals, getName, hashCode, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.Object FONT
public static final java.lang.Object FAMILY
public static final java.lang.Object WEIGHT
public static final java.lang.Float WEIGHT_BOLD
public static final java.lang.Object POSTURE
public static final java.lang.Float POSTURE_OBLIQUE
public static final java.lang.Object SIZE
public static final java.lang.Object SUPERSCRIPT
public static final java.lang.Integer SUPERSCRIPT_SUPER
public static final java.lang.Integer SUPERSCRIPT_SUB
public static final java.lang.Object FOREGROUND
public static final java.lang.Object BACKGROUND
public static final java.lang.Object UNDERLINE
public static final java.lang.Integer UNDERLINE_ON
public static final java.lang.Object STRIKETHROUGH
public static final java.lang.Boolean STRIKETHROUGH_ON
public static final java.lang.Object OFFSET
public static final java.lang.Object CHAR_REPLACEMENT
public static final java.lang.Object EXTRA_LINE_SPACING
public static final java.lang.Object EXTRA_FIRST_LINE_SPACING
public static final java.lang.Object FIRST_LINE_INDENT
public static final java.lang.Object MIN_LINE_SPACING
public static final java.lang.Object MIN_FIRST_LINE_SPACING
public static final java.lang.Object LINE_FLUSH
public static final java.lang.Integer FLUSH_LEADING
public static final java.lang.Integer FLUSH_CENTER
public static final java.lang.Integer FLUSH_TRAILING
public static final java.lang.Integer FULLY_JUSTIFIED
LINE_FLUSH
for full justification.public static final java.lang.Object LEADING_MARGIN
public static final java.lang.Object TRAILING_MARGIN
public static final java.lang.Object TAB_RULER
public static final java.lang.Object RUN_DIRECTION
Key |
RUN_DIRECTION |
---|---|
Value |
Boolean |
Constants |
RUN_DIRECTION_LTR = true, RUN_DIRECTION_RTL = false |
Default |
Use the default Unicode base direction from the BIDI algorithm. |
Description |
Specifies which base run direction to use when
positioning mixed directional runs within a paragraph. If this value is
RUN_DIRECTION_DEFAULT, This attribute should have the same value over the whole paragraph. |
public static final java.lang.Boolean RUN_DIRECTION_LTR
RUN_DIRECTION
public static final java.lang.Boolean RUN_DIRECTION_RTL
RUN_DIRECTION
public static final java.lang.Object BIDI_EMBEDDING
Key |
BIDI_EMBEDDING |
---|---|
Value |
Integer |
Limits |
Positive values 1 through 15 are embedding
levels, negative values through -15 are override levels |
Default |
Use standard BIDI to compute levels from formatting characters in the text. |
Description |
Specifies the bidi embedding level of the character. When this attribute is present anywhere in a paragraph, then the Unicode characters RLO, LRO, RLE, LRE, PDF are disregarded in the BIDI analysis of that paragraph. See the Unicode Standard v. 2.0, section 3-11. |
public static final java.lang.Object JUSTIFICATION
Key |
JUSTIFICATION |
---|---|
Value |
Float |
Limits |
0.0 through1.0 |
Default |
1.0 |
Description |
Specifies which fraction of the extra space to use when justification is requested. For example, if the line is 50 points wide and the margins are 70 points apart, a value of 0.5 means that the line is padded to reach a width of 60 points. This attribute should have the same value over the whole paragraph. |
public static final java.lang.Float JUSTIFICATION_FULL
JUSTIFICATION
public static final java.lang.Float JUSTIFICATION_NONE
JUSTIFICATION
Constructor Detail |
protected TextAttribute(java.lang.String name)
Method Detail |
protected java.lang.Object readResolve() throws java.io.InvalidObjectException
readResolve
in class java.text.AttributedCharacterIterator.Attribute
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |