If you think the Android project RadaeePDF-B4A listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.rootsoft.rspdfviewer.pdf;
//fromwww.java2s.comimport anywheresoftware.b4a.AbsObjectWrapper;
import anywheresoftware.b4a.BA.ShortName;
import com.radaee.pdf.BMDatabase;
@ShortName("PDFBMDatabase")
publicclass RSPDFBMDatabase extends AbsObjectWrapper<BMDatabase> {
// Attributes
// Constructors - Initialization
/**
* Initializes the BookMark database.
*/publicvoid Initialize() {
setObject(new BMDatabase());
}
/**
* Open exist database file or create it if not exist. (Database for
* BookMark)
*
* @param db_path
* @return
*/publicboolean OpenOrCreate(String db_path) {
return getObject().OpenOrCreate(db_path);
}
/**
* close database
*/publicvoid Close() {
getObject().Close();
}
/**
* Get a RecordSet handle, by input PDF file path
*
* @param look_path
* PDF path to lookup.
* @return handle value of RecordSet.
*/publicint RecOpen(String look_path) {
return getObject().RecOpen(look_path);
}
/**
* Close a RecordSet handle
*
* @param rec
* handle value of RecordSet. obtained by RecOpen
*/publicvoid RecClose(int rec) {
getObject().RecClose(rec);
}
/**
* Get items count of RecordSet.
*
* @param rec
* RecordSet Handle, obtained by RecOpen
* @return records count
*/publicint RecGetCount(int rec) {
return getObject().RecGetCount(rec);
}
/**
* Get item name by index.
*
* @param rec
* RecordSet Handle that returned by RecOpen
* @param index
* 0 based index value, range:[0, RecGetCount()-1]
* @return name of item.
*/public String RecItemGetName(int rec, int index) {
return getObject().RecItemGetName(rec, index);
}
/**
* Get page no by index.
*
* @param rec
* RecordSet Handle that returned by RecOpen
* @param index
* 0 based index value, range:[0, RecGetCount()-1]
* @return 0 based page NO.
*/publicint RecItemGetPage(int rec, int index) {
return getObject().RecItemGetPage(rec, index);
}
/**
* remove item by index.
*
* @param rec
* RecordSet Handle that returned by RecOpen
* @param index
* 0 based index value, range:[0, RecGetCount()-1]
* @return true or false.
*/publicboolean RecItemRemove(int rec, int index) {
return getObject().RecItemRemove(rec, index);
}
/**
* insert item.
*
* @param rec
* RecordSet Handle that returned by RecOpen
* @param name
* label of BookMark.
* @param pageno
* 0 based page no recorded.
* @return true or false
*/publicboolean RecItemInsert(int rec, String name, int pageno) {
return getObject().RecItemInsert(rec, name, pageno);
}
}