本文整理汇总了Java中org.pentaho.di.ui.spoon.trans.TransGraph.isRunning方法的典型用法代码示例。如果您正苦于以下问题:Java TransGraph.isRunning方法的具体用法?Java TransGraph.isRunning怎么用?Java TransGraph.isRunning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.spoon.trans.TransGraph
的用法示例。
在下文中一共展示了TransGraph.isRunning方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: enableMenus
import org.pentaho.di.ui.spoon.trans.TransGraph; //导入方法依赖的package包/类
public void enableMenus() {
boolean enableTransMenu = getActiveTransformation() != null;
boolean enableJobMenu = getActiveJob() != null;
boolean enableRepositoryMenu = rep != null;
boolean enableLastPreviewMenu = false;
boolean disablePreviewButton = false;
TransGraph transGraph = getActiveTransGraph();
if (transGraph != null) {
TransDebugMeta lastTransDebugMeta = transGraph.getLastTransDebugMeta();
enableLastPreviewMenu = !(lastTransDebugMeta == null || lastTransDebugMeta.getStepDebugMetaMap().isEmpty());
disablePreviewButton = transGraph.isRunning() && !transGraph.isHalting();
}
design.setEnabled(enableTransMenu || enableJobMenu);
// Only enable certain menu-items if we need to.
menuBar.setEnableById("file-save", enableTransMenu || enableJobMenu);
menuBar.setEnableById("file-save-as", enableTransMenu || enableJobMenu);
menuBar.setEnableById("file-close", enableTransMenu || enableJobMenu);
menuBar.setEnableById("file-print", enableTransMenu || enableJobMenu);
// Disable the undo and redo menus if there is no active transformation
// or active job
// DO NOT ENABLE them otherwise ... leave that to the undo/redo settings
//
if (!enableTransMenu && !enableJobMenu) {
menuBar.setEnableById(UNDO_MENUITEM, false);
menuBar.setEnableById(REDO_MENUITEM, false);
}
menuBar.setEnableById("edit-clear-selection", enableTransMenu);
menuBar.setEnableById("edit-select-all", enableTransMenu);
menuBar.setEnableById("edit-copy", enableTransMenu);
menuBar.setEnableById("edit-paste", enableTransMenu);
// Transformations
menuBar.setEnableById("trans-run", enableTransMenu && !disablePreviewButton);
menuBar.setEnableById("trans-replay", enableTransMenu && !disablePreviewButton);
menuBar.setEnableById("trans-preview", enableTransMenu && !disablePreviewButton);
menuBar.setEnableById("trans-debug", enableTransMenu && !disablePreviewButton);
menuBar.setEnableById("trans-verify", enableTransMenu);
menuBar.setEnableById("trans-impact", enableTransMenu);
menuBar.setEnableById("trans-get-sql", enableTransMenu);
menuBar.setEnableById("trans-last-impact", enableTransMenu);
menuBar.setEnableById("trans-last-check", enableTransMenu);
menuBar.setEnableById("trans-last-preview", enableTransMenu);
menuBar.setEnableById("trans-copy", enableTransMenu);
// miTransPaste.setEnabled(enableTransMenu);
menuBar.setEnableById("trans-copy-image", enableTransMenu);
menuBar.setEnableById("trans-settings", enableTransMenu);
// Jobs
menuBar.setEnableById("job-run", enableJobMenu);
menuBar.setEnableById("job-copy", enableJobMenu);
menuBar.setEnableById("job-settings", enableJobMenu);
menuBar.setEnableById("wizard-connection", enableTransMenu || enableJobMenu);
menuBar.setEnableById("wizard-copy-table", enableTransMenu || enableJobMenu);
menuBar.setEnableById("wizard-copy-tables", enableRepositoryMenu || enableTransMenu || enableJobMenu);
menuBar.setEnableById("repository-disconnect", enableRepositoryMenu);
menuBar.setEnableById("repository-explore", enableRepositoryMenu);
menuBar.setEnableById("repository-edit-user", enableRepositoryMenu);
menuBar.setEnableById("trans-last-preview", enableLastPreviewMenu);
// What steps & plugins to show?
refreshCoreObjects();
}