public class Document
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
swigCMemOwn |
| Constructor and Description |
|---|
Document() |
Document(Document document) |
Document(long cPtr,
boolean cMemoryOwn) |
| Modifier and Type | Method and Description |
|---|---|
Chunk |
addChunk()
Add a new empty chunk to the document.
|
void |
append(Document document,
Progress progress)
Append chunks from another document.
|
void |
clear()
Remove all chunks from the project.
|
void |
delete() |
java.lang.String |
dump()
Return document contents in XML format.
|
protected void |
finalize() |
Chunk |
getActiveChunk()
Active chunk.
|
Chunk |
getChunk(int key)
Chunk with specified key, may be null.
|
int[] |
getChunkKeys()
List of chunk keys in the document.
|
Chunk[] |
getChunks() |
static long |
getCPtr(Document obj) |
MetaData |
getMeta()
Get project meta data
|
java.lang.String |
getPath() |
boolean |
isReadOnly()
Read only status.
|
void |
load(java.lang.String text)
Initialize document contents from XML format.
|
void |
open(java.lang.String path,
boolean read_only,
Progress progress)
Open project.
|
void |
remove(Chunk chunk)
Remove chunk from the project.
|
void |
save(java.lang.String path,
int[] chunk_keys,
int compression,
boolean absolute_paths,
Progress progress)
Save project.
|
void |
setActiveChunk(Chunk chunk)
Active chunk.
|
void |
setMeta(MetaData meta)
Set project meta data.
|
void |
setReadOnly(boolean read_only)
Read only status.
|
public Document(long cPtr,
boolean cMemoryOwn)
public Document()
public Document(Document document)
public static long getCPtr(Document obj)
protected void finalize()
finalize in class java.lang.Objectpublic void delete()
public java.lang.String dump()
public void load(java.lang.String text)
public void clear()
public void save(java.lang.String path,
int[] chunk_keys,
int compression,
boolean absolute_paths,
Progress progress)
path - Path to the file.chunk_keys - List of chunks to be saved.compression - Project compression level.absolute_paths - Store absolute image paths.progress - Progress callback.public void open(java.lang.String path,
boolean read_only,
Progress progress)
path - Path to the file.read_only - Open document in read-only mode.progress - Progress callback.public java.lang.String getPath()
public void setReadOnly(boolean read_only)
public boolean isReadOnly()
public Chunk addChunk()
public Chunk[] getChunks()
public int[] getChunkKeys()
public Chunk getChunk(int key)
public Chunk getActiveChunk()
public void setActiveChunk(Chunk chunk)
public void remove(Chunk chunk)
chunk - Chunk to remove.public void append(Document document, Progress progress)
document - Document to append.public void setMeta(MetaData meta)
public MetaData getMeta()