use of org.eevolution.form.IPrintDocument in project adempiere by adempiere.
the class GenerateMovement method printDocument.
// generate
/**
* Print Document
*
* @param document
* @param printFormantName
*/
public static void printDocument(PO document, String printFormantName, int windowNo) {
IPrintDocument IPrintDocument;
// OK to print shipments
if (Ini.isClient())
IPrintDocument = getPrintDocument("org.eevolution.form.VPrintDocument");
else
IPrintDocument = getPrintDocument("org.eevolution.form.WPrintDocument");
IPrintDocument.print(document, printFormantName, windowNo);
}
use of org.eevolution.form.IPrintDocument in project adempiere by adempiere.
the class GenerateMovement method getPrintDocument.
public static IPrintDocument getPrintDocument(String className) throws RuntimeException {
Class<?> clazz;
IPrintDocument result = null;
try {
clazz = Class.forName(className);
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor();
result = (IPrintDocument) constructor.newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
return result;
}
use of org.eevolution.form.IPrintDocument in project adempiere by adempiere.
the class GenerateMovementMaterial method getPrintDocument.
public IPrintDocument getPrintDocument(String className) throws RuntimeException {
Class<?> clazz;
IPrintDocument result = null;
try {
clazz = Class.forName(className);
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor();
result = (IPrintDocument) constructor.newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
return result;
}
use of org.eevolution.form.IPrintDocument in project adempiere by adempiere.
the class GenerateMovementMaterial method printDocument.
/**
* Print Document
*
* @param document
* @param printFormantName
*/
private void printDocument(PO document, String printFormantName) {
// Switch Tabs
StringBuffer resultText = new StringBuffer(Msg.translate(Env.getCtx(), "DocumentNo") + " : " + document.get_ValueAsString("DocumentNo"));
result = resultText.toString();
IPrintDocument IPrintDocument;
// OK to print shipments
if (Ini.isClient())
IPrintDocument = getPrintDocument("org.eevolution.form.VPrintDocument");
else
IPrintDocument = getPrintDocument("org.eevolution.form.WPrintDocument");
IPrintDocument.print(document, printFormantName, getProcessInfo().getWindowNo());
}
Aggregations