Package java.awt.font
Class TextAttribute
java.lang.Object
java.text.AttributedCharacterIterator.Attribute
java.awt.font.TextAttribute
- All Implemented Interfaces:
Serializable
public final class TextAttribute extends AttributedCharacterIterator.Attribute
The TextAttribute class defines attribute keys and attribute values
for text rendering. Each TextAttributes should have the following
information:
- key name;
- valid values;
- relevant constants;
- default action if the attribute is absent;
- default action's description.
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static TextAttributeBACKGROUNDThe BACKGROUND text attribute.static TextAttributeBIDI_EMBEDDINGThe BIDI_EMBEDDING text attribute key.static TextAttributeCHAR_REPLACEMENTThe CHAR_REPLACEMENT text attribute key.static TextAttributeFAMILYThe FAMILY text attribute key.static TextAttributeFONTThe FONT text attribute key.static TextAttributeFOREGROUNDThe FOREGROUND text attribute key.static TextAttributeINPUT_METHOD_HIGHLIGHTThe INPUT_METHOD_HIGHLIGHT text attribute key.static TextAttributeINPUT_METHOD_UNDERLINEThe INPUT_METHOD_UNDERLINE text attribute key.static TextAttributeJUSTIFICATIONThe JUSTIFICATION text attribute key.static FloatJUSTIFICATION_FULLThe Constant JUSTIFICATION_indicates the full requested width.static FloatJUSTIFICATION_NONEThe Constant JUSTIFICATION_NONE indicates that line is not allowed for justification.static TextAttributeKERNINGThe KERNING text attribute key.static IntegerKERNING_ONstatic TextAttributeLIGATURESThe LIGATURES text attribute key.static IntegerLIGATURES_ONstatic TextAttributeNUMERIC_SHAPINGThe NUMERIC_SHAPING text attribute.static TextAttributePOSTUREThe POSTURE text attribute.static FloatPOSTURE_OBLIQUEThe Constant POSTURE_OBLIQUE indicates italic posture.static FloatPOSTURE_REGULARThe Constant POSTURE_REGULAR indicates regular posture.static TextAttributeRUN_DIRECTIONThe RUN_DIRECTION text attribute.static BooleanRUN_DIRECTION_LTRThe Constant RUN_DIRECTION_LTR indicates left-to-right run direction.static BooleanRUN_DIRECTION_RTLThe Constant RUN_DIRECTION_RTL indicates right-to-left run direction.static TextAttributeSIZEThe SIZE text attribute.static TextAttributeSTRIKETHROUGHThe STRIKETHROUGH text attribute.static BooleanSTRIKETHROUGH_ONThe Constant STRIKETHROUGH_ON indicates a single strikethrough.static TextAttributeSUPERSCRIPTThe SUPERSCRIPT text attribute.static IntegerSUPERSCRIPT_SUBThe Constant SUPERSCRIPT_SUB indicates a standard subscript.static IntegerSUPERSCRIPT_SUPERThe Constant SUPERSCRIPT_SUPER indicates a standard superscript.static TextAttributeSWAP_COLORSThe SWAP_COLORS text attribute.static BooleanSWAP_COLORS_ONThe Constant SWAP_COLORS_ON indicates a swap of foreground and background.static TextAttributeTRACKINGThe TRACKING text attribute key.static FloatTRACKING_LOOSEstatic FloatTRACKING_TIGHTstatic TextAttributeTRANSFORMThe TRANSFORM text attribute.static TextAttributeUNDERLINEThe Constant UNDERLINE text attribute.static IntegerUNDERLINE_LOW_DASHEDThe Constant UNDERLINE_LOW_DASHED indicates single pixel dashed low underline.static IntegerUNDERLINE_LOW_DOTTEDThe Constant UNDERLINE_LOW_DOTTED indicates a single pixel dotted low underline.static IntegerUNDERLINE_LOW_GRAYThe Constant UNDERLINE_LOW_GRAY indicates double pixel gray low underline.static IntegerUNDERLINE_LOW_ONE_PIXELThe Constant UNDERLINE_LOW_ONE_PIXEL indicates a single pixel solid low underline.static IntegerUNDERLINE_LOW_TWO_PIXELThe Constant UNDERLINE_LOW_TWO_PIXEL indicates a double pixel solid low underline.static IntegerUNDERLINE_ONThe Constant UNDERLINE_ON indicates a standard underline at the roman baseline for roman text.static TextAttributeWEIGHTThe WEIGHT text attribute.static FloatWEIGHT_BOLDThe Constant WEIGHT_BOLD indicates the standard bold weight.static FloatWEIGHT_DEMIBOLDThe Constant WEIGHT_DEMIBOLD indicates a lighter weight than BOLD.static FloatWEIGHT_DEMILIGHTThe Constant WEIGHT_DEMILIGHT indicates an intermediate weight between LIGHT and STANDARD.static FloatWEIGHT_EXTRA_LIGHTThe Constant WEIGHT_EXTRA_LIGHT indicates the lightest predefined weight.static FloatWEIGHT_EXTRABOLDThe Constant WEIGHT_EXTRABOLD indicates an extra heavy weight.static FloatWEIGHT_HEAVYThe Constant WEIGHT_HEAVY indicates a heavier weight than BOLD.static FloatWEIGHT_LIGHTThe Constant WEIGHT_LIGHT indicates the standard light weight.static FloatWEIGHT_MEDIUMThe Constant WEIGHT_MEDIUM indicates average weight between the REGULAR and BOLD.static FloatWEIGHT_REGULARThe Constant WEIGHT_REGULAR indicates the standart weight.static FloatWEIGHT_SEMIBOLDThe Constant WEIGHT_SEMIBOLD indicates a semi weight of REGULAR.static FloatWEIGHT_ULTRABOLDThe Constant WEIGHT_ULTRABOLD indicates the heaviest predefined weight.static TextAttributeWIDTHThe WIDTH text attribute.static FloatWIDTH_CONDENSEDThe Constant WIDTH_CONDENSED indicates the most condensed predefined width.static FloatWIDTH_EXTENDEDThe Constant WIDTH_EXTENDED indicates extended width.static FloatWIDTH_REGULARThe Constant WIDTH_REGULAR indicates the standard width.static FloatWIDTH_SEMI_CONDENSEDThe Constant WIDTH_SEMI_CONDENSED indicates a semi condensed width.static FloatWIDTH_SEMI_EXTENDEDThe Constant WIDTH_SEMI_EXTENDED indicates semi extended width.Fields inherited from class java.text.AttributedCharacterIterator.Attribute
INPUT_METHOD_SEGMENT, LANGUAGE, READING -
Constructor Summary
Constructors Modifier Constructor Description protectedTextAttribute(String name)Instantiates a new TextAttribute with the specified name. -
Method Summary
Methods inherited from class java.text.AttributedCharacterIterator.Attribute
equals, getName, hashCode, readResolve, toString
-
Field Details
-
BACKGROUND
The BACKGROUND text attribute. -
BIDI_EMBEDDING
The BIDI_EMBEDDING text attribute key. -
CHAR_REPLACEMENT
The CHAR_REPLACEMENT text attribute key. -
FAMILY
The FAMILY text attribute key. -
FONT
The FONT text attribute key. -
FOREGROUND
The FOREGROUND text attribute key. -
INPUT_METHOD_HIGHLIGHT
The INPUT_METHOD_HIGHLIGHT text attribute key. -
INPUT_METHOD_UNDERLINE
The INPUT_METHOD_UNDERLINE text attribute key. -
JUSTIFICATION
The JUSTIFICATION text attribute key. -
JUSTIFICATION_FULL
The Constant JUSTIFICATION_indicates the full requested width. -
JUSTIFICATION_NONE
The Constant JUSTIFICATION_NONE indicates that line is not allowed for justification. -
KERNING
The KERNING text attribute key.- Since:
- 1.6
-
KERNING_ON
- Since:
- 1.6
-
LIGATURES
The LIGATURES text attribute key.- Since:
- 1.6
-
LIGATURES_ON
- Since:
- 1.6
-
NUMERIC_SHAPING
The NUMERIC_SHAPING text attribute. -
POSTURE
The POSTURE text attribute. -
POSTURE_REGULAR
The Constant POSTURE_REGULAR indicates regular posture. -
POSTURE_OBLIQUE
The Constant POSTURE_OBLIQUE indicates italic posture. -
RUN_DIRECTION
The RUN_DIRECTION text attribute. -
RUN_DIRECTION_LTR
The Constant RUN_DIRECTION_LTR indicates left-to-right run direction. -
RUN_DIRECTION_RTL
The Constant RUN_DIRECTION_RTL indicates right-to-left run direction. -
SIZE
The SIZE text attribute. -
STRIKETHROUGH
The STRIKETHROUGH text attribute. -
STRIKETHROUGH_ON
The Constant STRIKETHROUGH_ON indicates a single strikethrough. -
SUPERSCRIPT
The SUPERSCRIPT text attribute. -
SUPERSCRIPT_SUB
The Constant SUPERSCRIPT_SUB indicates a standard subscript. -
SUPERSCRIPT_SUPER
The Constant SUPERSCRIPT_SUPER indicates a standard superscript. -
SWAP_COLORS
The SWAP_COLORS text attribute. -
SWAP_COLORS_ON
The Constant SWAP_COLORS_ON indicates a swap of foreground and background. -
TRACKING
The TRACKING text attribute key.- Since:
- 1.6
-
TRACKING_LOOSE
- Since:
- 1.6
-
TRACKING_TIGHT
- Since:
- 1.6
-
TRANSFORM
The TRANSFORM text attribute. -
UNDERLINE
The Constant UNDERLINE text attribute. -
UNDERLINE_ON
The Constant UNDERLINE_ON indicates a standard underline at the roman baseline for roman text. -
UNDERLINE_LOW_ONE_PIXEL
The Constant UNDERLINE_LOW_ONE_PIXEL indicates a single pixel solid low underline. -
UNDERLINE_LOW_TWO_PIXEL
The Constant UNDERLINE_LOW_TWO_PIXEL indicates a double pixel solid low underline. -
UNDERLINE_LOW_DOTTED
The Constant UNDERLINE_LOW_DOTTED indicates a single pixel dotted low underline. -
UNDERLINE_LOW_GRAY
The Constant UNDERLINE_LOW_GRAY indicates double pixel gray low underline. -
UNDERLINE_LOW_DASHED
The Constant UNDERLINE_LOW_DASHED indicates single pixel dashed low underline. -
WEIGHT
The WEIGHT text attribute. -
WEIGHT_EXTRA_LIGHT
The Constant WEIGHT_EXTRA_LIGHT indicates the lightest predefined weight. -
WEIGHT_LIGHT
The Constant WEIGHT_LIGHT indicates the standard light weight. -
WEIGHT_DEMILIGHT
The Constant WEIGHT_DEMILIGHT indicates an intermediate weight between LIGHT and STANDARD. -
WEIGHT_REGULAR
The Constant WEIGHT_REGULAR indicates the standart weight. -
WEIGHT_SEMIBOLD
The Constant WEIGHT_SEMIBOLD indicates a semi weight of REGULAR. -
WEIGHT_MEDIUM
The Constant WEIGHT_MEDIUM indicates average weight between the REGULAR and BOLD. -
WEIGHT_DEMIBOLD
The Constant WEIGHT_DEMIBOLD indicates a lighter weight than BOLD. -
WEIGHT_BOLD
The Constant WEIGHT_BOLD indicates the standard bold weight. -
WEIGHT_HEAVY
The Constant WEIGHT_HEAVY indicates a heavier weight than BOLD. -
WEIGHT_EXTRABOLD
The Constant WEIGHT_EXTRABOLD indicates an extra heavy weight. -
WEIGHT_ULTRABOLD
The Constant WEIGHT_ULTRABOLD indicates the heaviest predefined weight. -
WIDTH
The WIDTH text attribute. -
WIDTH_CONDENSED
The Constant WIDTH_CONDENSED indicates the most condensed predefined width. -
WIDTH_SEMI_CONDENSED
The Constant WIDTH_SEMI_CONDENSED indicates a semi condensed width. -
WIDTH_REGULAR
The Constant WIDTH_REGULAR indicates the standard width. -
WIDTH_SEMI_EXTENDED
The Constant WIDTH_SEMI_EXTENDED indicates semi extended width. -
WIDTH_EXTENDED
The Constant WIDTH_EXTENDED indicates extended width.
-
-
Constructor Details
-
TextAttribute
Instantiates a new TextAttribute with the specified name.- Parameters:
name- the name of TextAttribute.
-