- java.lang.Object
-  
      - javax.swing.text.DefaultStyledDocument.ElementSpec
 
-  
       - Enclosing class:
- DefaultStyledDocument
 
 public static class DefaultStyledDocument.ElementSpec extends Object 建筑构件规范。警告:此类的序列化对象与以后的Swing版本不兼容。 当前的序列化支持适用于运行相同版本Swing的应用程序之间的短期存储或RMI。 从1.4开始, java.beans软件包中添加了对所有JavaBeansjava.beans长期存储的支持。 请参阅XMLEncoder。
-  
        
       -  
             字段汇总字段 变量和类型 字段 描述 static shortContentTypegetType的可能值。static shortEndTagTypegetType的可能值。static shortJoinFractureDirectiongetDirection的可能值。static shortJoinNextDirectiongetDirection的可能值。static shortJoinPreviousDirectiongetDirection的可能值。static shortOriginateDirectiongetDirection的可能值。static shortStartTagTypegetType的可能值。
 -  
             构造方法摘要构造方法 构造器 描述 ElementSpec(AttributeSet a, short type)当标记不存储在文档中时,构造函数对标记有用。ElementSpec(AttributeSet a, short type, char[] txt, int offs, int len)用于在内部创建规范以便批量输入内容和标记到文档中的构造函数。ElementSpec(AttributeSet a, short type, int len)用于在已添加数据时解析文档内部的构造函数,但需要len信息。
 -  
             方法摘要所有方法 实例方法 具体的方法 变量和类型 方法 描述 char[]getArray()获取字符数组。AttributeSetgetAttributes()获取元素属性。shortgetDirection()获取方向。intgetLength()获取长度。intgetOffset()获取起始偏移量。shortgetType()获取元素类型。voidsetDirection(short direction)设置方向。voidsetType(short type)设置元素类型。StringtoString()将元素转换为字符串。
 
-  
             
-  
        
       -  
             字段详细信息-  StartTagTypepublic static final short StartTagType getType的可能值。 这指定此记录类型是开始标记,并表示指定元素开始的标记。- 另请参见:
- 常数字段值
 
 -  EndTagTypepublic static final short EndTagType getType的可能值。 这指定此记录类型是结束标记,并表示指定元素结尾的标记。- 另请参见:
- 常数字段值
 
 -  ContentTypepublic static final short ContentType getType的可能值。 这指定此记录类型表示内容。- 另请参见:
- 常数字段值
 
 -  JoinPreviousDirectionpublic static final short JoinPreviousDirection getDirection的可能值。 这指定与此记录关联的数据应该连接到它之前的数据。- 另请参见:
- 常数字段值
 
 -  JoinNextDirectionpublic static final short JoinNextDirection getDirection的可能值。 这指定与此记录关联的数据应与其后的内容相连接。- 另请参见:
- 常数字段值
 
 -  OriginateDirectionpublic static final short OriginateDirection getDirection的可能值。 这指定应该使用与此记录关联的数据来发起新元素。 这将是正常值。- 另请参见:
- 常数字段值
 
 -  JoinFractureDirectionpublic static final short JoinFractureDirection getDirection的可能值。 这指定与此记录关联的数据应连接到断裂元素。- 另请参见:
- 常数字段值
 
 
-  
 -  
             构造方法详细信息-  ElementSpecpublic ElementSpec(AttributeSet a, short type) 当标记不存储在文档中时,构造函数对标记有用。- 参数
-  
              a- 元素的属性
-  
              type- 元素的类型(StartTagType,EndTagType,ContentType)
 
 -  ElementSpecpublic ElementSpec(AttributeSet a, short type, int len) 用于在已添加数据时解析文档内部的构造函数,但需要len信息。- 参数
-  
              a- 元素的属性
-  
              type- 元素的类型(StartTagType,EndTagType,ContentType)
-  
              len- 长度> = 0
 
 -  ElementSpecpublic ElementSpec(AttributeSet a, short type, char[] txt, int offs, int len) 用于在内部创建规范以便批量输入内容和标记到文档中的构造函数。- 参数
-  
              a- 元素的属性
-  
              type- 元素的类型(StartTagType,EndTagType,ContentType)
-  
              txt- 元素的文本
-  
              offs- 文本中的偏移量> = 0
-  
              len- 文本的长度> = 0
 
 
-  
 -  
             方法详细信息-  setTypepublic void setType(short type) 设置元素类型。- 参数
-  
              type- 元素的类型(StartTagType,EndTagType,ContentType)
 
 -  getTypepublic short getType() 获取元素类型。- 结果
- 元素的类型(StartTagType,EndTagType,ContentType)
 
 -  setDirectionpublic void setDirection(short direction) 设置方向。- 参数
-  
              direction- 方向(JoinPreviousDirection,JoinNextDirection)
 
 -  getDirectionpublic short getDirection() 获取方向。- 结果
- 方向(JoinPreviousDirection,JoinNextDirection)
 
 -  getAttributespublic AttributeSet getAttributes() 获取元素属性。- 结果
- 属性集
 
 -  getArraypublic char[] getArray() 获取字符数组。- 结果
- 数组
 
 -  getOffsetpublic int getOffset() 获取起始偏移量。- 结果
- 偏移> = 0
 
 -  getLengthpublic int getLength() 获取长度。- 结果
- 长度> = 0
 
 
-  
 
-