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(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.
|
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(StyledDocument doc)
doc
- document to work onpublic List<? extends Line> getLines()
Line.Set
public Line getOriginal(int line) throws IndexOutOfBoundsException
Line.Set
getOriginal
in class Line.Set
line
- number of the line (starting at 0)IndexOutOfBoundsException
- if line
is an invalid index for the original set of linespublic int getOriginalLineNumber(Line line)
Line.Set
getOriginalLineNumber
in class Line.Set
line
- the line to look forpublic Line getCurrent(int line) throws IndexOutOfBoundsException
Line.Set
getCurrent
in class Line.Set
line
- number of the line in current state of the document (starting at 0)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.