クラス
javax.swing.text.BadLocationExceptionの使用
BadLocationExceptionを使用するパッケージ
パッケージ
説明
すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。
1つのインタフェースおよび多くのabstractクラスを提供しており、Swingはプラグイン可能なLook & Feel機能を提供するためにこれらを利用します。
基本Look & Feelに従って構築されたユーザー・インタフェース・オブジェクトを提供します。
複数のLook & Feelを結合するユーザー・インタフェース・オブジェクトを提供します。
編集可能なテキスト・コンポーネントと編集不能なテキスト・コンポーネントを処理するクラスとインタフェースを提供します。
HTMLテキスト・エディタを作成するためのクラス
HTMLEditorKitとサポート・クラスを提供します。Rich-Text-Formatテキスト・エディタを作成するためのクラス(
RTFEditorKit)を提供します。-
javax.swingでのBadLocationExceptionの使用
BadLocationExceptionをスローするjavax.swingのメソッド修飾子と型メソッド説明intJTextArea.getLineEndOffset(int line) 指定された行の終了オフセットを返します。intJTextArea.getLineOfOffset(int offset) コンポーネント・テキストのオフセットを行番号に変換します。intJTextArea.getLineStartOffset(int line) 指定された行の開始オフセットを返します。JPasswordField.getText(int offs, int len) 非推奨。 -
javax.swing.plafでのBadLocationExceptionの使用
BadLocationExceptionをスローするjavax.swing.plafのメソッド修飾子と型メソッド説明abstract intTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) キャレットが配置される可能性のある、視覚的に表された次のモデル位置を決定する手段を提供します。abstract RectangleTextUI.modelToView(JTextComponent t, int pos) 非推奨。abstract RectangleTextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) 非推奨。TextUI.modelToView2D(JTextComponent t, int pos, Position.Bias bias) モデル内の指定された位置を、ビュー座標体系内の場所に変換します。 -
javax.swing.plaf.basicでのBadLocationExceptionの使用
BadLocationExceptionをスローするjavax.swing.plaf.basicのメソッド修飾子と型メソッド説明intBasicTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) キャレットが配置される可能性のある、視覚的に表された次のモデル位置を決定する手段を提供します。BasicTextUI.modelToView(JTextComponent tc, int pos) 非推奨。BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias) 非推奨。 -
javax.swing.plaf.multiでのBadLocationExceptionの使用
BadLocationExceptionをスローするjavax.swing.plaf.multiのメソッド修飾子と型メソッド説明intMultiTextUI.getNextVisualPositionFrom(JTextComponent a, int b, Position.Bias c, int d, Position.Bias[] e) このオブジェクトで処理されている各UIでgetNextVisualPositionFromメソッドを呼び出します。MultiTextUI.modelToView(JTextComponent a, int b) 非推奨。MultiTextUI.modelToView(JTextComponent a, int b, Position.Bias c) 非推奨。 -
javax.swing.textでのBadLocationExceptionの使用
BadLocationExceptionをスローするjavax.swing.textのメソッド修飾子と型メソッド説明DefaultHighlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) ビューにハイライトを追加します。Highlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) ビューにハイライトを追加します。voidDefaultHighlighter.changeHighlight(Object tag, int p0, int p1) ハイライトを変更します。voidHighlighter.changeHighlight(Object tag, int p0, int p1) 指定されたハイライトを、ドキュメントの異なる部分を占めるように変更します。AbstractDocument.Content.createPosition(int offset) コンテンツが変更されたときに変更を追跡するコンテンツ内の位置を作成します。AbstractDocument.createPosition(int offs) ドキュメントが変更されたときに、変更を追跡する位置を返します。Document.createPosition(int offs) このメソッドを使用すると文字コンテンツのシーケンスの位置にマークが付けられます。GapContent.createPosition(int offset) コンテンツが変更されたときに変更を追跡するコンテンツ内の位置を作成します。StringContent.createPosition(int offset) コンテンツが変更されたときに変更を追跡するコンテンツ内の位置を作成します。protected intPasswordView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) protected floatPlainView.drawSelectedText(Graphics2D g, float x, float y, int p0, int p1) モデル内の指定された範囲を、選択されたテキストとしてレンダリングします。protected intPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) protected floatWrappedPlainView.drawSelectedText(Graphics2D g, float x, float y, int p0, int p1) モデル内の指定された範囲を、選択されたテキストとしてレンダリングします。protected intWrappedPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) protected intPasswordView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) protected floatPlainView.drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) モデル内の指定された範囲を通常の選択されていないテキストとしてレンダリングします。protected intPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) protected floatWrappedPlainView.drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) モデル内の指定された範囲を通常の選択されていないテキストとしてレンダリングします。protected intWrappedPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) void文字のシーケンスを取得して、セグメントにコピーします。voidコンテンツの一部を取り出します。voidコンテンツの一部を取り出します。protected intParagraphView.getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) xにもっとも近接したモデル内の位置を返します。protected intCompositeView.getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) カーソルを置くことのできる、次の視覚的な位置を返します。方向は右(east)または左(west)になります。protected intCompositeView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) カーソルを置くことのできる、次の視覚的な位置を返します。方向は上(north)または下(south)になります。protected intParagraphView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) カーソルを置くことのできる、次の視覚的な位置を返します。方向は右(east)または左(west)になります。intAsyncBoxView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) キャレットが配置される可能性のある、視覚的に表された次のモデル位置を決定する手段を提供します。intCompositeView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) キャレットが配置される可能性のある、視覚的に表された次のモデル位置を決定する手段を提供します。intGlyphView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) キャレットが配置される可能性のある、視覚的に表された次のモデル位置を決定する手段を提供します。intGlyphView.GlyphPainter.getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) キャレットが配置される可能性のある、視覚的に表された次のモデル位置を決定する手段を提供します。intNavigationFilter.getNextVisualPositionFrom(JTextComponent text, int pos, Position.Bias bias, int direction, Position.Bias[] biasRet) 既存の位置からキャレットを置くことのできる、次の可視位置を返します。intView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) キャレットが配置される可能性のある、視覚的に表された次のモデル位置を決定する手段を提供します。static final intUtilities.getNextWord(JTextComponent c, int offs) 指定された位置の次の語の開始位置を決定します。static final intUtilities.getPositionAbove(JTextComponent c, int offs, float x) 上の行で指定されたビュー位置にもっとも近いモデル内の位置を決定します。static final intUtilities.getPositionAbove(JTextComponent c, int offs, int x) 非推奨。static final intUtilities.getPositionBelow(JTextComponent c, int offs, float x) 下の行で指定されたビュー位置にもっとも近いモデル内の位置を決定します。static final intUtilities.getPositionBelow(JTextComponent c, int offs, int x) 非推奨。static final intUtilities.getPreviousWord(JTextComponent c, int offs) 指定された位置の直前の語の開始位置を指定します。static final intUtilities.getRowEnd(JTextComponent c, int offs) 指定されたモデル位置を含む行の、終了行モデル位置を指定します。static final intUtilities.getRowStart(JTextComponent c, int offs) 指定されたモデル位置を含む行の、開始行モデル位置を指定します。AbstractDocument.Content.getString(int where, int len) シーケンスに含まれる文字列を返します。GapContent.getString(int where, int len) コンテンツの一部を取り出します。StringContent.getString(int where, int len) コンテンツの一部を取り出します。AbstractDocument.getText(int offset, int length) ドキュメントからテキストのシーケンスを取得します。voidドキュメントの指定部分内にあるテキストを取得します。protected String要素に関連したテキストを返します。Document.getText(int offset, int length) ドキュメントの指定部分内にあるテキストを取得します。voidドキュメントの指定部分内にあるテキストを取得します。JTextComponent.getText(int offs, int len) コンポーネントが表すテキストの一部を取り出します。static final intUtilities.getWordEnd(JTextComponent c, int offs) 指定された位置の語の終了位置を決定します。static final intUtilities.getWordStart(JTextComponent c, int offs) 指定されたモデル位置の語の開始位置を決定します。protected voidDefaultStyledDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data) 新しい要素を一括して挿入します。AbstractDocument.Content.insertString(int where, String str) シーケンスに文字列を挿入します。voidAbstractDocument.insertString(int offs, String str, AttributeSet a) ドキュメントに内容を挿入します。voidDocument.insertString(int offset, String str, AttributeSet a) コンテンツの文字列を挿入します。abstract voidDocumentFilter.FilterBypass.insertString(int offset, String string, AttributeSet attr) DocumentFilterをバイパスして、指定テキストを挿入します。voidDocumentFilter.insertString(DocumentFilter.FilterBypass fb, int offset, String string, AttributeSet attr) 指定したDocumentにテキストを挿入する前に呼び出されます。GapContent.insertString(int where, String str) コンテンツに文字列を挿入します。voidPlainDocument.insertString(int offs, String str, AttributeSet a) ドキュメントに内容を挿入します。StringContent.insertString(int where, String str) コンテンツに文字列を挿入します。AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。BoxView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。ComponentView.modelToView(int pos, Shape a, Position.Bias b) モデルの座標空間から、ビューの座標空間へのマッピングを提供します。CompositeView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。FieldView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。abstract ShapeGlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。GlyphView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。IconView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。JTextComponent.modelToView(int pos) 非推奨。JTextComponent.modelToView2D(int)に置き換えられましたPasswordView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。PlainView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。View.modelToView(int pos, Shape a) 非推奨。abstract ShapeView.modelToView(int pos, Shape a, Position.Bias b) 指定した文字について、ドキュメント・モデル座標空間からビュー座標空間へのマッピングを提供します。View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) 指定した範囲について、ドキュメント・モデル座標空間からビュー座標空間へのマッピングを提供します。JTextComponent.modelToView2D(int pos) モデル内の指定された位置を、ビュー座標体系内の場所に変換します。voidDefaultEditorKit.read(InputStream in, Document doc, int pos) このタイプのコンテンツ・ハンドラに適した形式であると予想されるコンテンツを、指定したストリームから挿入します。void指定されたストリームから内容を挿入します。内容はプレーン・テキストとして扱われます。abstract voidEditorKit.read(InputStream in, Document doc, int pos) このタイプのコンテンツ・ハンドラに適した形式であると予想されるコンテンツを、指定したストリームから挿入します。abstract voidこのタイプのコンテンツ・ハンドラに適した形式であると予想されるコンテンツを、指定したストリームから挿入します。AbstractDocument.Content.remove(int where, int nitems) シーケンスの一部を削除します。voidAbstractDocument.remove(int offs, int len) ドキュメントから内容を削除します。voidDocument.remove(int offs, int len) ドキュメントのコンテンツの一部を削除します。abstract voidDocumentFilter.FilterBypass.remove(int offset, int length) DocumentFilterをバイパスして、テキストの指定領域を削除します。voidDocumentFilter.remove(DocumentFilter.FilterBypass fb, int offset, int length) 指定したDocumentの指定した範囲を削除する前に呼び出されます。GapContent.remove(int where, int nitems) コンテンツの一部を削除します。StringContent.remove(int where, int nitems) コンテンツの一部を削除します。voidAbstractDocument.replace(int offset, int length, String text, AttributeSet attrs) offsetからoffset+lengthまでのテキスト領域を削除し、textに置き換えます。abstract voidDocumentFilter.FilterBypass.replace(int offset, int length, String string, AttributeSet attrs) offsetからoffset+lengthまでのテキスト領域を削除し、textに置き換えます。voidDocumentFilter.replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) 指定したDocumentでテキストの範囲を置き換える前に呼び出されます。protected voidテキストを書き出します。protected abstract voidAbstractWriter.write()この抽象メソッドは、サブクラスによって実装される必要があります。voidDefaultEditorKit.write(OutputStream out, Document doc, int pos, int len) このタイプのコンテンツ・ハンドラに適した形式で、ドキュメントからストリームへコンテンツを書き込みます。voidドキュメントのコンテンツを、指定されたストリームにプレーン・テキストとして書き込みます。abstract voidEditorKit.write(OutputStream out, Document doc, int pos, int len) このタイプのコンテンツ・ハンドラに適した形式で、ドキュメントからストリームへコンテンツを書き込みます。abstract voidこのタイプのコンテンツ・ハンドラに適した形式で、ドキュメントからストリームへコンテンツを書き込みます。 -
javax.swing.text.htmlでのBadLocationExceptionの使用
BadLocationExceptionをスローするjavax.swing.text.htmlのメソッド修飾子と型メソッド説明protected voidコメントを書き出します。protected voidすべての空要素(対応する終了タグのないタグすべて)を書き出します。voidHTMLDocument.HTMLReader.flush()HTMLリーダーで呼び出される最後のメソッドです。voidHTMLEditorKit.ParserCallback.flush()HTMLリーダーで呼び出される最後のメソッドです。protected voidHTMLDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data) 新しい要素を一括して挿入します。voidHTMLDocument.insertAfterEnd(Element elem, String htmlText) 指定された要素の末尾の後に、文字列として指定されたHTMLを挿入します。voidHTMLDocument.insertAfterStart(Element elem, String htmlText) 要素の開始位置に文字列として指定されたHTMLを挿入します。voidHTMLDocument.insertBeforeEnd(Element elem, String htmlText) 要素の終了位置に文字列として指定されたHTMLを挿入します。voidHTMLDocument.insertBeforeStart(Element elem, String htmlText) 指定された要素が開始される前に文字列として指定されたHTMLを挿入します。voidHTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) 既存のドキュメントにHTMLを挿入します。ImageView.modelToView(int pos, Shape a, Position.Bias b) ドキュメント・モデルの座標空間からビューの座標空間へのマッピングを提供します。void指定されたストリームからコンテンツを挿入します。voidHTMLDocument.setInnerHTML(Element elem, String htmlText) 指定された要素の子をHTML文字列として指定されたコンテンツと置き換えます。voidHTMLDocument.setOuterHTML(Element elem, String htmlText) 指定された親の要素をHTML文字列として指定されたコンテンツと置き換えます。protected void要素の開始タグを書き出します。protected voidテキストを書き出します。protected voidテキストを書き出します。protected voidHTMLWriter.textAreaContent(AttributeSet attr) フォーム要素のTEXTAREAに格納されているテキストを書き出します。voidこのタイプのコンテンツ・ハンドラに適した形式で、ドキュメントからストリームへコンテンツを書き込みます。voidHTMLWriter.write()要素ツリーで反復され、すべてのタグとその属性の書込みを制御します。voidMinimalHTMLWriter.write()StyledDocumentからHTML出力を生成します。protected voidMinimalHTMLWriter.writeBody()ドキュメント内の要素で反復し、枝の要素か葉の要素かを判断して要素を処理します。protected voidMinimalHTMLWriter.writeContent(Element elem, boolean needsIndenting) HTMLに準拠した方法で属性セットを書き出します。 -
javax.swing.text.rtfでのBadLocationExceptionの使用
BadLocationExceptionをスローするjavax.swing.text.rtfのメソッド修飾子と型メソッド説明voidRTFEditorKit.read(InputStream in, Document doc, int pos) このタイプのコンテンツ・ハンドラに適した形式であると予想されるコンテンツを、指定したストリームから挿入します。void指定されたストリームから内容を挿入します。内容はプレーン・テキストとして扱われます。voidRTFEditorKit.write(OutputStream out, Document doc, int pos, int len) このタイプのコンテンツ・ハンドラに適した形式で、ドキュメントからストリームへコンテンツを書き込みます。voidドキュメントのコンテンツを、指定されたストリームにプレーン・テキストとして書き込みます。
getPasswordに置き換えられました。