Search in sources :

Example 1 with NodeType

use of org.knime.core.node.NodeFactory.NodeType in project knime-core by knime.

the class NodeContainerEditPart method initFigure.

private void initFigure() {
    NodeContainerFigure f = (NodeContainerFigure) getFigure();
    NodeType type = getNodeContainer().getType();
    String name = getNodeContainer().getName();
    String description = getNodeContainer().getCustomDescription();
    // get the icon
    Image icon = org.knime.workbench.core.util.ImageRepository.getUnscaledIconImage(getNodeContainer().getIcon());
    // get default image if null
    if (icon == null) {
        icon = org.knime.workbench.core.util.ImageRepository.getUnscaledIconImage(NodeFactory.getDefaultIcon());
    }
    if (icon != null) {
        f.setIcon(icon);
    }
    f.setType(type);
    updateLabelText();
    f.setCustomDescription(description);
}
Also used : NodeType(org.knime.core.node.NodeFactory.NodeType) Image(org.eclipse.swt.graphics.Image) NodeContainerFigure(org.knime.workbench.editor2.figures.NodeContainerFigure)

Aggregations

Image (org.eclipse.swt.graphics.Image)1 NodeType (org.knime.core.node.NodeFactory.NodeType)1 NodeContainerFigure (org.knime.workbench.editor2.figures.NodeContainerFigure)1