use of org.knime.core.node.workflow.AbstractNodeExecutionJobManager in project knime-core by knime.
the class WorkflowEditor method updateJobManagerDisplay.
private void updateJobManagerDisplay() {
NodeExecutionJobManager jobManager = m_manager.findJobManager();
URL url;
if (jobManager instanceof AbstractNodeExecutionJobManager) {
url = ((AbstractNodeExecutionJobManager) jobManager).getIconForWorkflow();
} else {
url = null;
}
Image image;
if (url != null) {
image = ImageRepository.getUnscaledImage(url);
} else {
image = null;
}
WorkflowFigure workflowFigure = ((WorkflowRootEditPart) getViewer().getRootEditPart().getContents()).getFigure();
workflowFigure.setJobManagerFigure(image);
}
use of org.knime.core.node.workflow.AbstractNodeExecutionJobManager in project knime-core by knime.
the class NodeContainerEditPart method updateJobManagerIcon.
private void updateJobManagerIcon() {
NodeContainerUI nc = getNodeContainer();
NodeExecutionJobManager jobManager = nc.getJobManager();
URL iconURL;
if (jobManager != null) {
iconURL = jobManager.getIcon();
} else {
NodeExecutionJobManager parentJobManager = nc.findJobManager();
if (parentJobManager instanceof AbstractNodeExecutionJobManager) {
if (Wrapper.wraps(nc, NodeContainer.class)) {
iconURL = ((AbstractNodeExecutionJobManager) parentJobManager).getIconForChild(Wrapper.unwrapNC(nc));
} else {
iconURL = null;
}
} else {
iconURL = null;
}
}
Image icon = null;
if (iconURL != null) {
icon = ImageDescriptor.createFromURL(iconURL).createImage();
}
((NodeContainerFigure) getFigure()).setJobExecutorIcon(icon);
}
Aggregations