|
iRex DR1000 Manager v0.5.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.andynaz.irex.dr1000.document.Document
public abstract class Document
Document on a iRex DR1000.
This class ia a model for both a PDF document or a note: it has an associated
SQLite database file, where the scribbles are stored. Scribbles can be
managed using a ScribbleMgr
; use the getScribbleMgr()
method
to retrieve on suitable for this document.
Field Summary | |
---|---|
protected File |
db
Database file. |
Constructor Summary | |
---|---|
protected |
Document(File db)
Creates a new Document with an associated database file. |
Method Summary | |
---|---|
void |
exportToPNG()
Export the scribbles to PNG files. |
void |
exportToPNG(File dir)
Export the scribbles to PNG files. |
void |
exportToPNG(String dirPath)
Export the scribbles to PNG files. |
void |
format(String outputFile)
Deprecated. only for debug purpuse; will be deleted in future release |
protected abstract String |
getDbName()
Return the file name as it is present in the database file. |
protected abstract String |
getDefaultFileName()
Return the default filename used to create the output files. |
static Document |
getDocument(File file)
Return the document suitable for 'file'. |
protected ScribbleMgr |
getScribbleMgr()
Returns an initialized ScribbleMgr . |
void |
merge()
Creates a PDF file with the scribbles. |
abstract void |
merge(File file)
Creates a PDF file with the scribbles. |
void |
merge(String outFilePath)
Creates a PDF file with the scribbles. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File db
Constructor Detail |
---|
protected Document(File db)
db
- database file
IllegalArgumentException
- if the db
file does not exists or
is not a fileMethod Detail |
---|
public static Document getDocument(File file)
file
- a file
IllegalArgumentException
- in case of unknown fileprotected ScribbleMgr getScribbleMgr()
ScribbleMgr
.
protected abstract String getDbName()
file_metadata.filename
column.
ScribbleMgr
protected abstract String getDefaultFileName()
public void merge()
default file
name
and the set color
for the strokes.
public void merge(String outFilePath)
set color
for the strokes.
outFilePath
- path to the output file/folder; if it is null
or empty, the default one
is usedpublic abstract void merge(File file)
set color
for the strokes.
file
- output filepublic void exportToPNG()
exportToPNG(File)
public void exportToPNG(String dirPath)
dirPath
- output folderexportToPNG(File)
public void exportToPNG(File dir)
For each page of scribble, the program creates a PNG file saved as
name-pg.png
, where 'name' is the name returned by the getDefaultFileName()
method and 'pg' is the page number.
dir
- output folder; if it is null
, the exportToPNG()
method will be usedpublic void format(String outputFile)
outputFile
- path to the output text file; if it is null
or empty, the default one returned by getDefaultFileName()
is
used
|
iRex DR1000 Manager v0.5.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |