public abstract static class DocumentLine.Set extends Line.Set
Line.Set.
Defines
ways to obtain a line set for documents following
NetBeans conventions.| Constructor | Description |
|---|---|
Set(javax.swing.text.StyledDocument doc) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract Line |
createLine(int offset) |
Creates a
Line for a given offset. |
Line |
getCurrent(int line) |
Find line object representing the line in current document.
|
java.util.List<? extends Line> |
getLines() |
Returns a set of line objects sorted by their
line numbers.
|
Line |
getOriginal(int line) |
Find line object in the line set corresponding to original line number.
|
int |
getOriginalLineNumber(Line line) |
Finds an original line number for given line in this line set.
|
public Set(javax.swing.text.StyledDocument doc)
doc - document to work onpublic java.util.List<? extends Line> getLines()
Line.Setpublic Line getOriginal(int line) throws java.lang.IndexOutOfBoundsException
Line.SetgetOriginal in class Line.Setline - number of the line (starting at 0)java.lang.IndexOutOfBoundsException - if line is an invalid index for the original set of linespublic int getOriginalLineNumber(Line line)
Line.SetgetOriginalLineNumber in class Line.Setline - the line to look forpublic Line getCurrent(int line) throws java.lang.IndexOutOfBoundsException
Line.SetgetCurrent in class Line.Setline - number of the line in current state of the document (starting at 0)java.lang.IndexOutOfBoundsException - if line is an invalid index for the original set of linesBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.