public class SnappingDraft
extends java.lang.Object
implements android.os.Parcelable
Pages and naming metadata necessary for document creationPageFactory| Modifier and Type | Class and Description |
|---|---|
static class |
SnappingDraft.NoPageByIndexException
Thrown if page by index does not exist
|
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<SnappingDraft> |
CREATOR |
| Modifier | Constructor and Description |
|---|---|
|
SnappingDraft(Page... pages) |
protected |
SnappingDraft(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPage(int position,
Page page)
Adds page to given position
|
void |
addPage(Page page)
Adds page in the end
|
void |
deletePage(int position)
Deletes
Page at given position |
void |
deletePage(Page page)
Deletes
Page if possible |
int |
describeContents() |
java.lang.String |
getDocumentName() |
Page |
getPage(int position) |
java.util.List<Page> |
getPages() |
int |
getPosition(Page page) |
boolean |
isCombined() |
boolean |
isEmpty() |
void |
replacePage(int position,
Page page)
Replaces page at given position with new page
|
void |
setCombined(boolean isCombined) |
void |
setDocumentName(java.lang.String documentName) |
int |
size() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<SnappingDraft> CREATOR
public SnappingDraft(Page... pages)
protected SnappingDraft(android.os.Parcel in)
public void addPage(Page page)
page - public void addPage(int position,
Page page)
position - page - public void replacePage(int position,
Page page)
throws SnappingDraft.NoPageByIndexException
position - page - SnappingDraft.NoPageByIndexExceptionpublic Page getPage(int position) throws SnappingDraft.NoPageByIndexException
position - Page at given positionSnappingDraft.NoPageByIndexExceptionpublic void deletePage(int position)
throws SnappingDraft.NoPageByIndexException
Page at given positionposition - SnappingDraft.NoPageByIndexExceptionpublic void deletePage(Page page)
Page if possiblepage - Page to deletepublic int getPosition(Page page)
page - public int size()
public boolean isEmpty()
true if the holder has more than 0 pages, false otherwisepublic java.util.List<Page> getPages()
Pages snapped in the current sessionpublic java.lang.String getDocumentName()
public void setDocumentName(java.lang.String documentName)
documentName - Document name to be saved on file systempublic boolean isCombined()
true if draft should be saved as one document, false - otherwisepublic void setCombined(boolean isCombined)
isCombined - @code true} if draft should be saved as one document, false - otherwisepublic int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable