public class LayoutEnumerator
extends java.lang.Object
LayoutCollector.getEntity(com.aspose.words.Node) and getCurrent() / setCurrent(java.lang.Object) move to the entity which corresponds to a document node.
To learn more, visit the Converting to Fixed-page Format documentation article.
| Constructor and Description |
|---|
LayoutEnumerator(Document document)
Initializes new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.String key)
Gets a named property of the entity.
|
java.lang.Object |
getCurrent()
Gets current position in the page layout model.
|
Document |
getDocument()
Gets document this instance enumerates.
|
java.lang.String |
getKind()
Gets the kind of the current entity.
|
int |
getPageIndex()
Gets the 1-based index of a page which contains the current entity.
|
java.awt.geom.Rectangle2D.Float |
getRectangle()
Returns the bounding rectangle of the current entity relative to the page top left corner (in points).
|
java.lang.String |
getText()
Gets text of the current span entity.
|
int |
getType()
Gets the type of the current entity.
|
boolean |
moveFirstChild()
Moves to the first child entity.
|
boolean |
moveLastChild()
Moves to the last child entity.
|
boolean |
moveNext()
Moves to the next sibling entity in visual order.
|
boolean |
moveNextLogical()
Moves to the next sibling entity in a logical order.
|
boolean |
moveParent()
Moves to the parent entity.
|
boolean |
moveParent(int types) |
boolean |
movePrevious()
Moves to the previous sibling entity.
|
boolean |
movePreviousLogical()
Moves to the previous sibling entity in a logical order.
|
void |
reset()
Moves the enumerator to the first page of the document.
|
void |
setCurrent(java.lang.Object value)
Sets current position in the page layout model.
|
public LayoutEnumerator(Document document) throws java.lang.Exception
document - A document whose page layout model to enumerate.java.lang.Exceptionpublic void reset()
throws java.lang.Exception
java.lang.Exceptionpublic boolean moveNext()
throws java.lang.Exception
java.lang.Exceptionpublic boolean moveNextLogical()
LayoutEntityType.SPAN entities are linked together thus if getCurrent() / setCurrent(java.lang.Object) entity is span repeated calling of this method will iterates complete story of the document.public boolean movePrevious()
throws java.lang.Exception
java.lang.Exceptionpublic boolean movePreviousLogical()
LayoutEntityType.SPAN entities are linked together thus if getCurrent() / setCurrent(java.lang.Object) entity is span repeated calling of this method will iterates complete story of the document.public boolean moveFirstChild()
throws java.lang.Exception
java.lang.Exceptionpublic boolean moveLastChild()
throws java.lang.Exception
java.lang.Exceptionpublic boolean moveParent()
public boolean moveParent(int types)
public int getType()
LayoutEntityType constants.public java.awt.geom.Rectangle2D.Float getRectangle()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getKind()
throws java.lang.Exception
LayoutEntityType.SPAN type and may have either a BOOKMARKSTART or BOOKMARKEND kind.java.lang.Exceptionpublic java.lang.String getText()
throws java.lang.Exception
java.lang.Exceptionpublic int getPageIndex()
public java.lang.Object getCurrent()
public void setCurrent(java.lang.Object value)
throws java.lang.Exception
value - Current position in the page layout model.java.lang.Exceptionpublic Document getDocument()
public java.lang.Object get(java.lang.String key)
key - A name of the property (case-sensitive).