public class StyleConstants extends Object
用于应用于AttributeSet或MutableAttributeSet的众所周知或常用属性键和方法的集合,以类型安全的方式获取/设置属性。
段落属性形成要呈现的段落的定义。 所有尺寸均以点为单位(例如在后记中找到),与设备无关的度量。

| Modifier and Type | Class and Description | 
|---|---|
| static class  | StyleConstants.CharacterConstants
              这是有助于字符风格 
             的众所周知的属性的类型安全枚举。 
             | 
| static class  | StyleConstants.ColorConstants
              这是有助于颜色 
             的众所周知的属性的类型安全枚举。 
             | 
| static class  | StyleConstants.FontConstants
              这是有助于字体 
             的众所周知的属性的类型安全枚举。 
             | 
| static class  | StyleConstants.ParagraphConstants
              这是对段落样式有贡献 
             的众所周知的属性的类型安全枚举。 
             | 
| Modifier and Type | Field and Description | 
|---|---|
| static int | ALIGN_CENTER
              段落对齐的可能值。 
             | 
| static int | ALIGN_JUSTIFIED
              段落对齐的可能值。 
             | 
| static int | ALIGN_LEFT
              段落对齐的可能值。 
             | 
| static int | ALIGN_RIGHT
              段落对齐的可能值。 
             | 
| static Object | Alignment
              段落的对齐。 
             | 
| static Object | Background
              背景颜色属性的名称。 
             | 
| static Object | BidiLevel
              由Unicode bidi算法分配的字符的双向级别。 
             | 
| static Object | Bold
              粗体属性的名称。 
             | 
| static Object | ComponentAttribute
              组件属性的名称。 
             | 
| static String | ComponentElementName
              用于表示组件的元素的名称。 
             | 
| static Object | ComposedTextAttribute
              输入法的名称组合文本属性。 
             | 
| static Object | Family
              字体系列的名称 
             | 
| static Object | FirstLineIndent
              缩进段落第一行的空格量。 
             | 
| static Object | FontFamily
              字体系列的名称 
             | 
| static Object | FontSize
              字体大小的名称。 
             | 
| static Object | Foreground
              前景颜色属性的名称。 
             | 
| static Object | IconAttribute
              图标属性的名称。 
             | 
| static String | IconElementName
              用于表示图标的元素名称。 
             | 
| static Object | Italic
              斜体属性的名称。 
             | 
| static Object | LeftIndent
              缩进段落左侧的数量。 
             | 
| static Object | LineSpacing
              段落之间的空格数量。 
             | 
| static Object | ModelAttribute
              用于识别具有模型视图分离的嵌入对象的模型的属性。 
             | 
| static Object | NameAttribute
              用于命名属性集合的属性名称。 
             | 
| static Object | Orientation
              段落的方向。 
             | 
| static Object | ResolveAttribute
              用于标识解析父属性属性的属性名称(如果已定义)。 
             | 
| static Object | RightIndent
              缩小段落右侧的数量。 
             | 
| static Object | Size
              字体大小的名称。 
             | 
| static Object | SpaceAbove
              段落上方的空间量。 
             | 
| static Object | SpaceBelow
              段落以下的空间量。 
             | 
| static Object | StrikeThrough
              删除线属性的名称。 
             | 
| static Object | Subscript
              下标属性的名称。 
             | 
| static Object | Superscript
              上标属性的名称。 
             | 
| static Object | TabSet
              该类型为TabSet的类型为TabStops。 
             | 
| static Object | Underline
              下划线属性的名称。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| static int | getAlignment(AttributeSet a)
              获取对齐设置。 
             | 
| static Color | getBackground(AttributeSet a)
              从属性列表中获取背景颜色设置。 
             | 
| static int | getBidiLevel(AttributeSet a)
              获取BidiLevel设置。 
             | 
| static Component | getComponent(AttributeSet a)
              从属性列表中获取组件设置。 
             | 
| static float | getFirstLineIndent(AttributeSet a)
              获取第一行缩进设置。 
             | 
| static String | getFontFamily(AttributeSet a)
              从属性列表中获取字体系列设置。 
             | 
| static int | getFontSize(AttributeSet a)
              从属性列表获取字体大小设置。 
             | 
| static Color | getForeground(AttributeSet a)
              从属性列表获取前景色设置。 
             | 
