BigDataViewer: Help Window

bigdataviewer
imagej2
Tags: #<Tag:0x00007fd69bb99d48> #<Tag:0x00007fd69bb99500>

#1

Hello

I noticed, while going through the BDV tutorials, that the F1 shortcut producing the help window stopps working once BdvHandlePanel is used on a Jframe. So for tutorial 1 the help window pops up and starting from tutorial 2 there is no response upon pressing F1.

Feature or bug?
Anyway, is there a possibility to keep the help functionality working while working with BdvHandlePanel? Do I have to re-register the F1 keystroke?

Felix


#2

The help window seems not to working per default when using bigdataviewer-vistools i.e. BdvHandlePanel.
On startup of the BDV the message “Press for help.” is still displayed though.

Personally, I (re-) registerd the help dialog as follows:

JFrame window = new JFrame("BDV");
BdvHandlePanel bdvHandle = new BdvHandlePanel(window, Bdv.options());
window.add(bdvHandle.getViewerPanel(), BorderLayout.CENTER);

// Add the help window
final InputMap inputMap = new InputMap();
InputTriggerConfig triggerConfig = BigDataViewer.getInputTriggerConfig(ViewerOptions.options());
KeyStrokeAdder adder = triggerConfig.keyStrokeAdder(inputMap);
adder.put("help", "F1", "H");
final ActionMap actionMap = new ActionMap();
new ToggleDialogAction("help", new HelpDialog(window, BigDataViewer.class.getResource("/viewer/Help.html"))).put(actionMap);
bdvHandle.getKeybindings().addInputMap("bdv", inputMap);
bdvHandle.getKeybindings().addActionMap("bdv", actionMap);

Edit: the help dialog requires to be attached to a window, which explains why it’s not working when usnig the BdvHandlePanel.


#3

You might want to mention @tpietzsch and @axtimwalde directly, as I’m not sure if they subscribed to the bigdataviewer tag on this forum (subscription can be triggered per tag at the top right on the tag page).

Or submit an issue or pull request here: