Package | Description |
---|---|
javax.swing |
Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms.
|
javax.swing.plaf |
Provides one interface and many abstract classes that
Swing uses to provide its pluggable look-and-feel capabilities.
|
javax.swing.plaf.basic |
Provides user interface objects built according to the
Basic look and feel.
|
javax.swing.plaf.multi |
Provides user interface objects that combine two or more look and feels.
|
javax.swing.text |
Provides classes and interfaces that deal with editable
and noneditable text components.
|
javax.swing.text.html |
Provides the class
HTMLEditorKit and supporting classes
for creating HTML text editors. |
javax.swing.text.rtf |
Provides a class (
RTFEditorKit ) for creating Rich-Text-Format
text editors. |
Modifier and Type | Method | Description |
---|---|---|
int |
JTextArea.getLineEndOffset(int line)
Determines the offset of the end of the given line.
|
|
int |
JTextArea.getLineOfOffset(int offset)
Translates an offset into the components text to a
line number.
|
|
int |
JTextArea.getLineStartOffset(int line)
Determines the offset of the start of the given line.
|
|
String |
JPasswordField.getText(int offs,
int len)
Deprecated.
As of Java 2 platform v1.2,
replaced by
getPassword . |
Modifier and Type | Method | Description |
---|---|---|
abstract int |
TextUI.getNextVisualPositionFrom(JTextComponent t,
int pos,
Position.Bias b,
int direction,
Position.Bias[] biasRet)
Provides a way to determine the next visually represented model
location that one might place a caret.
|
|
abstract Rectangle |
TextUI.modelToView(JTextComponent t,
int pos)
Converts the given location in the model to a place in
the view coordinate system.
|
|
abstract Rectangle |
TextUI.modelToView(JTextComponent t,
int pos,
Position.Bias bias)
Converts the given location in the model to a place in
the view coordinate system.
|
Modifier and Type | Method | Description |
---|---|---|
int |
BasicTextUI.getNextVisualPositionFrom(JTextComponent t,
int pos,
Position.Bias b,
int direction,
Position.Bias[] biasRet)
Provides a way to determine the next visually represented model
location that one might place a caret.
|
|
Rectangle |
BasicTextUI.modelToView(JTextComponent tc,
int pos)
Converts the given location in the model to a place in
the view coordinate system.
|
|
Rectangle |
BasicTextUI.modelToView(JTextComponent tc,
int pos,
Position.Bias bias)
Converts the given location in the model to a place in
the view coordinate system.
|
Modifier and Type | Method | Description |
---|---|---|
int |
MultiTextUI.getNextVisualPositionFrom(JTextComponent a,
int b,
Position.Bias c,
int d,
Position.Bias[] e)
Invokes the
getNextVisualPositionFrom method on each UI handled by this object. |
|
Rectangle |
MultiTextUI.modelToView(JTextComponent a,
int b)
Invokes the
modelToView method on each UI handled by this object. |
|
Rectangle |
MultiTextUI.modelToView(JTextComponent a,
int b,
Position.Bias c)
Invokes the
modelToView method on each UI handled by this object. |
Modifier and Type | Method | Description |
---|---|---|
Object |
DefaultHighlighter.addHighlight(int p0,
int p1,
Highlighter.HighlightPainter p)
Adds a highlight to the view.
|
|
Object |
Highlighter.addHighlight(int p0,
int p1,
Highlighter.HighlightPainter p)
Adds a highlight to the view.
|
|
void |
DefaultHighlighter.changeHighlight(Object tag,
int p0,
int p1)
Changes a highlight.
|
|
void |
Highlighter.changeHighlight(Object tag,
int p0,
int p1)
Changes the given highlight to span a different portion of
the document.
|
|
Position |
StringContent.createPosition(int offset)
Creates a position within the content that will
track change as the content is mutated.
|
|
Position |
GapContent.createPosition(int offset)
Creates a position within the content that will
track change as the content is mutated.
|
|
Position |
AbstractDocument.createPosition(int offs)
Returns a position that will track change as the document
is altered.
|
|
Position |
AbstractDocument.Content.createPosition(int offset)
Creates a position within the content that will
track change as the content is mutated.
|
|
Position |
Document.createPosition(int offs)
This method allows an application to mark a place in
a sequence of character content.
|
|
protected int |
PasswordView.drawSelectedText(Graphics g,
int x,
int y,
int p0,
int p1)
Renders the given range in the model as selected text.
|
|
protected int |
WrappedPlainView.drawSelectedText(Graphics g,
int x,
int y,
int p0,
int p1)
Renders the given range in the model as selected text.
|
|
protected int |
PlainView.drawSelectedText(Graphics g,
int x,
int y,
int p0,
int p1)
Renders the given range in the model as selected text.
|
|
protected int |
PasswordView.drawUnselectedText(Graphics g,
int x,
int y,
int p0,
int p1)
Renders the given range in the model as normal unselected
text.
|
|
protected int |
WrappedPlainView.drawUnselectedText(Graphics g,
int x,
int y,
int p0,
int p1)
Renders the given range in the model as normal unselected
text.
|
|
protected int |
PlainView.drawUnselectedText(Graphics g,
int x,
int y,
int p0,
int p1)
Renders the given range in the model as normal unselected
text.
|
|
void |
StringContent.getChars(int where,
int len,
Segment chars)
Retrieves a portion of the content.
|
|
void |
GapContent.getChars(int where,
int len,
Segment chars)
Retrieves a portion of the content.
|
|
void |
AbstractDocument.Content.getChars(int where,
int len,
Segment txt)
Gets a sequence of characters and copies them into a Segment.
|
|
protected int |
ParagraphView.getClosestPositionTo(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet,
int rowIndex,
int x)
Returns the closest model position to
x . |
|
protected int |
CompositeView.getNextEastWestVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
Returns the next visual position for the cursor, in either the
east or west direction.
|
|
protected int |
CompositeView.getNextNorthSouthVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
Returns the next visual position for the cursor, in either the
north or south direction.
|
|
protected int |
ParagraphView.getNextNorthSouthVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
Returns the next visual position for the cursor, in
either the east or west direction.
|
|
int |
GlyphView.GlyphPainter.getNextVisualPositionFrom(GlyphView v,
int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
Provides a way to determine the next visually represented model
location that one might place a caret.
|
|
int |
AsyncBoxView.getNextVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
Provides a way to determine the next visually represented model
location that one might place a caret.
|
|
int |
GlyphView.getNextVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
Provides a way to determine the next visually represented model
location that one might place a caret.
|
|
int |
CompositeView.getNextVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
Provides a way to determine the next visually represented model
location that one might place a caret.
|
|
int |
View.getNextVisualPositionFrom(int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias[] biasRet)
Provides a way to determine the next visually represented model
location at which one might place a caret.
|
|
int |
NavigationFilter.getNextVisualPositionFrom(JTextComponent text,
int pos,
Position.Bias bias,
int direction,
Position.Bias[] biasRet)
Returns the next visual position to place the caret at from an
existing position.
|
|
static int |
Utilities.getNextWord(JTextComponent c,
int offs)
Determines the start of the next word for the given location.
|
|
static int |
Utilities.getPositionAbove(JTextComponent c,
int offs,
int x)
Determines the position in the model that is closest to the given
view location in the row above.
|
|
static int |
Utilities.getPositionBelow(JTextComponent c,
int offs,
int x)
Determines the position in the model that is closest to the given
view location in the row below.
|
|
static int |
Utilities.getPreviousWord(JTextComponent c,
int offs)
Determine the start of the prev word for the given location.
|
|
static int |
Utilities.getRowEnd(JTextComponent c,
int offs)
Determines the ending row model position of the row that contains
the specified model position.
|
|
static int |
Utilities.getRowStart(JTextComponent c,
int offs)
Determines the starting row model position of the row that contains
the specified model position.
|
|
String |
StringContent.getString(int where,
int len)
Retrieves a portion of the content.
|
|
String |
GapContent.getString(int where,
int len)
Retrieves a portion of the content.
|
|
String |
AbstractDocument.Content.getString(int where,
int len)
Fetches a string of characters contained in the sequence.
|
|
protected String |
AbstractWriter.getText(Element elem)
Returns the text associated with the element.
|
|
String |
AbstractDocument.getText(int offset,
int length)
Gets a sequence of text from the document.
|
|
String |
Document.getText(int offset,
int length)
Fetches the text contained within the given portion
of the document.
|
|
String |
JTextComponent.getText(int offs,
int len)
Fetches a portion of the text represented by the
component.
|
|
void |
AbstractDocument.getText(int offset,
int length,
Segment txt)
Fetches the text contained within the given portion
of the document.
|
|
void |
Document.getText(int offset,
int length,
Segment txt)
Fetches the text contained within the given portion
of the document.
|
|
static int |
Utilities.getWordEnd(JTextComponent c,
int offs)
Determines the end of a word for the given location.
|
|
static int |
Utilities.getWordStart(JTextComponent c,
int offs)
Determines the start of a word for the given model location.
|
|
protected void |
DefaultStyledDocument.insert(int offset,
DefaultStyledDocument.ElementSpec[] data)
Inserts new elements in bulk.
|
|
void |
DocumentFilter.insertString(DocumentFilter.FilterBypass fb,
int offset,
|