java.io.Serializablepublic final class PositionBounds
extends java.lang.Object
implements java.io.Serializable
PositionRefs.| Constructor | Description |
|---|---|
PositionBounds(PositionRef begin,
PositionRef end) |
Creates new
PositionBounds. |
| Modifier and Type | Method | Description |
|---|---|---|
PositionRef |
getBegin() |
Get the starting position of this range.
|
PositionRef |
getEnd() |
Get the ending position of this range.
|
java.lang.String |
getText() |
Finds the text contained in this range.
|
PositionBounds |
insertAfter(java.lang.String text) |
Inserts the text after this PositionBounds.
|
void |
setText(java.lang.String text) |
Replaces the text contained in this range.
|
java.lang.String |
toString() |
public PositionBounds(PositionRef begin, PositionRef end)
PositionBounds.begin - the start position of the rangeend - the end position of the rangepublic PositionRef getBegin()
public PositionRef getEnd()
public void setText(java.lang.String text)
throws java.io.IOException,
javax.swing.text.BadLocationException
If you are running this from user-oriented code, you may want to wrap it in NbDocument.runAtomicAsUser(javax.swing.text.StyledDocument, java.lang.Runnable).
text - new text to insert over existing textjava.io.IOException - if any problem occurred during document loading (if that was necessary)javax.swing.text.BadLocationException - if the positions are out of the bounds of the documentpublic PositionBounds insertAfter(java.lang.String text) throws java.io.IOException, javax.swing.text.BadLocationException
text - The text to insert. The text must not be empty.java.io.IOException - if any problem occurred during document loading (if that was necessary)javax.swing.text.BadLocationException - if the positions are out of the bounds of the documentpublic java.lang.String getText()
throws javax.swing.text.BadLocationException,
java.io.IOException
java.io.IOException - if any I/O problem occurred during document loading (if that was necessary)javax.swing.text.BadLocationException - if the positions are out of the bounds of the documentpublic java.lang.String toString()
toString in class java.lang.ObjectBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.