Search in sources :

Example 1 with SwtScrollBar

use of org.pentaho.di.ui.spoon.SwtScrollBar in project pentaho-kettle by pentaho.

the class TransGraph method getTransformationImage.

public Image getTransformationImage(Device device, int x, int y, float magnificationFactor) {
    GCInterface gc = new SWTGC(device, new Point(x, y), iconsize);
    int gridSize = PropsUI.getInstance().isShowCanvasGridEnabled() ? PropsUI.getInstance().getCanvasGridSize() : 1;
    TransPainter transPainter = new TransPainter(gc, transMeta, new Point(x, y), new SwtScrollBar(hori), new SwtScrollBar(vert), candidate, drop_candidate, selectionRegion, areaOwners, mouseOverSteps, PropsUI.getInstance().getIconSize(), PropsUI.getInstance().getLineWidth(), gridSize, PropsUI.getInstance().getShadowSize(), PropsUI.getInstance().isAntiAliasingEnabled(), PropsUI.getInstance().getNoteFont().getName(), PropsUI.getInstance().getNoteFont().getHeight(), trans, PropsUI.getInstance().isIndicateSlowTransStepsEnabled());
    transPainter.setMagnification(magnificationFactor);
    transPainter.setStepLogMap(stepLogMap);
    transPainter.setStartHopStep(startHopStep);
    transPainter.setEndHopLocation(endHopLocation);
    transPainter.setNoInputStep(noInputStep);
    transPainter.setEndHopStep(endHopStep);
    transPainter.setCandidateHopType(candidateHopType);
    transPainter.setStartErrorHopStep(startErrorHopStep);
    transPainter.setShowTargetStreamsStep(showTargetStreamsStep);
    transPainter.buildTransformationImage();
    Image img = (Image) gc.getImage();
    gc.dispose();
    return img;
}
Also used : GCInterface(org.pentaho.di.core.gui.GCInterface) SwtScrollBar(org.pentaho.di.ui.spoon.SwtScrollBar) SWTGC(org.pentaho.di.ui.spoon.SWTGC) Point(org.pentaho.di.core.gui.Point) KettleExtensionPoint(org.pentaho.di.core.extension.KettleExtensionPoint) TransPainter(org.pentaho.di.trans.TransPainter) SwtUniversalImage(org.pentaho.di.core.SwtUniversalImage) Image(org.eclipse.swt.graphics.Image) Point(org.pentaho.di.core.gui.Point) KettleExtensionPoint(org.pentaho.di.core.extension.KettleExtensionPoint)

Example 2 with SwtScrollBar

use of org.pentaho.di.ui.spoon.SwtScrollBar in project pentaho-kettle by pentaho.

the class JobGraph method getJobImage.

public Image getJobImage(Device device, int x, int y, float magnificationFactor) {
    GCInterface gc = new SWTGC(device, new Point(x, y), iconsize);
    int gridSize = PropsUI.getInstance().isShowCanvasGridEnabled() ? PropsUI.getInstance().getCanvasGridSize() : 1;
    JobPainter jobPainter = new JobPainter(gc, jobMeta, new Point(x, y), new SwtScrollBar(hori), new SwtScrollBar(vert), hop_candidate, drop_candidate, selectionRegion, areaOwners, mouseOverEntries, PropsUI.getInstance().getIconSize(), PropsUI.getInstance().getLineWidth(), gridSize, PropsUI.getInstance().getShadowSize(), PropsUI.getInstance().isAntiAliasingEnabled(), PropsUI.getInstance().getNoteFont().getName(), PropsUI.getInstance().getNoteFont().getHeight());
    jobPainter.setMagnification(magnificationFactor);
    jobPainter.setEntryLogMap(entryLogMap);
    jobPainter.setStartHopEntry(startHopEntry);
    jobPainter.setEndHopLocation(endHopLocation);
    jobPainter.setEndHopEntry(endHopEntry);
    jobPainter.setNoInputEntry(noInputEntry);
    if (job != null) {
        jobPainter.setJobEntryResults(job.getJobEntryResults());
    } else {
        jobPainter.setJobEntryResults(new ArrayList<JobEntryResult>());
    }
    List<JobEntryCopy> activeJobEntries = new ArrayList<>();
    if (job != null) {
        if (job.getActiveJobEntryJobs().size() > 0) {
            activeJobEntries.addAll(job.getActiveJobEntryJobs().keySet());
        }
        if (job.getActiveJobEntryTransformations().size() > 0) {
            activeJobEntries.addAll(job.getActiveJobEntryTransformations().keySet());
        }
    }
    jobPainter.setActiveJobEntries(activeJobEntries);
    jobPainter.drawJob();
    return (Image) gc.getImage();
}
Also used : GCInterface(org.pentaho.di.core.gui.GCInterface) SwtScrollBar(org.pentaho.di.ui.spoon.SwtScrollBar) JobEntryCopy(org.pentaho.di.job.entry.JobEntryCopy) JobPainter(org.pentaho.di.job.JobPainter) SWTGC(org.pentaho.di.ui.spoon.SWTGC) ArrayList(java.util.ArrayList) Point(org.pentaho.di.core.gui.Point) KettleExtensionPoint(org.pentaho.di.core.extension.KettleExtensionPoint) Image(org.eclipse.swt.graphics.Image) Point(org.pentaho.di.core.gui.Point) KettleExtensionPoint(org.pentaho.di.core.extension.KettleExtensionPoint) JobEntryResult(org.pentaho.di.job.JobEntryResult)

Aggregations

Image (org.eclipse.swt.graphics.Image)2 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)2 GCInterface (org.pentaho.di.core.gui.GCInterface)2 Point (org.pentaho.di.core.gui.Point)2 SWTGC (org.pentaho.di.ui.spoon.SWTGC)2 SwtScrollBar (org.pentaho.di.ui.spoon.SwtScrollBar)2 ArrayList (java.util.ArrayList)1 SwtUniversalImage (org.pentaho.di.core.SwtUniversalImage)1 JobEntryResult (org.pentaho.di.job.JobEntryResult)1 JobPainter (org.pentaho.di.job.JobPainter)1 JobEntryCopy (org.pentaho.di.job.entry.JobEntryCopy)1 TransPainter (org.pentaho.di.trans.TransPainter)1