Search in sources :

Example 1 with PrintSpool

use of org.pentaho.di.ui.core.PrintSpool in project pentaho-kettle by pentaho.

the class Spoon method printJobFile.

private void printJobFile(JobMeta jobMeta) {
    JobGraph jobGraph = getActiveJobGraph();
    if (jobGraph == null) {
        return;
    }
    PrintSpool ps = new PrintSpool();
    Printer printer = ps.getPrinter(shell);
    // Create an image of the screen
    Point max = jobMeta.getMaximum();
    Image img = jobGraph.getJobImage(printer, max.x, max.y, 1.0f);
    ps.printImage(shell, img);
    img.dispose();
    ps.dispose();
}
Also used : JobGraph(org.pentaho.di.ui.spoon.job.JobGraph) Point(org.pentaho.di.core.gui.Point) KettleExtensionPoint(org.pentaho.di.core.extension.KettleExtensionPoint) PrintSpool(org.pentaho.di.ui.core.PrintSpool) Printer(org.eclipse.swt.printing.Printer) Image(org.eclipse.swt.graphics.Image)

Example 2 with PrintSpool

use of org.pentaho.di.ui.core.PrintSpool in project pentaho-kettle by pentaho.

the class Spoon method printTransFile.

private void printTransFile(TransMeta transMeta) {
    TransGraph transGraph = getActiveTransGraph();
    if (transGraph == null) {
        return;
    }
    PrintSpool ps = new PrintSpool();
    Printer printer = ps.getPrinter(shell);
    // Create an image of the screen
    Point max = transMeta.getMaximum();
    Image img = transGraph.getTransformationImage(printer, max.x, max.y, 1.0f);
    ps.printImage(shell, img);
    img.dispose();
    ps.dispose();
}
Also used : TransGraph(org.pentaho.di.ui.spoon.trans.TransGraph) Point(org.pentaho.di.core.gui.Point) KettleExtensionPoint(org.pentaho.di.core.extension.KettleExtensionPoint) PrintSpool(org.pentaho.di.ui.core.PrintSpool) Printer(org.eclipse.swt.printing.Printer) Image(org.eclipse.swt.graphics.Image)

Aggregations

Image (org.eclipse.swt.graphics.Image)2 Printer (org.eclipse.swt.printing.Printer)2 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)2 Point (org.pentaho.di.core.gui.Point)2 PrintSpool (org.pentaho.di.ui.core.PrintSpool)2 JobGraph (org.pentaho.di.ui.spoon.job.JobGraph)1 TransGraph (org.pentaho.di.ui.spoon.trans.TransGraph)1