Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----java.awt.font.TextAttributeSet
Field Summary | |
static String | BACKGROUND
|
static String | BASELINE
|
static Byte | BASELINE_DEFAULT
|
static Byte | BASELINE_HANGING
|
static Byte | BASELINE_IDEOGRAPHIC
|
static String | BASELINE_OFFSETS
|
static Byte | BASELINE_ROMAN
|
static String | BIDI_EMBEDDING
|
static Integer | BIDI_EMBEDDING_DEFAULT
|
static String | EMBEDDED_GRAPHIC
|
static AttributeSet | EMPTY
|
static String | FAMILY
|
static String | FAMILY_ALL
|
static String | FONT
|
static String | FOREGROUND
|
static String | INPUT_METHOD_SEGMENT
|
static String | JUSTIFICATION
|
static Float | JUSTIFICATION_DEFAULT
|
static Float | JUSTIFICATION_FULL
|
static Float | JUSTIFICATION_NONE
|
static String | LANGUAGE
|
static String | POSTURE
|
static Float | POSTURE_DEFAULT
|
static Float | POSTURE_ITALIC
|
static String | READING
|
static String | RUN_DIRECTION
|
static Boolean | RUN_DIRECTION_DEFAULT
|
static Boolean | RUN_DIRECTION_LTR
|
static Boolean | RUN_DIRECTION_RTL
|
static String | SIZE
|
static String | STRIKETHROUGH
|
static Boolean | STRIKETHROUGH_DEFAULT
|
static Boolean | STRIKETHROUGH_ON
|
static String | SUPERSUBSCRIPT
|
static float[] | SUPERSUBSCRIPT_DEFAULT
|
static float[] | SUPERSUBSCRIPT_DOWN1
|
static float[] | SUPERSUBSCRIPT_UP1
|
static String | SWAP_COLORS
|
static Boolean | SWAP_COLORS_DEFAULT
|
static Boolean | SWAP_COLORS_OFF
|
static Boolean | SWAP_COLORS_ON
|
static String | TRANSFORM
|
static String | UNDERLINE
|
static Byte | UNDERLINE_LOW_DASHED
|
static Byte | UNDERLINE_LOW_DOTTED
|
static Byte | UNDERLINE_LOW_GRAY
|
static Byte | UNDERLINE_LOW_ONE_PIXEL
|
static Byte | UNDERLINE_LOW_TWO_PIXEL
|
static Byte | UNDERLINE_OFF
|
static Byte | UNDERLINE_ON
|
static String | WEIGHT
|
static Float | WEIGHT_BOLD
|
static Float | WEIGHT_DEFAULT
|
static Float | WEIGHT_LIGHT
|
Constructor Summary | |
TextAttributeSet()
|
|
TextAttributeSet(AttributeSet source)
|
|
TextAttributeSet(String name,
Object value)
|
Method Summary | |
void | add(String name,
Object value)
|
void | add(AttributeSet attributes)
|
Object | clone()
|
boolean | contains(String name,
Object value)
|
boolean | contains(AttributeSet rhs)
|
boolean | equals(Object rhs)
|
boolean | equals(AttributeSet rhs)
|
Object | get(String name)
|
int | getSize()
|
int | hashCode()
|
boolean | isEmpty()
|
Enumeration | names()
|
void | remove(String name)
|
void | remove(Enumeration names)
|
void | set(AttributeSet attributes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String LANGUAGE
public static final String READING
public static final String INPUT_METHOD_SEGMENT
public static final String SWAP_COLORS
Values are instances of Boolean. The default is not to swap the colors. If the foreground and backround color attributes are both defined, this causes them to be swapped when rendering text. If either is defaulted the exact effect is undefined-- generally it will produce an 'inverted' appearance.
public static final Boolean SWAP_COLORS_ON
public static final Boolean SWAP_COLORS_OFF
public static final Boolean SWAP_COLORS_DEFAULT
public static final String FAMILY
Values are instances of String, e.g. "Serif", "Palatino". The default value is unspecified.
public static final String FAMILY_ALL
public static final String WEIGHT
Values are instances of Float. The value is between 0.0 and 2.0. This roughly corresponds to the ratio of the stem width to the width of regular characters for this typeface. Lower values are lighter.
public static final Float WEIGHT_DEFAULT
public static final Float WEIGHT_BOLD
public static final Float WEIGHT_LIGHT
public static final String POSTURE
Values are instances of Float. The value is the run/rise, generally between -1.0 and 1.0, where negative values indicate a leftwards slant, positive a rightwards slant, and zero no slant. There is no guarantee, however, that the slope of the text as returned by font will be the same as the posture value.
public static final Float POSTURE_DEFAULT
public static final Float POSTURE_ITALIC
public static final String SIZE
Values are instances of Float. The value can be any positive value, although most fonts will pin to a reasonable range. The default value is unspecified.
public static final String TRANSFORM
Values are instances of Transform. The default value is 'null', i.e. when not specified the font uses its default transform.
public static final String FONT
Values are instances of Font. The default value is 'null', i.e. text layout will try to resolve the font as best it can for the given text.
public static final String EMBEDDED_GRAPHIC
Values are instances of GraphicAttribute. All characters with this attribute appear as the graphic. Usually, the character used to represent embedded graphics is the Unicode Replacement Character, '?'.
public static final String BIDI_EMBEDDING
TextLayout assumes this feature has the same value for all text in a paragraph.
Values are instances of Integer, between 0 and 31 inclusive. Values from 0 to 15 represent embeddings. If bit 4 is set (values from 16 to 31) they represent directional overrides. Even values indicate left-to-right, odd indicate right-to-left. Within an embedding, text assumes a base line direction corresponding to the embedding, and the standard bidirectional properties of the text applies. Within an override, all text flows in the given direction, and the standard bidirectional properties of the text are overridden. See the Unicode Standard v. 2.0, section 3-11.
public static final Integer BIDI_EMBEDDING_DEFAULT
public static final String BACKGROUND
Values are instances of Color. The default value is 'null', meaning a transparent background.
public static final String FOREGROUND
Values are instances of Color. The default value is 'null', meaning use the current color in the Graphics.
public static final String UNDERLINE
Values are instances of Byte. The standard underline is UNDERLINE_ON, the low underlines are for input method highlighting.
public static final Byte UNDERLINE_OFF
public static final Byte UNDERLINE_ON
public static final Byte UNDERLINE_LOW_ONE_PIXEL
public static final Byte UNDERLINE_LOW_TWO_PIXEL
public static final Byte UNDERLINE_LOW_DOTTED
public static final Byte UNDERLINE_LOW_GRAY
public static final Byte UNDERLINE_LOW_DASHED
public static final String STRIKETHROUGH
Values are instances of Boolean.
public static final Boolean STRIKETHROUGH_DEFAULT
public static final Boolean STRIKETHROUGH_ON
public static final String SUPERSUBSCRIPT
Values are arrays of two floats. The first value is is used to scale the point size, the second computes the offset as a ratio of the point size. For example, when applied to a 12 point font, a value of [.75, -.5] requests a point size of 9, positioned 6 points above the baseline.
public static final float[] SUPERSUBSCRIPT_DEFAULT
public static final float[] SUPERSUBSCRIPT_UP1
public static final float[] SUPERSUBSCRIPT_DOWN1
public static final String JUSTIFICATION
TextLayout assumes this feature has the same value for all text in a paragraph. Value is a float, extracted as a Double. This is a ratio controlling the space adjustment. For example, if a line's natural advance is 50 pixels, and it is asked to justify to a width of 100 pixels, a ratio of 1.0 results in a justified line with an advance of 100 pixels, and a ratio of 0.5 results in a justified line with an advance of 75 pixels.
public static final Float JUSTIFICATION_DEFAULT
public static final Float JUSTIFICATION_FULL
public static final Float JUSTIFICATION_NONE
public static final String RUN_DIRECTION
TextLayout assumes this feature has the same value for all text in a paragraph.
Values are instances of boolean.
public static final Boolean RUN_DIRECTION_DEFAULT
public static final Boolean RUN_DIRECTION_LTR
public static final Boolean RUN_DIRECTION_RTL
public static final String BASELINE
TextLayout assumes this feature has the same value for all text in a paragraph. Regardless of the baselines to which characters align, the layout as a whole will align to this line.
Values are instances of Integer.
public static final Byte BASELINE_DEFAULT
public static final Byte BASELINE_ROMAN
public static final Byte BASELINE_IDEOGRAPHIC
public static final Byte BASELINE_HANGING
public static final String BASELINE_OFFSETS
TextLayout assumes this feature has the same value for all text in a paragraph.
Values are arrays of three floats. The distance from one baseline
to another is offsets[b] - offsets[a]
, where a is the
starting baseline. For example, the distance from the hanging
baseline to the ideographic baseline is:
offsets[BASELINE_IDEOGRAPHIC.byteValue()]-
offsets[BASELINE_HANGING.byteValue()]
If defaulted, TextLayout attempts to find a reasonable value for all text in the paragraph.
public static final AttributeSet EMPTY
Constructor Detail |
public TextAttributeSet()
public TextAttributeSet(AttributeSet source)
source
- the attributes to copy into this set.
public TextAttributeSet(String name, Object value)
name
- the name of the attribute.
value
- the value of the attribute.
Method Detail |
public boolean isEmpty()
public int getSize()
public Enumeration names()
public Object get(String name)
public boolean contains(String name, Object value)
public boolean contains(AttributeSet rhs)
public boolean equals(Object rhs)
rhs
- the object which may be an attribute set.
public boolean equals(AttributeSet rhs)
rhs
- the attribute set to test against.
public int hashCode()
public void add(String name, Object value)
name
- the name of the attribute to add
value
- the value of the attribute to add
public void add(AttributeSet attributes)
attributes
- the set of attributes to add
public void remove(String name)
name
- the name of the attribute to remove
public void remove(Enumeration names)
names
- an enumeration over the names of attributes to remove. The
elements of the enumeration are Strings.
public void set(AttributeSet attributes)
public Object clone()
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |