public class LeafElement extends BaseElement
Modifier and Type | Field and Description |
---|---|
protected boolean |
bol
Does this view begin at line begining
|
protected Mark |
endMark
Mark giving end offset of this element
|
protected boolean |
eol
Does this view end at line end
|
protected Mark |
startMark
Mark giving start offset of this element
|
attrs, doc, ElementNameAttribute, parent
Constructor and Description |
---|
LeafElement(BaseDocument doc,
BaseElement parent,
AttributeSet attrs,
int startOffset,
int endOffset,
boolean bol,
boolean eol)
Create new document instance
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
Element |
getElement(int index)
Get child of this element at specified index or itself
if the index is too big
|
int |
getElementCount()
Get number of children of this element
|
int |
getElementIndex(int offset)
Gets the child element index closest to the given offset.
|
Mark |
getEndMark()
Get end mark of this element
|
int |
getEndOffset()
Get end offset of this element
|
Mark |
getStartMark()
Get start mark of this element
|
int |
getStartOffset()
Get start offset of this element
|
boolean |
isBOL()
Is this view begining at begin of line
|
boolean |
isEOL()
Is this view ending at end of line ?
|
boolean |
isLeaf()
Does this element have any children?
|
String |
toString() |
getAttributes, getDocument, getName, getParentElement
protected Mark startMark
protected Mark endMark
protected boolean bol
protected boolean eol
public LeafElement(BaseDocument doc, BaseElement parent, AttributeSet attrs, int startOffset, int endOffset, boolean bol, boolean eol)
protected void finalize() throws Throwable
public final Mark getStartMark()
getStartMark
in class BaseElement
public final int getStartOffset()
getStartOffset
in interface Element
getStartOffset
in class BaseElement
public final Mark getEndMark()
getEndMark
in class BaseElement
public final int getEndOffset()
getEndOffset
in interface Element
getEndOffset
in class BaseElement
public final boolean isBOL()
public final boolean isEOL()
public int getElementIndex(int offset)
getElementIndex
in interface Element
getElementIndex
in class BaseElement
public int getElementCount()
getElementCount
in interface Element
getElementCount
in class BaseElement
public Element getElement(int index)
getElement
in interface Element
getElement
in class BaseElement
public boolean isLeaf()
isLeaf
in interface Element
isLeaf
in class BaseElement