软件包 | 描述 |
---|---|
javax.swing |
提供了一套“轻量级”(所有的java语言)组件,以最大可能的程度,在所有平台上工作。
|
javax.swing.plaf |
提供一个接口和抽象类的使用许多摆动为可插拔的外观和感觉的能力。
|
javax.swing.plaf.basic |
根据基本的外观和感觉提供内置的用户界面对象。
|
javax.swing.plaf.multi |
提供结合两个或多个外观和感觉的用户界面对象。
|
javax.swing.text |
提供类和接口处理编辑和不可编辑的文本组件。
|
javax.swing.text.html |
提供类
HTMLEditorKit 和创建HTML文本编辑器支持类。
|
javax.swing.text.rtf |
提供了一个类(
RTFEditorKit )创建富文本格式的文本编辑器。
|
Modifier and Type | Method and Description |
---|---|
int |
JTextArea.getLineEndOffset(int line)
确定给定行的结束的偏移量。
|
int |
JTextArea.getLineOfOffset(int offset)
将一个偏移量转换成一个行数的偏移量。
|
int |
JTextArea.getLineStartOffset(int line)
确定给定行的起始偏移量的偏移量。
|
String |
JPasswordField.getText(int offs, int len)
过时的。
作为java 2平台V1.2,取而代之的
getPassword 。
|
Modifier and Type | Method and Description |
---|---|
abstract int |
TextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet)
提供了一种方法来确定下一步的直观模型,一个可能的地方插入位置。
|
abstract Rectangle |
TextUI.modelToView(JTextComponent t, int pos)
将模型中给定的位置转换为视图坐标系中的位置。
|
abstract Rectangle |
TextUI.modelToView(JTextComponent t, int pos, Position.Bias bias)
将模型中给定的位置转换为视图坐标系中的位置。
|
Modifier and Type | Method and Description |
---|---|
int |
BasicTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet)
提供了一种方法来确定下一步的直观模型,一个可能的地方插入位置。
|
Rectangle |
BasicTextUI.modelToView(JTextComponent tc, int pos)
将模型中给定的位置转换为视图坐标系中的位置。
|
Rectangle |
BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias)
将模型中给定的位置转换为视图坐标系中的位置。
|
Modifier and Type | Method and Description |
---|---|
int |
MultiTextUI.getNextVisualPositionFrom(JTextComponent a, int b, Position.Bias c, int d, Position.Bias[] e)
调用该对象的每个UI处理
getNextVisualPositionFrom 方法。
|
Rectangle |
MultiTextUI.modelToView(JTextComponent a, int b)
调用该对象的每个UI处理
modelToView 方法。
|
Rectangle |
MultiTextUI.modelToView(JTextComponent a, int b, Position.Bias c)
调用该对象的每个UI处理
modelToView 方法。
|
Modifier and Type | Method and Description |
---|---|
Object |
DefaultHighlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p)
在视图中添加一个高亮。
|
Object |
Highlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p)
在视图中添加一个高亮。
|
void |
DefaultHighlighter.changeHighlight(Object tag, int p0, int p1)
改变一个亮点。
|
void |
Highlighter.changeHighlight(Object tag, int p0, int p1)
更改给定的突出部分,以跨越文档的另一部分。
|
Position |
StringContent.createPosition(int offset)
在内容被突变的内容中创建一个将跟踪更改的内容。
|
Position |
Document.createPosition(int offs)
该方法允许应用程序在一个字符内容的序列中标记一个位置。
|
Position |
AbstractDocument.createPosition(int offs)
返回一个将跟踪更改为文档更改的位置。
|
Position |
AbstractDocument.Content.createPosition(int offset)
在内容被突变的内容中创建一个将跟踪更改的内容。
|
Position |
GapContent.createPosition(int offset)
在内容被突变的内容中创建一个将跟踪更改的内容。
|
protected int |
WrappedPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
以选定的文本呈现模型中的给定范围。
|
protected int |
PasswordView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
以选定的文本呈现模型中的给定范围。
|
protected int |
PlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
以选定的文本呈现模型中的给定范围。
|
protected int |
WrappedPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
将给定的范围内,为正常模式选中的文本。
|
protected int |
PasswordView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
将给定的范围内,为正常模式选中的文本。
|
protected int |
PlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
将给定的范围内,为正常模式选中的文本。
|
void |
StringContent.getChars(int where, int len, Segment chars)
检索内容的一部分。
|
void |
AbstractDocument.Content.getChars(int where, int len, Segment txt)
获取一个字符序列,并将其复制到一个段中。
|
void |
GapContent.getChars(int where, int len, Segment chars)
检索内容的一部分。
|
protected int |
ParagraphView.getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x)
返回最近的位置
x 模型。
|
protected int |
CompositeView.getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
返回光标的下一个视觉位置,无论是在东部或西部方向。
|
protected int |
CompositeView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
返回光标的下一个视觉位置,无论是在北部或南方向。
|
protected int |
ParagraphView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
返回光标的下一个视觉位置,无论是在东部或西部方向。
|
int |
GlyphView.GlyphPainter.getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
提供了一种方法来确定下一步的直观模型,一个可能的地方插入位置。
|
int |
View.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
提供了一种方法来确定下一个直观模型的位置在哪一个可能的地方插入。
|
int |
CompositeView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
提供了一种方法来确定下一步的直观模型,一个可能的地方插入位置。
|
int |
AsyncBoxView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
提供了一种方法来确定下一步的直观模型,一个可能的地方插入位置。
|
int |
GlyphView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
提供了一种方法来确定下一步的直观模型,一个可能的地方插入位置。
|
int |
NavigationFilter.getNextVisualPositionFrom(JTextComponent text, int pos, Position.Bias bias, int direction, Position.Bias[] biasRet)
返回下一个视觉位置处插入从现有位置。
|
static int |
Utilities.getNextWord(JTextComponent c, int offs)
确定给定位置的下一个单词的开始。
|
static int |
Utilities.getPositionAbove(JTextComponent c, int offs, int x)
确定在该行中与给定视图位置最接近的模型中的位置。
|
static int |
Utilities.getPositionBelow(JTextComponent c, int offs, int x)
在下面的行中确定与给定视图位置最接近的模型中的位置。
|
static int |
Utilities.getPreviousWord(JTextComponent c, int offs)
确定对于给定的位置上一词开始。
|
static int |
Utilities.getRowEnd(JTextComponent c, int offs)
确定包含指定模型位置的行的结束行模型位置。
|
static int |
Utilities.getRowStart(JTextComponent c, int offs)
确定包含指定模型位置的行的起始行模型位置。
|
String |
StringContent.getString(int where, int len)
检索内容的一部分。
|
String |
AbstractDocument.Content.getString(int where, int len)
获取包含在序列的字符串。
|
String |
GapContent.getString(int where, int len)
检索内容的一部分。
|
protected String |
AbstractWriter.getText(Element elem)
返回与元素关联的文本。
|
String |
Document.getText(int offset, int length)
获取包含在文档中的特定部分的文本。
|
String |
AbstractDocument.getText(int offset, int length)
从文档获取一个文本序列。
|
String |
JTextComponent.getText(int offs, int len)
获取由组件为代表的文本的一部分。
|
void |
Document.getText(int offset, int length, Segment txt)
获取包含在文档中的特定部分的文本。
|
void |
AbstractDocument.getText(int offset, int length, Segment txt)
获取包含在文档中的特定部分的文本。
|
static int |
Utilities.getWordEnd(JTextComponent c, int offs)
确定给定位置的一个字的结束。
|
static int |
Utilities.getWordStart(JTextComponent c, int offs)
确定给定模型位置的一个单词的开始。
|
protected void |
DefaultStyledDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data)
批量插入新元素。
|
void |
DocumentFilter.insertString(DocumentFilter.FilterBypass fb, int offset, String string, AttributeSet attr)
在将文本插入到指定的文档之前调用。
|
UndoableEdit |
StringContent.insertString(int where, String str)
在内容中插入一个字符串。
|
UndoableEdit |
AbstractDocument.Content.insertString(int where, String str)
将一个字符串插入到序列中。
|
UndoableEdit |
GapContent.insertString(int where, String str)
在内容中插入一个字符串。
|
void |
Document.insertString(int offset, String str, AttributeSet a)
插入一个内容字符串。
|
abstract void |
DocumentFilter.FilterBypass.insertString(int offset, String string, AttributeSet attr)
将指定的文本,绕过documentfilter。
|
void |
AbstractDocument.insertString(int offs, String str, AttributeSet a)
在文档中插入一些内容。
|
void |
PlainDocument.insertString(int offs, String str, AttributeSet a)
在文档中插入一些内容。
|
abstract Shape |
GlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
Rectangle |
JTextComponent.modelToView(int pos)
将模型中给定的位置转换为视图坐标系中的位置。
|
Shape |
View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a)
提供了一个映射,对于一个给定区域,从文档模型坐标空间到视图坐标空间。
|
Shape |
CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
Shape |
View.modelToView(int pos, Shape a)
过时的。
|
Shape |
PasswordView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
abstract Shape |
View.modelToView(int pos, Shape a, Position.Bias b)
提供了一个映射,对于一个给定的字符,从文档模型坐标空间到视图坐标空间。
|
Shape |
CompositeView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
Shape |
PlainView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
Shape |
AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
Shape |
FieldView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
Shape |
ComponentView.modelToView(int pos, Shape a, Position.Bias b)
从模型的坐标空间提供了一个映射到视图的映射。
|
Shape |
GlyphView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
Shape |
BoxView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
Shape |
IconView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
abstract void |
EditorKit.read(InputStream in, Document doc, int pos)
从给定的流中插入内容,该内容预计将在适合这种内容处理程序的格式中进行。
|
void |
DefaultEditorKit.read(InputStream in, Document doc, int pos)
从给定的流中插入内容,该内容预计将在适合这种内容处理程序的格式中进行。
|
abstract void |
EditorKit.read(Reader in, Document doc, int pos)
从给定的流中插入内容,该内容预计将在适合这种内容处理程序的格式中进行。
|
void |
DefaultEditorKit.read(Reader in, Document doc, int pos)
将内容从给定的流中插入,这将被视为纯文本。
|
void |
DocumentFilter.remove(DocumentFilter.FilterBypass fb, int offset, int length)
在指定文档中删除指定区域之前调用。
|
UndoableEdit |
StringContent.remove(int where, int nitems)
删除内容的一部分。
|
void |
Document.remove(int offs, int len)
移除文档内容的一部分。
|
abstract void |
DocumentFilter.FilterBypass.remove(int offset, int length)
删除文本的指定区域,绕过documentfilter。
|
void |
AbstractDocument.remove(int offs, int len)
从文档中删除一些内容。
|
UndoableEdit |
AbstractDocument.Content.remove(int where, int nitems)
移除序列的某些部分。
|
UndoableEdit |
GapContent.remove(int where, int nitems)
删除内容的一部分。
|
void |
DocumentFilter.replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs)
在替换指定文档中的文本区域之前调用的。
|
abstract void |
DocumentFilter.FilterBypass.replace(int offset, int length, String string, AttributeSet attrs)
删除文本区域从
offset 到
offset + length ,与
text 取代它。
|
void |
AbstractDocument.replace(int offset, int length, String text, AttributeSet attrs)
删除文本区域从
offset 到
offset + length ,与
text 取代它。
|
protected void |
AbstractWriter.text(Element elem)
写文本。
|
protected abstract void |
AbstractWriter.write()
这种抽象方法需要通过子类来实现。
|
abstract void |
EditorKit.write(OutputStream out, Document doc, int pos, int len)
将内容从文档以适当的格式将内容写入到给定的流中。
|
void |
DefaultEditorKit.write(OutputStream out, Document doc, int pos, int len)
将内容从文档以适当的格式将内容写入到给定的流中。
|
abstract void |
EditorKit.write(Writer out, Document doc, int pos, int len)
将内容从文档以适当的格式将内容写入到给定的流中。
|
void |
DefaultEditorKit.write(Writer out, Document doc, int pos, int len)
将内容从文档写入给定流为纯文本。
|
Modifier and Type | Method and Description |
---|---|
protected void |
HTMLWriter.comment(Element elem)
写评论。
|
protected void |
HTMLWriter.emptyTag(Element elem)
写出所有的空元素(所有没有相应的结束标签的所有标签)。
|
void |
HTMLDocument.HTMLReader.flush()
最后一种方法调用阅读器。
|
void |
HTMLEditorKit.ParserCallback.flush() |
protected void |
HTMLDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data)
批量插入新元素。
|
void |
HTMLDocument.insertAfterEnd(Element elem, String htmlText)
插入指定为结束的给定元素在一个字符串的HTML。
|
void |
HTMLDocument.insertAfterStart(Element elem, String htmlText)
插入指定的字符串的HTML元素的开始。
|
void |
HTMLDocument.insertBeforeEnd(Element elem, String htmlText)
插入指定为底的元素的HTML字符串。
|
void |
HTMLDocument.insertBeforeStart(Element elem, String htmlText)
插入指定为在给定字符串的HTML元素的开始。
|
void |
HTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag)
插入HTML到一个已经存在的文件。
|
Shape |
ImageView.modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
void |
HTMLEditorKit.read(Reader in, Document doc, int pos)
从给定流中插入内容。
|
void |
HTMLDocument.setInnerHTML(Element elem, String htmlText)
将给定元素的内容指定为HTML字符串的孩子。
|
void |
HTMLDocument.setOuterHTML(Element elem, String htmlText)
将给定的元素与内容的HTML字符串指定为母。
|
protected void |
HTMLWriter.startTag(Element elem)
为元素写了一个开始标记。
|
protected void |
HTMLWriter.text(Element elem)
写文本。
|
protected void |
MinimalHTMLWriter.text(Element elem)
写文本。
|
protected void |
HTMLWriter.textAreaContent(AttributeSet attr)
写出来的,是包含在一个文本形式的元素文本。
|
void |
HTMLWriter.write()
遍历元素树控制写出来的所有的标签和属性。
|
void |
MinimalHTMLWriter.write()
从styleddocument生成HTML输出。
|
void |
HTMLEditorKit.write(Writer out, Document doc, int pos, int len)
用适当的格式将文档中的内容写入该类内容处理程序的格式中的内容。
|
protected void |
MinimalHTMLWriter.writeBody()
遍历元素在文档和流程元素是否以分支或叶元素元素。
|
protected void |
MinimalHTMLWriter.writeContent(Element elem, boolean needsIndenting)
写在HTML兼容的方式的属性。
|
Modifier and Type | Method and Description |
---|---|
void |
RTFEditorKit.read(InputStream in, Document doc, int pos)
从给定的流中插入内容,该内容预计将在适合这种内容处理程序的格式中进行。
|
void |
RTFEditorKit.read(Reader in, Document doc, int pos)
将内容从给定的流中插入,将被视为纯文本。
|
void |
RTFEditorKit.write(OutputStream out, Document doc, int pos, int len)
用适当的格式将文档中的内容写入该类内容处理程序的格式中的内容。
|
void |
RTFEditorKit.write(Writer out, Document doc, int pos, int len)
从文档到给定流的写入内容为纯文本。
|
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.