Uses of Class javax.swing.text.BadLocationException

Uses in package javax.swing.text.html

Methods which throw type javax.swing.text.BadLocationException

void
Writes out the comment.
void
Writes out an empty tag. i.e. a tag without any child elements.
void
This is the last method called on the HTMLReader, allowing any pending changes to be flushed to the HTMLDocument.
void
The parser calls this method after it finishes parsing the document.
void
Inserts the string after the end of the given element.
void
Inserts the string at the start of the element.
void
Inserts the string at the end of the element.
void
Inserts the string before the start of the given element.
void
HTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag)
Inserts HTML into an existing document.
Shape
ImageView.modelToView(int pos, Shape area, Position.Bias bias)
This is currently implemented always to return the area of the image view, as the image is not divideable by character positions.
void
HTMLEditorKit.read(Reader in, Document doc, int pos)
Inserts content from the given stream.
void
Replaces the children of the given element with the contents of the string.
void
Replaces the given element in the parent with the string.
void
Writes out a start tag.
void
HTMLWriter.text(Element paramElem)
Writes out text, within the appropriate range if it is specified.
void
void
Writes out the contents of a textarea.
void
Call this method to start outputing HTML.
void
Write the entire HTML document.
void
HTMLEditorKit.write(Writer out, Document doc, int pos, int len)
Writes content from a document to the given stream in an appropriate format.
void
Writes the body of the HTML document.
void
MinimalHTMLWriter.writeContent(Element elem, boolean needsIndenting)
Writes the content of an element.

Uses in package javax.swing.plaf.basic

Methods which throw type javax.swing.text.BadLocationException

int
Gets the next position inside the document model that is visible on screen, starting from pos.
Rectangle
Maps a position in the document into the coordinate space of the View.
Rectangle
Maps a position in the document into the coordinate space of the View.

Uses in package javax.swing.plaf

Methods which throw type javax.swing.text.BadLocationException

int
TextUI.getNextVisualPositionFrom(JTextComponent tc, int pos, Position.Bias bias, int direction, Position.Bias[] outBias)
Calculates the caret position that is visually next to the given position.
Rectangle
Calculates the geometric extent of the character at the given offset.
Rectangle
Calculates the geometric extent of the character at the given offset.

Uses in package javax.swing.text.rtf

Methods which throw type javax.swing.text.BadLocationException

void
RTFEditorKit.read(InputStream stream, Document doc, int pos)
Reads RTF data from stream into doc at the specified position pos.
void
RTFEditorKit.read(Reader reader, Document doc, int pos)
Reads RTF data from reader into doc at the specified position pos.

Uses in package javax.swing.plaf.multi

Methods which throw type javax.swing.text.BadLocationException

int
MultiTextUI.getNextVisualPositionFrom(JTextComponent tc, int pos, Position.Bias bias, int direction, Position.Bias[] outBias)
Calls the TextUI.getNextVisualPositionFrom(JTextComponent,int,Position.Bias,int,Position.Bias[]) method for all the UI delegates managed by this MultiTextUI, returning the position for the UI delegate from the primary look and feel.
Rectangle
Calls the TextUI.modelToView(JTextComponent,int) method for all the UI delegates managed by this MultiTextUI, returning the bounds for the UI delegate from the primary look and feel.
Rectangle
Calls the TextUI.modelToView(JTextComponent,int,Position.Bias) method for all the UI delegates managed by this MultiTextUI, returning the bounds for the UI delegate from the primary look and feel.

Uses in package javax.swing

Methods which throw type javax.swing.text.BadLocationException

int
int
int
String
JPasswordField.getText(int offset, int length)
Fetches a portion of the text represented by the component.

Uses in package javax.swing.text

Methods which throw type javax.swing.text.BadLocationException