| static Icon | getIcon(AttributeSet a)
              从属性列表中获取图标设置。 
             | 
| static float | getLeftIndent(AttributeSet a)
              获取左缩进设置。 
             | 
| static float | getLineSpacing(AttributeSet a)
              获取行距设置。 
             | 
| static float | getRightIndent(AttributeSet a)
              获取正确的缩进设置。 
             | 
| static float | getSpaceAbove(AttributeSet a)
              获取上述设置的空间。 
             | 
| static float | getSpaceBelow(AttributeSet a)
              获取下面的空间设置。 
             | 
| static TabSet | getTabSet(AttributeSet a)
              获取TabSet。 
             | 
| static boolean | isBold(AttributeSet a)
              检查是否设置了粗体属性。 
             | 
| static boolean | isItalic(AttributeSet a)
              检查是否设置了斜体属性。 
             | 
| static boolean | isStrikeThrough(AttributeSet a)
              检查是否设置了删除线属性。 
             | 
| static boolean | isSubscript(AttributeSet a)
              检查下标属性是否设置。 
             | 
| static boolean | isSuperscript(AttributeSet a)
              检查是否设置了上标属性。 
             | 
| static boolean | isUnderline(AttributeSet a)
              检查是否设置了下划线属性。 
             | 
| static void | setAlignment(MutableAttributeSet a, int align)
              设置对齐。 
             | 
| static void | setBackground(MutableAttributeSet a, Color fg)
              设置背景色。 
             | 
| static void | setBidiLevel(MutableAttributeSet a, int o)
              设置BidiLevel。 
             | 
| static void | setBold(MutableAttributeSet a, boolean b)
              设置粗体属性。 
             | 
| static void | setComponent(MutableAttributeSet a, Component c)
              设置组件属性。 
             | 
| static void | setFirstLineIndent(MutableAttributeSet a, float i)
              设置第一行缩进。 
             | 
| static void | setFontFamily(MutableAttributeSet a, String fam)
              设置字体属性。 
             | 
| static void | setFontSize(MutableAttributeSet a, int s)
              设置字体大小属性。 
             | 
| static void | setForeground(MutableAttributeSet a, Color fg)
              设置前景色。 
             | 
| static void | setIcon(MutableAttributeSet a, Icon c)
              设置图标属性。 
             | 
| static void | setItalic(MutableAttributeSet a, boolean b)
              设置斜体属性。 
             | 
| static void | setLeftIndent(MutableAttributeSet a, float i)
              设置左缩进 
             | 
| static void | setLineSpacing(MutableAttributeSet a, float i)
              设置行距。 
             | 
| static void | setRightIndent(MutableAttributeSet a, float i)
              设置正确的缩进。 
             | 
| static void | setSpaceAbove(MutableAttributeSet a, float i)
              设置上面的空间。 
             | 
| static void | setSpaceBelow(MutableAttributeSet a, float i)
              设置下面的空格。 
             | 
| static void | setStrikeThrough(MutableAttributeSet a, boolean b)
              设置删除线属性。 
             | 
| static void | setSubscript(MutableAttributeSet a, boolean b)
              设置下标属性。 
             | 
| static void | setSuperscript(MutableAttributeSet a, boolean b)
              设置上标属性。 
             | 
| static void | setTabSet(MutableAttributeSet a, TabSet tabs)
              设置TabSet。 
             | 
| static void | setUnderline(MutableAttributeSet a, boolean b)
              设置下划线属性。 
             | 
| String | toString()
              返回字符串表示形式。 
             | 
public static final String ComponentElementName
public static final String IconElementName
public static final Object NameAttribute
public static final Object ResolveAttribute
public static final Object ModelAttribute
public static final Object BidiLevel
public static final Object FontFamily
public static final Object Family
public static final Object FontSize
public static final Object Size
public static final Object Bold
public static final Object Italic
public static final Object Underline
public static final Object StrikeThrough
public static final Object Superscript
public static final Object Subscript
public static final Object Foreground
public static final Object Background
public static final Object ComponentAttribute
public static final Object IconAttribute
public static final Object ComposedTextAttribute
public static final Object FirstLineIndent
public static final Object LeftIndent
public static final Object RightIndent
public static final Object LineSpacing
public static final Object SpaceAbove
public static final Object SpaceBelow
public static final Object Alignment
public static final Object TabSet
public static final Object Orientation
public static final int ALIGN_LEFT
public static final int ALIGN_CENTER
public static final int ALIGN_RIGHT
public static final int ALIGN_JUSTIFIED
public static int getBidiLevel(AttributeSet a)
a - 属性集 
           public static void setBidiLevel(MutableAttributeSet a, int o)
