use of org.pentaho.di.ui.spoon.trans.TransGraph in project pentaho-kettle by pentaho.
the class Spoon method copyTransformationImage.
public void copyTransformationImage(TransMeta transMeta) {
TransGraph transGraph = delegates.trans.findTransGraphOfTransformation(transMeta);
if (transGraph == null) {
return;
}
Clipboard clipboard = GUIResource.getInstance().getNewClipboard();
Point area = transMeta.getMaximum();
Image image = transGraph.getTransformationImage(Display.getCurrent(), area.x, area.y, 1.0f);
clipboard.setContents(new Object[] { image.getImageData() }, new Transfer[] { ImageTransfer.getInstance() });
}
use of org.pentaho.di.ui.spoon.trans.TransGraph in project pentaho-kettle by pentaho.
the class Spoon method addTransLog.
public void addTransLog() {
TransGraph activeTransGraph = getActiveTransGraph();
if (activeTransGraph != null) {
activeTransGraph.transLogDelegate.addTransLog();
activeTransGraph.transGridDelegate.addTransGrid();
}
}
use of org.pentaho.di.ui.spoon.trans.TransGraph in project pentaho-kettle by pentaho.
the class Spoon method undoAction.
public void undoAction(UndoInterface undoInterface) {
if (undoInterface == null) {
return;
}
TransAction ta = undoInterface.previousUndo();
if (ta == null) {
return;
}
// something changed: change the menu
setUndoMenu(undoInterface);
if (undoInterface instanceof TransMeta) {
delegates.trans.undoTransformationAction((TransMeta) undoInterface, ta);
if (ta.getType() == TransAction.TYPE_ACTION_DELETE_STEP) {
// something changed: change the menu
setUndoMenu(undoInterface);
handleSelectedStepOnUndo((TransMeta) undoInterface);
ta = undoInterface.viewPreviousUndo();
if (ta != null && ta.getType() == TransAction.TYPE_ACTION_DELETE_HOP) {
ta = undoInterface.previousUndo();
delegates.trans.undoTransformationAction((TransMeta) undoInterface, ta);
}
}
}
if (undoInterface instanceof JobMeta) {
delegates.jobs.undoJobAction((JobMeta) undoInterface, ta);
if (ta.getType() == TransAction.TYPE_ACTION_DELETE_JOB_ENTRY) {
// something changed: change the menu
setUndoMenu(undoInterface);
ta = undoInterface.viewPreviousUndo();
if (ta != null && ta.getType() == TransAction.TYPE_ACTION_DELETE_JOB_HOP) {
ta = undoInterface.previousUndo();
delegates.jobs.undoJobAction((JobMeta) undoInterface, ta);
}
}
}
// Put what we undo in focus
if (undoInterface instanceof TransMeta) {
TransGraph transGraph = delegates.trans.findTransGraphOfTransformation((TransMeta) undoInterface);
transGraph.forceFocus();
}
if (undoInterface instanceof JobMeta) {
JobGraph jobGraph = delegates.jobs.findJobGraphOfJob((JobMeta) undoInterface);
jobGraph.forceFocus();
}
}
use of org.pentaho.di.ui.spoon.trans.TransGraph in project pentaho-kettle by pentaho.
the class Spoon method checkTrans.
/**
* Check the steps in a transformation
*
* @param only_selected
* True: Check only the selected steps...
*/
public void checkTrans(TransMeta transMeta, boolean only_selected) {
if (transMeta == null) {
return;
}
TransGraph transGraph = delegates.trans.findTransGraphOfTransformation(transMeta);
if (transGraph == null) {
return;
}
CheckTransProgressDialog ctpd = new CheckTransProgressDialog(shell, transMeta, transGraph.getRemarks(), only_selected);
// manages the remarks arraylist...
ctpd.open();
showLastTransCheck();
}
use of org.pentaho.di.ui.spoon.trans.TransGraph in project pentaho-kettle by pentaho.
the class Spoon method zoomOut.
public void zoomOut() {
TransGraph transGraph = getActiveTransGraph();
if (transGraph != null) {
transGraph.zoomOut();
}
JobGraph jobGraph = getActiveJobGraph();
if (jobGraph != null) {
jobGraph.zoomOut();
}
}
Aggregations