|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.stefanochizzolini.clown.documents.contents.ContentScanner
public final class ContentScanner
Content objects scanner.
It wraps the content objects collection (Contents
) to scan its graphics state
through a forward cursor.
Scanning is performed at an arbitrary depth, according to the content objects nesting:
each depth level corresponds to a scan level so that at any time it's possible
to seamlessly navigate across the levels (see getParentLevel()
,
getChildLevel()
)
Nested Class Summary | |
---|---|
static class |
ContentScanner.GraphicsObjectWrapper<TDataObject extends ContentObject>
Object information. |
static class |
ContentScanner.GraphicsState
Graphics state [PDF:1.6:4.3]. |
static class |
ContentScanner.InlineImageWrapper
Inline image information. |
static class |
ContentScanner.TextStringWrapper
Text string information. |
static class |
ContentScanner.TextWrapper
Text information. |
static class |
ContentScanner.XObjectWrapper
External object information. |
Constructor Summary | |
---|---|
ContentScanner(Contents contents)
|
|
ContentScanner(IContentContext contentContext)
|
Method Summary | |
---|---|
ContentScanner |
getChildLevel()
Gets the current child scan level. |
IContentContext |
getContentContext()
Gets the content context associated to the content objects collection. |
Contents |
getContents()
Gets the content objects collection this scanner is inspecting. |
ContentObject |
getCurrent()
Gets the current content object. |
ContentScanner.GraphicsObjectWrapper |
getCurrentWrapper()
Gets the current content object's information. |
int |
getIndex()
Gets the current position. |
CompositeObject |
getParent()
Gets the current parent object. |
ContentScanner |
getParentLevel()
Gets the parent scan level. |
ContentScanner.GraphicsState |
getState()
Gets the current graphics state applied to the current content object. |
void |
insert(Collection<? extends ContentObject> objects)
Inserts content objects at the current position. |
void |
insert(ContentObject object)
Inserts a content object at the current position. |
boolean |
move(int index)
Moves to the object at the given position. |
void |
moveEnd()
Moves after the last object. |
boolean |
moveFirst()
Moves to the first object. |
boolean |
moveLast()
Moves to the last object. |
boolean |
moveNext()
Moves to the next object. |
void |
moveStart()
Moves before the first object. |
ContentObject |
remove()
Removes the content object at the current position. |
ContentObject |
setCurrent(ContentObject value)
Replaces the content object at the current position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentScanner(Contents contents)
contents
- Content objects collection to scan.public ContentScanner(IContentContext contentContext)
contentContext
- Content context containing the content objects collection to scan.Method Detail |
---|
public ContentScanner getChildLevel()
getParentLevel()
public IContentContext getContentContext()
public Contents getContents()
public ContentObject getCurrent()
getIndex()
,
getParent()
public ContentScanner.GraphicsObjectWrapper getCurrentWrapper()
getCurrent()
public int getIndex()
getCurrent()
public CompositeObject getParent()
getCurrent()
public ContentScanner getParentLevel()
getChildLevel()
public ContentScanner.GraphicsState getState()
The returned object of this method is fundamental for any content manipulation as it represents the actual constraints that affect the current content object rendering.
public void insert(ContentObject object)
public void insert(Collection<? extends ContentObject> objects)
After insertion complete, lastly-inserted content object is at the current position.
public boolean move(int index)
index
- New position.
public void moveEnd()
public boolean moveFirst()
public boolean moveLast()
public boolean moveNext()
public void moveStart()
public ContentObject remove()
public ContentObject setCurrent(ContentObject value)
|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |