Uses of Class
javax.swing.text.BadLocationException
Packages that use BadLocationException
Package
Description
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides one interface and many abstract classes that Swing uses to provide
its pluggable look-and-feel capabilities.
Provides user interface objects built according to the Basic look and feel.
Provides user interface objects that combine two or more look and feels.
Provides classes and interfaces that deal with editable and noneditable text
components.
Provides the class
HTMLEditorKit and supporting classes for creating
HTML text editors.Provides a class (
RTFEditorKit) for creating Rich-Text-Format text
editors.-
Uses of BadLocationException in javax.swing
Methods in javax.swing that throw BadLocationExceptionModifier and TypeMethodDescriptionintJTextArea.getLineEndOffset(int line) Determines the offset of the end of the given line.intJTextArea.getLineOfOffset(int offset) Translates an offset into the components text to a line number.intJTextArea.getLineStartOffset(int line) Determines the offset of the start of the given line.JPasswordField.getText(int offs, int len) Deprecated. -
Uses of BadLocationException in javax.swing.plaf
Methods in javax.swing.plaf that throw BadLocationExceptionModifier and TypeMethodDescriptionabstract intTextUI.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 RectangleTextUI.modelToView(JTextComponent t, int pos) Deprecated.abstract RectangleTextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Deprecated.TextUI.modelToView2D(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system. -
Uses of BadLocationException in javax.swing.plaf.basic
Methods in javax.swing.plaf.basic that throw BadLocationExceptionModifier and TypeMethodDescriptionintBasicTextUI.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.BasicTextUI.modelToView(JTextComponent tc, int pos) Deprecated.BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias) Deprecated. -
Uses of BadLocationException in javax.swing.plaf.multi
Methods in javax.swing.plaf.multi that throw BadLocationExceptionModifier and TypeMethodDescriptionintMultiTextUI.getNextVisualPositionFrom(JTextComponent a, int b, Position.Bias c, int d, Position.Bias[] e) Invokes thegetNextVisualPositionFrommethod on each UI handled by this object.MultiTextUI.modelToView(JTextComponent a, int b) Deprecated.MultiTextUI.modelToView(JTextComponent a, int b, Position.Bias c) Deprecated. -
Uses of BadLocationException in javax.swing.text
Methods in javax.swing.text that throw BadLocationExceptionModifier and TypeMethodDescriptionDefaultHighlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.Highlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.voidDefaultHighlighter.changeHighlight(Object tag, int p0, int p1) Changes a highlight.voidHighlighter.changeHighlight(Object tag, int p0, int p1) Changes the given highlight to span a different portion of the document.AbstractDocument.Content.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.AbstractDocument.createPosition(int offs) Returns a position that will track change as the document is altered.Document.createPosition(int offs) This method allows an application to mark a place in a sequence of character content.GapContent.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.StringContent.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.protected intPasswordView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Deprecated.protected floatPlainView.drawSelectedText(Graphics2D g, float x, float y, int p0, int p1) Renders the given range in the model as selected text.protected intPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Deprecated.protected floatWrappedPlainView.drawSelectedText(Graphics2D g, float x, float y, int p0, int p1) Renders the given range in the model as selected text.protected intWrappedPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Deprecated.protected intPasswordView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Deprecated.protected floatPlainView.drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) Renders the given range in the model as normal unselected text.protected intPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Deprecated.protected floatWrappedPlainView.drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) Renders the given range in the model as normal unselected text.protected intWrappedPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Deprecated.voidGets a sequence of characters and copies them into a Segment.voidRetrieves a portion of the content.voidRetrieves a portion of the content.protected intParagraphView.getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) Returns the closest model position tox.protected intCompositeView.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 intCompositeView.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 intParagraphView.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.intAsyncBoxView.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.intCompositeView.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.intGlyphView.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.intGlyphView.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.intNavigationFilter.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.intView.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.static final intUtilities.getNextWord(JTextComponent c, int offs) Determines the start of the next word for the given location.static final intUtilities.getPositionAbove(JTextComponent c, int offs, float x) Determines the position in the model that is closest to the given view location in the row above.static final intUtilities.getPositionAbove(JTextComponent c, int offs, int x) Deprecated.static final intUtilities.getPositionBelow(JTextComponent c, int offs, float x) Determines the position in the model that is closest to the given view location in the row below.static final intUtilities.getPositionBelow(JTextComponent c, int offs, int x) Deprecated.static final intUtilities.getPreviousWord(JTextComponent c, int offs) Determine the start of the prev word for the given location.static final intUtilities.getRowEnd(JTextComponent c, int offs) Determines the ending row model position of the row that contains the specified model position.static final intUtilities.getRowStart(JTextComponent c, int offs) Determines the starting row model position of the row that contains the specified model position.AbstractDocument.Content.getString(int where, int len) Fetches a string of characters contained in the sequence.GapContent.getString(int where, int len) Retrieves a portion of the content.StringContent.getString(int where, int len) Retrieves a portion of the content.AbstractDocument.getText(int offset, int length) Gets a sequence of text from the document.voidFetches the text contained within the given portion of the document.protected StringReturns the text associated with the element.Document.getText(int offset, int length) Fetches the text contained within the given portion of the document.voidFetches the text contained within the given portion of the document.JTextComponent.getText(int offs, int len) Fetches a portion of the text represented by the component.static final intUtilities.getWordEnd(JTextComponent c, int offs) Determines the end of a word for the given location.static final intUtilities.getWordStart(JTextComponent c, int offs) Determines the start of a word for the given model location.protected voidDefaultStyledDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data) Inserts new elements in bulk.AbstractDocument.Content.insertString(int where, String str) Inserts a string of characters into the sequence.voidAbstractDocument.insertString(int offs, String str, AttributeSet a) Inserts some content into the document.voidDocument.insertString(int offset, String str, AttributeSet a) Inserts a string of content.abstract voidDocumentFilter.FilterBypass.insertString(int offset, String string, AttributeSet attr) Inserts the specified text, bypassing the DocumentFilter.voidDocumentFilter.insertString(DocumentFilter.FilterBypass fb, int offset, String string, AttributeSet attr) Invoked prior to insertion of text into the specified Document.GapContent.insertString(int where, String str) Inserts a string into the content.voidPlainDocument.insertString(int offs, String str, AttributeSet a) Inserts some content into the document.StringContent.insertString(int where, String str) Inserts a string into the content.AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.BoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.ComponentView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the coordinate space of the model to that of the view.CompositeView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.FieldView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.abstract ShapeGlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.GlyphView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.IconView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.JTextComponent.modelToView(int pos) Deprecated.replaced byJTextComponent.modelToView2D(int)PasswordView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.PlainView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.View.modelToView(int pos, Shape a) Deprecated.abstract ShapeView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping, for a given character, from the document model coordinate space to the view coordinate space.View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping, for a given region, from the document model coordinate space to the view coordinate space.JTextComponent.modelToView2D(int pos) Converts the given location in the model to a place in the view coordinate system.voidDefaultEditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.voidInserts content from the given stream, which will be treated as plain text.abstract voidEditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.abstract voidInserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.AbstractDocument.Content.remove(int where, int nitems) Removes some portion of the sequence.voidAbstractDocument.remove(int offs, int len) Removes some content from the document.voidDocument.remove(int offs, int len) Removes a portion of the content of the document.abstract voidDocumentFilter.FilterBypass.remove(int offset, int length) Removes the specified region of text, bypassing the DocumentFilter.voidDocumentFilter.remove(DocumentFilter.FilterBypass fb, int offset, int length) Invoked prior to removal of the specified region in the specified Document.GapContent.remove(int where, int nitems) Removes part of the content.StringContent.remove(int where, int nitems) Removes part of the content.voidAbstractDocument.replace(int offset, int length, String text, AttributeSet attrs) Deletes the region of text fromoffsettooffset + length, and replaces it withtext.abstract voidDocumentFilter.FilterBypass.replace(int offset, int length, String string, AttributeSet attrs) Deletes the region of text fromoffsettooffset + length, and replaces it withtext.voidDocumentFilter.replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) Invoked prior to replacing a region of text in the specified Document.protected voidWrites out text.protected abstract voidAbstractWriter.write()This abstract method needs to be implemented by subclasses.voidDefaultEditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.voidWrites content from a document to the given stream as plain text.abstract voidEditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.abstract voidWrites content from a document to the given stream in a format appropriate for this kind of content handler. -
Uses of BadLocationException in javax.swing.text.html
Methods in javax.swing.text.html that throw BadLocationExceptionModifier and TypeMethodDescriptionprotected voidWrites out comments.protected voidWrites out all empty elements (all tags that have no corresponding end tag).voidHTMLDocument.HTMLReader.flush()The last method called on the reader.voidHTMLEditorKit.ParserCallback.flush()The last method called on the reader.protected voidHTMLDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data) Inserts new elements in bulk.voidHTMLDocument.insertAfterEnd(Element elem, String htmlText) Inserts the HTML specified as a string after the end of the given element.voidHTMLDocument.insertAfterStart(Element elem, String htmlText) Inserts the HTML specified as a string at the start of the element.voidHTMLDocument.insertBeforeEnd(Element elem, String htmlText) Inserts the HTML specified as a string at the end of the element.voidHTMLDocument.insertBeforeStart(Element elem, String htmlText) Inserts the HTML specified as a string before the start of the given element.voidHTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) Inserts HTML into an existing document.ImageView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.voidInserts content from the given stream.voidHTMLDocument.setInnerHTML(Element elem, String htmlText) Replaces the children of the given element with the contents specified as an HTML string.voidHTMLDocument.setOuterHTML(Element elem, String htmlText) Replaces the given element in the parent with the contents specified as an HTML string.protected voidWrites out a start tag for the element.protected voidWrites out text.protected voidWrites out text.protected voidHTMLWriter.textAreaContent(AttributeSet attr) Writes out text that is contained in a TEXTAREA form element.voidWrite content from a document to the given stream in a format appropriate for this kind of content handler.voidHTMLWriter.write()Iterates over the Element tree and controls the writing out of all the tags and its attributes.voidMinimalHTMLWriter.write()Generates HTML output from a StyledDocument.protected voidMinimalHTMLWriter.writeBody()Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements.protected voidMinimalHTMLWriter.writeContent(Element elem, boolean needsIndenting) Writes out the attribute set in an HTML-compliant manner. -
Uses of BadLocationException in javax.swing.text.rtf
Methods in javax.swing.text.rtf that throw BadLocationExceptionModifier and TypeMethodDescriptionvoidRTFEditorKit.read(InputStream in, Document doc, int pos) Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.voidInsert content from the given stream, which will be treated as plain text.voidRTFEditorKit.write(OutputStream out, Document doc, int pos, int len) Write content from a document to the given stream in a format appropriate for this kind of content handler.voidWrite content from a document to the given stream as plain text.
getPassword.