public static class DefaultStyledDocument.ElementSpec extends Object
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans
包。请看XMLEncoder
。
Modifier and Type | Field and Description |
---|---|
static short |
ContentType
对于一个有价值的方法。
|
static short |
EndTagType
对于一个有价值的方法。
|
static short |
JoinFractureDirection
一个可能的值为getdirection。
|
static short |
JoinNextDirection
一个可能的值为getdirection。
|
static short |
JoinPreviousDirection
一个可能的值为getdirection。
|
static short |
OriginateDirection
一个可能的值为getdirection。
|
static short |
StartTagType
对于一个有价值的方法。
|
Constructor and Description |
---|
ElementSpec(AttributeSet a, short type)
当标记将不存储在文档中时,对标记有用的构造函数。
|
ElementSpec(AttributeSet a, short type, char[] txt, int offs, int len)
用于为文档的内容和标记的批输入创建外部规范的构造函数。
|
ElementSpec(AttributeSet a, short type, int len)
构造函数解析文档里面的数据已经被添加,但Len的信息是必要的。
|
Modifier and Type | Method and Description |
---|---|
char[] |
getArray()
获取字符的数组。
|
AttributeSet |
getAttributes()
获取元素属性。
|
short |
getDirection()
获取方向。
|
int |
getLength()
获取长度。
|
int |
getOffset()
获取起始偏移量。
|
short |
getType()
获取元素类型。
|
void |
setDirection(short direction)
设置方向。
|
void |
setType(short type)
设置元素类型。
|
String |
toString()
将元素转换为字符串。
|
public static final short StartTagType
public static final short EndTagType
public static final short ContentType
public static final short JoinPreviousDirection
public static final short JoinNextDirection
public static final short OriginateDirection
public static final short JoinFractureDirection
public ElementSpec(AttributeSet a, short type)
a
-该元素的属性
type
-该元素的类型(starttagtype,EndTagType,contentType)
public ElementSpec(AttributeSet a, short type, int len)
a
-该元素的属性
type
-该元素的类型(starttagtype,EndTagType,contentType)
len
-长度> = 0
public ElementSpec(AttributeSet a, short type, char[] txt, int offs, int len)
a
-该元素的属性
type
-该元素的类型(starttagtype,EndTagType,contentType)
txt
为元素的文本
offs
-偏移到文本> = 0
len
-文本> = 0的长度
public void setType(short type)
type
-该元素的类型(starttagtype,EndTagType,contentType)
public short getType()
public void setDirection(short direction)
direction
-方向(joinpreviousdirection,joinnextdirection)
public short getDirection()
public AttributeSet getAttributes()
public char[] getArray()
public int getOffset()
public int getLength()
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.