软件包 | 描述 |
---|---|
javax.swing.text |
提供类和接口处理编辑和不可编辑的文本组件。
|
Modifier and Type | Method and Description |
---|---|
protected Segment |
WrappedPlainView.getLineBuffer()
提供访问可用于从相关文档获取文本的缓冲区。
|
protected Segment |
PlainView.getLineBuffer()
提供访问可用于从相关文档获取文本的缓冲区。
|
Segment |
GlyphView.getText(int p0, int p1)
获取占用给定范围的文本的引用。
|
Modifier and Type | Method and Description |
---|---|
static int |
Utilities.drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset)
绘制给定的文本,扩大使用给定的制表符扩展技术所包含的任何制表符。
|
static int |
Utilities.getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset)
确定在给定的范围内打破给定的文本以适应。
|
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)
检索内容的一部分。
|
static int |
Utilities.getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset)
确定给定的文本的相对偏移量,最好表示视图坐标系中的给定跨度。
|
static int |
Utilities.getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, boolean round) |
static int |
Utilities.getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset)
确定给定的文本段的宽度,考虑到标签。
|
void |
Document.getText(int offset, int length, Segment txt)
获取包含在文档中的特定部分的文本。
|
void |
AbstractDocument.getText(int offset, int length, Segment txt)
获取包含在文档中的特定部分的文本。
|
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.