public class FormulaRootElement extends FormulaElement
Constructor and Description |
---|
FormulaRootElement(FormulaDocument document) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Element |
getElement(int index)
Fetches the child element at the given index.
|
int |
getElementCount()
Gets the number of child elements contained by this element.
|
int |
getElementIndex(int offset)
Gets the child element index closest to the given offset.
|
String |
getName()
Fetches the name of the element.
|
String |
getText() |
void |
insert(FormulaElement oldElement,
FormulaTextElement formulaTextElement) |
void |
insertElement(int index,
FormulaElement element) |
boolean |
isLeaf()
Is this element a leaf element? An element that may have children, even if it currently has no children,
would return
false . |
void |
print() |
void |
removeElement(int index) |
void |
replace(FormulaElement oldElement,
FormulaTextElement formulaTextElement,
boolean hasDummyParams) |
void |
revalidateNodePositions() |
void |
revalidateStructure() |
void |
setElement(int index,
FormulaElement element) |
void |
setElements(FormulaElement[] elements) |
getAttributes, getDocument, getEndOffset, getParentElement, getStartOffset, setEndOffset, setStartOffset
public FormulaRootElement(FormulaDocument document)
public String getText()
getText
in class FormulaElement
public int getElementIndex(int offset)
-1
if the Element
is a leaf, otherwise returns the index of the
Element
that best represents the given location. Returns 0
if the location is less than
the start offset. Returns getElementCount() - 1
if the location is greater than or equal to the end
offset.getElementIndex
in interface Element
getElementIndex
in class FormulaElement
offset
- the specified offset >= 0public int getElementCount()
getElementCount
in interface Element
getElementCount
in class FormulaElement
public Element getElement(int index)
getElement
in interface Element
getElement
in class FormulaElement
index
- the specified index >= 0public boolean isLeaf()
false
.isLeaf
in interface Element
isLeaf
in class FormulaElement
public String getName()
public void setElements(FormulaElement[] elements)
public void setElement(int index, FormulaElement element)
public void insertElement(int index, FormulaElement element)
public void removeElement(int index)
public void revalidateStructure()
public void revalidateNodePositions()
public void print()
public void clear()
public void replace(FormulaElement oldElement, FormulaTextElement formulaTextElement, boolean hasDummyParams)
public void insert(FormulaElement oldElement, FormulaTextElement formulaTextElement)
Copyright © 2019 Hitachi Vantara. All rights reserved.