a - 属性集 
           o - 双指标值 
           public static Component getComponent(AttributeSet a)
a - 属性集 
           public static void setComponent(MutableAttributeSet a, Component c)
a - 属性集 
           c - 组件 
           public static Icon getIcon(AttributeSet a)
a - 属性集 
           public static void setIcon(MutableAttributeSet a, Icon c)
a - 属性集 
           c - 图标 
           public static String getFontFamily(AttributeSet a)
a - 属性集 
           public static void setFontFamily(MutableAttributeSet a, String fam)
a - 属性集 
           fam - 字体 
           public static int getFontSize(AttributeSet a)
a - 属性集 
           public static void setFontSize(MutableAttributeSet a, int s)
a - 属性集 
           s - 字体大小 
           public static boolean isBold(AttributeSet a)
a - 属性集 
           public static void setBold(MutableAttributeSet a, boolean b)
a - 属性集 
           b - 为设置属性指定true / false 
           public static boolean isItalic(AttributeSet a)
a - 属性集 
           public static void setItalic(MutableAttributeSet a, boolean b)
a - 属性集 
           b - 为设置属性指定true / false 
           public static boolean isUnderline(AttributeSet a)
a - 属性集 
           public static boolean isStrikeThrough(AttributeSet a)
a - 属性集 
           public static boolean isSuperscript(AttributeSet a)
a - 属性集 
           public static boolean isSubscript(AttributeSet a)
a - 属性集 
           public static void setUnderline(MutableAttributeSet a, boolean b)
a - 属性集 
           b - 为设置属性指定true / false 
           public static void setStrikeThrough(MutableAttributeSet a, boolean b)
a - 属性集 
           b - 为设置属性指定true / false 
           public static void setSuperscript(MutableAttributeSet a, boolean b)
a - 属性集 
           b - 为设置属性指定true / false 
           public static void setSubscript(MutableAttributeSet a, boolean b)
a - 属性集 
           b - 为设置属性指定true / false 
           public static Color getForeground(AttributeSet a)
a - 属性集 
           public static void setForeground(MutableAttributeSet a, Color fg)
a - 属性集 
           fg - 颜色 
           public static Color getBackground(AttributeSet a)
a - 属性集 
           public static void setBackground(MutableAttributeSet a, Color fg)
a - 属性集 
           fg - 颜色 
           public static float getFirstLineIndent(AttributeSet a)
a - 属性集 
           public static void setFirstLineIndent(MutableAttributeSet a, float i)
a - 属性集 
           i - 值 
           public static float getRightIndent(AttributeSet a)
a - 属性集 
           public static void setRightIndent(MutableAttributeSet a, float i)
a - 属性集 
           i - 值 
           public static float getLeftIndent(AttributeSet a)
a - 属性集 
           public static void setLeftIndent(MutableAttributeSet a, float i)
a - 属性集 
           i - 值 
           public static float getLineSpacing(AttributeSet a)
a - 属性集 
           public static void setLineSpacing(MutableAttributeSet a, float i)
a - 属性集 
           i - 值 
           public static float getSpaceAbove(AttributeSet a)
a - 属性集 
           public static void setSpaceAbove(MutableAttributeSet a, float i)
a - 属性集 
           i - 值 
           public static float getSpaceBelow(AttributeSet a)
a - 属性集 
           public static void setSpaceBelow(MutableAttributeSet a, float i)
a - 属性集 
           i - 值 
           public static int getAlignment(AttributeSet a)
a - 属性集 
           StyleConstants.ALIGN_LEFT如果没有设置 
           public static void setAlignment(MutableAttributeSet a, int align)
a - 属性集 
           align - 对齐值 
           public static TabSet getTabSet(AttributeSet a)
a - 属性集 
           TabSet 
           public static void setTabSet(MutableAttributeSet a, TabSet tabs)
a - 属性集。 
           tabs - TabSet 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.