Change workflow editor background image

I’d like to place an image as the background picture for the workflow editor. Could any one tell me how to achieve this?

Thanks in advance!

Looks like that KNIME uses Eclipse GEF. Is it possible to call GEF API to change workflow editor’s background image from NodeFactory class?

No, that is definitively not possible, since the NodeFactory knows nothing about GEF: there are no dependencies. As far as I know it is not possible to change the background image of the GraphicalEditor (referring GEF class) neither programmatically nor via the UI. Just out of curiosity: for what would you need such a feature? Are you planning to realize KNIME skins :wink:

Thanks for your reply! I googled “GEF background image”, and found this blog http://eclipseo.blogspot.com/2008/09/background-image-to-gef-editor.html.

The reason why I’d like to have this feature is that users could have a pre-defined workflow as a background image, and they could overlay the node on top of that picture (which could be much fancier :).

1 Like

Nice idea! Providing example workflows is not an option? As you probably already know - they can be easily imported (right-click in the workflow projects, select “Import KNIME workflow”).

1 Like

Yes, I could do that. However, users would like to see some more shapes beyond rectangles :slight_smile: Also, they may have a legacy process flow graph in everybody’s mind, and they would instantly link KNIME nodes with what they knew if they see the graph. It would be a nice to have feature of KNIME.

1 Like

We have already a related feature request on our list: the possibility to draw rectangles, arrows and notes on the workflow in order to visually annotate and group the nodes on the workflow. That would probably go in your proposed direction? But as always it is just a matter of resources - no promises here :wink:

2 Likes

Hi Fabian,

That’s good to read. I would need that feature - being able to draw shapes on the Editor. When delivering some workflows, it is always nice to enhance explanations with annotations and more. I am not a big fan of PPT and I hate copying/pasting. Simply opening Knime and delivering everything from there is a great idea.

Also, do you have the intention of enabling image (.jpeg) inclusion on the editor (simply for illustration - no processing whatsoever)? Thanks!

Hi @JackBibiRoot
take a look at the documentation:
https://docs.knime.com/2018-12/analytics_platform_workbench_guide/index.html#img-comments-annotations
on how to add annotations to a workflow. Also check out the following video:

best,
Gabriel

Thanks for the video, I watched it but that does not answer my request! I would find cool to add a picture on the Editor, or adding shapes/arrows/etc. Just like you would do in PPT for instance.

Hi there!

@JackBibiRoot I see. What would be the use case of this pictures/shapes/arrows/?

Maybe some print screen from paint can help :slight_smile:

Br,
Ivan

I really need the same thing for my students. It does help to have a background image somewhere at the background of the workflow to assist them as a first step or to have a map as a background for reference or as a live map of spatial data results…just an idea for the developers.

1 Like

Do you find it not possible to achieve the same thing using workflow annotations to group nodes as is done in many of the example workflows?

Annotations may include wording descriptions that may slow down the understanding of a workflow. I do not see the reason not to have the option to include an image, but I am not a developer to see any obstacle in implementation. The question about images came up after a student who had a more photographic mind rather than a reader-mind.

In some use cases, we do already include images in the background - but those are tiled; regardless, it is a ‘trivial’ implementation to put another image into that background.

That being said, two questions:

  • How would you envision scaling the image? (i.e, you assign an image to the background which contains a section that highlights an area starting at x,y and is w,h wide and high, but then you find that you have too many nodes to reasonable fit in a rectangle of w,h? What would you imagine doing then?)
  • In addition to that issue, what you describe requires a parallel spatial reckoning - the user need, in a graphic editing program, envision how much space they would need for layout of certain node groups and create the background appropriately, and then insert that image into the workflow, moving around the nodes to match what they have envisioned. This seems non-ideal, on first blush - no?
2 Likes