I have a FIJI plugin with GUI, and I want to be able to call its GUI by a combination of keys; thus it works as a sort of context menu.
This is how my (poor) understanding sees it.
- The plugin idles in the background of FIJI/ImageJ with invisible JFrame (it has been started either manually, or run automatically at the start of FIJI).
- There is a combination of keys (say, ctrl+shift+A) that should be registered in FIJI. When I hit them within focused FIJI window - FIJI calls a method of my plugin.
- This method makes plugin’s JFrame visible (sort of context menu); thus the plugin can listen to my clicks
- I click on menu items, the plugin runs respective commands, disappears, and again idles in the background until I hit the key combination.
Is it possible? I thought about overriding the ImagePlus Window keylistener, but it seems destructive (if possible at all).
What platform in SciJava is the most suitable for that? I thought it should be a “Service”, but I cannot find any respective tutorial on that.