软件包 | 描述 |
---|---|
javax.swing |
提供了一套“轻量级”(所有的java语言)组件,以最大可能的程度,在所有平台上工作。
|
javax.swing.text |
提供类和接口处理编辑和不可编辑的文本组件。
|
javax.swing.text.html |
提供类
HTMLEditorKit 和创建HTML文本编辑器支持类。
|
Modifier and Type | Method and Description |
---|---|
Style |
JTextPane.addStyle(String nm, Style parent)
在逻辑样式层次结构中添加一个新样式。
|
Style |
JTextPane.getLogicalStyle()
获取指定的插入当前位置为代表的段落的逻辑风格,或
null 。
|
Style |
JTextPane.getStyle(String nm)
获取一个名叫非
null 风格以前添加的。
|
Modifier and Type | Method and Description |
---|---|
Style |
JTextPane.addStyle(String nm, Style parent)
在逻辑样式层次结构中添加一个新样式。
|
void |
JTextPane.setLogicalStyle(Style s)
设置用于段落在当前插入符号位置的逻辑风格。
|
Modifier and Type | Class and Description |
---|---|
class |
StyleContext.NamedStyle
属性的集合,通常用来表示字符和段落样式。
|
Modifier and Type | Method and Description |
---|---|
Style |
StyledDocument.addStyle(String nm, Style parent)
在逻辑样式层次结构中添加一个新样式。
|
Style |
DefaultStyledDocument.addStyle(String nm, Style parent)
在逻辑样式层次结构中添加一个新样式。
|
Style |
StyleContext.addStyle(String nm, Style parent)
在样式层次结构中添加一个新样式。
|
Style |
StyledDocument.getLogicalStyle(int p)
获取一个段落中给定位置的逻辑样式。
|
Style |
DefaultStyledDocument.getLogicalStyle(int p)
获取分配给给定的位置代表段落的逻辑风格。
|
Style |
StyledDocument.getStyle(String nm)
获取一个名叫风格以前添加的。
|
Style |
DefaultStyledDocument.getStyle(String nm)
获取一个名叫风格以前添加的。
|
Style |
StyleContext.getStyle(String nm)
获取一个名叫风格以前添加到文档
|
Modifier and Type | Method and Description |
---|---|
Style |
StyledDocument.addStyle(String nm, Style parent)
在逻辑样式层次结构中添加一个新样式。
|
Style |
DefaultStyledDocument.addStyle(String nm, Style parent)
在逻辑样式层次结构中添加一个新样式。
|
Style |
StyleContext.addStyle(String nm, Style parent)
在样式层次结构中添加一个新样式。
|
void |
StyledDocument.setLogicalStyle(int pos, Style s)
设置给定位置的段落的逻辑样式。
|
void |
DefaultStyledDocument.setLogicalStyle(int pos, Style s)
设置给定位置的段落的逻辑样式。
|
protected void |
DefaultStyledDocument.styleChanged(Style style)
当此文档的样式更改时调用。
|
Constructor and Description |
---|
NamedStyle(String name, Style parent)
创建一个新的命名样式。
|
NamedStyle(Style parent)
创建一个新的命名样式。
|
Modifier and Type | Method and Description |
---|---|
Style |
StyleSheet.getRule(HTML.Tag t, Element e)
取样式来呈现特定的HTML标签类型。
|
Style |
StyleSheet.getRule(String selector)
获取最佳匹配在字符串形式给出的选择规则。
|
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.