Mega Code Archive

 
Categories / Java Tutorial / Swing
 

Creating Styled Text

Key Constants for Storing AttributeSet Values AttributeSet Key Constants            Value Type     Default Setting                                        CharacterConstants.Background         Color          Color.BLACK                                        ColorConstants.Background             Color          Color.BLACK                                        CharacterConstants.BidiLevel          Integer        0                                        CharacterConstants.Bold               Boolean        false                                        FontConstants.Bold                    Boolean        false CharacterConstants.ComponentAttribute Component      null CharacterConstants.Family             String         "Monospaced"                                        FontConstants.Family                  String         "Monospaced"                                        CharacterConstants.Foreground         Color          Color.BLACK                                        ColorConstants.Foreground             Color          Color.BLACK                                        CharacterConstants.IconAttribute      Icon           null                                        CharacterConstants.Italic             Boolean        false                                        FontConstants.Italic                  Boolean        false                                        CharacterConstants.Size               Integer        12                                        FontConstants.Size                    Integer        12                                        CharacterConstants.StrikeThrough      Boolean        false                                        CharacterConstants.Subscript          Boolean        false                                        CharacterConstants.Superscript        Boolean        false                                        CharacterConstants.Underline          Boolean        false                                        ParagraphConstants.Alignment          Integer        ALIGN_LEFT ParagraphConstants.FirstLineIndent    Float          0 ParagraphConstants.LeftIndent         Float          0                                                      ParagraphConstants.LineSpacing        Float          0                                                      ParagraphConstants.Orientation        unknown        unknown                                                      ParagraphConstants.RightIndent        Float          0                                                      ParagraphConstants.SpaceAbove         Float          0                                                      ParagraphConstants.SpaceBelow         Float          0 ParagraphConstants.TabSet             TabSet         null