Object
Object
void
DefaultHighlighter.changeHighlight(Object tag, int n0, int n1)
void
Highlighter.changeHighlight(Object tag, int p0, int p1)
Position
Creates a Position that keeps track of the location at the specified offset.
Position
Creates a Position that keeps track of the location at offset.
Position
Creates a mark in the character content at the specified offset.
Position
Creates and returns a mark at the specified position.
Position
Creates a position reference for the character at the given offset.
int
PasswordView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
Draws selected text at a given position.
int
PlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
int
WrappedPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
Renders the range of text as selected text.
int
PasswordView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
Draws unselected text at a given position.
int
PlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
Draws a chunk of unselected text.
int
WrappedPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
Renders the range of text as normal unhighlighted text.
void
AbstractDocument.Content.getChars(int where, int len, Segment txt)
Fetches a piece of content and stores it in txt.
void
GapContent.getChars(int where, int len, Segment txt)
Fetches a piece of content and stores it in a Segment object.
void
StringContent.getChars(int where, int len, Segment txt)
Updates txt to contain a direct reference to the underlying character array.
int
ParagraphView.getClosestPositionTo(int pos, Position.Bias bias, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x)
int
Returns the next model location that is visible in east or west direction.
int
Returns the next model location that is visible in north or south direction.
int
CompositeView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
Returns the next model location that is visible in eiter north / south direction or east / west direction.
int
GlyphView.getNextVisualPositionFrom(int pos, Position.Bias bias, Shape a, int direction, Position.Bias[] biasRet)
Returns the model location that should be used to place a caret when moving the caret through the document.
int
View.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int d, Position.Bias[] biasRet)
Returns the document position that is (visually) nearest to the given document position pos in the given direction d.
int
Returns the model location that should be used to place a caret when moving the caret through the document.
int
Returns the next visual position in the specified direction at which one would place a caret.
int
Finds the start of the next word for the given offset.
int
Utilities.getPositionAbove(JTextComponent c, int offset, int x)
Returns the document position that is closest above to the specified x coordinate in the row containing offset.
int
Utilities.getPositionBelow(JTextComponent c, int offset, int x)
Returns the document position that is closest below to the specified x coordinate in the row containing offset.
int
Finds the start of the previous word for the given offset.
int
Get the model position of the end of the row that contains the specified model position.
int
Get the model position of the start of the row that contains the specified model position.
String
AbstractDocument.Content.getString(int where, int len)
Returns a piece of content.
String
GapContent.getString(int where, int len)
Returns a piece of content as String.
String
StringContent.getString(int where, int len)
Returns a new String containing the characters in the specified range.
String
AbstractDocument.getText(int offset, int length)
Returns a piece of this Document's content.
String
Document.getText(int offset, int length)
Returns the textual content starting at offset with a length of length.
String
JTextComponent.getText(int offset, int length)
Retrieves a part of the current text in this document.
void
AbstractDocument.getText(int offset, int length, Segment segment)
Fetches a piece of this Document's content and stores it in the given Segment.
void
Document.getText(int offset, int length, Segment txt)
Fetch the textual content starting at offset with a length of length and store it in txt.
String
Return the text of the Document that is associated with the given Element.
int
Finds the end of a word for the given location.
int
Finds the start of a word for the given location.
void
Inserts a bulk of structured content at once.
UndoableEdit
Inserts a string into the content model.
UndoableEdit
GapContent.insertString(int where, String str)
Inserts a string at the specified position.
UndoableEdit
Inserts str at the given position and returns an UndoableEdit that enables undo/redo support.
void
AbstractDocument.insertString(int offset, String text, AttributeSet attributes)
Inserts a String into this Document at the specified position and assigning the specified attributes to it.
void
Document.insertString(int offset, String str, AttributeSet a)
Inserts a piece of text with an AttributeSet at the specified offset.
void
void
Inserts a string into the document.
void
Rectangle
Shape
View.modelToView(int pos, Shape a)
Maps a position in the document into the coordinate space of the View.
Shape
Maps a model location to view coordinates.
Shape
BoxView.modelToView(int pos, Shape a, Position.Bias bias)
Maps the document model position pos to a Shape in the view coordinate space.
Shape
Maps a position in the document into the coordinate space of the View.
Shape
Maps a position in the document into the coordinate space of the View.
Shape
Maps a position in the document into the coordinate space of the View.
Shape
Maps a position in the document into the coordinate space of the View.
Shape
Maps a position in the document into the coordinate space of the View.
Shape
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape
PlainView.modelToView(int position, Shape a, Position.Bias b)
Shape
Maps a position in the document into the coordinate space of the View.
Shape
Maps a region in the document into the coordinate space of the View.
Shape
View.modelToView(int p1, Position.Bias b1, int p2, Position.Bias b2, Shape a)
Maps a region in the document into the coordinate space of the View.
Shape
Maps a position in the document into the coordinate space of the View.
void
DefaultEditorKit.read(InputStream in, Document document, int offset)
Reads a document of the supported content type from an InputStream into the actual Document object.
void
EditorKit.read(InputStream in, Document doc, int pos)
void
DefaultEditorKit.read(Reader in, Document document, int offset)
Reads a document of the supported content type from a Reader into the actual Document object.
void
EditorKit.read(Reader in, Document doc, int pos)
void
AbstractDocument.remove(int offset, int length)
Removes a piece of content from this Document.
UndoableEdit
AbstractDocument.Content.remove(int where, int nitems)
Removes a piece of content from the content model.
void
Document.remove(int offs, int len)
Removes a piece of content.
void
DocumentFilter.FilterBypass.remove(int offset, int length)
UndoableEdit
GapContent.remove(int where, int nitems)
Removes a piece of content at th specified position.
UndoableEdit
StringContent.remove(int where, int nitems)
Removes the specified range of characters and returns an UndoableEdit that enables undo/redo support.
void
DocumentFilter.remove(DocumentFilter.FilterBypass fb, int offset, int length)
void
AbstractDocument.replace(int offset, int length, String text, AttributeSet attributes)
Replaces a piece of content in this Document with another piece of content.
void
DocumentFilter.FilterBypass.replace(int offset, int length, String string, AttributeSet attrs)
void
DocumentFilter.replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attr)
void
Output the text of the indicated Element, properly clipping it to the range of the Document specified when the AbstractWriter was created.
void
This method must be overridden by a concrete subclass.
void
DefaultEditorKit.write(OutputStream out, Document document, int offset, int len)
Writes the Document (or a fragment of the Document) to an OutputStream in the supported content type format.
void
EditorKit.write(OutputStream out, Document doc, int pos, int len)
void
DefaultEditorKit.write(Writer out, Document document, int offset, int len)
Writes the Document (or a fragment of the Document) to a Writer in the supported content type format.
void
EditorKit.write(Writer out, Document doc, int pos, int len)