mobie / mobie-viewer-fiji

BSD 2-Clause "Simplified" License
30 stars 12 forks source link

Table range slider not closing when changing dataset #1082

Closed martinschorb closed 7 months ago

martinschorb commented 8 months ago

Hi, whatever table range slider window stays open when a dataset is closed to open another one.

tischi commented 8 months ago

What is a "table range slider"?

martinschorb commented 8 months ago

The "contrast" range slider for coloring a regionDisplay according to a table column. With its initialvalueLimits set in the view.

image

tischi commented 8 months ago

Thanks, I will look into it.

tischi commented 8 months ago

The window is generated by this class:

public class NumericAnnotationColoringModelContrastDialog extends JFrame implements ColoringListener
{
...
}

, which in fact already contains a close() method that could be called. However, right now I don't have a simple (non-ugly) idea how to call this method at the right moment.

Ideas:

martinschorb commented 8 months ago

How is it implemented for the Brightness and Opacity sliders? Are they bound to their BDV window? They close when the dataset is changed. Could it be implemented in a similar fashion?

Another option would be (I don't know if that's possible) to close all open dialogs when closing a dataset. Or maybe even all open GUI elements except MoBIE's main window.

tischi commented 8 months ago

How is it implemented for the Brightness and Opacity sliders? Are they bound to their BDV window? They close when the dataset is changed.

I just checked the code and I did not find anything that would close those windows upon the change of the dataset. Are you sure?

martinschorb commented 8 months ago

How is it implemented for the Brightness and Opacity sliders? Are they bound to their BDV window? They close when the dataset is changed.

I just checked the code and I did not find anything that would close those windows upon the change of the dataset. Are you sure?

True. This seems to be a more general thing then. So we need a way to close all those with the dataset. (?)

tischi commented 8 months ago

Maybe that could a way, each GUI could register itself in some global static list, which MoBIE would then close.

I think also when showing a new exclusive view all those windows should be closed?

martinschorb commented 8 months ago

I just realized that these dialogs stay open forever, even when closing the MoBIE main window. Only closing the entire Fiji (and thus stopping the Java process) will terminate them.

tischi commented 8 months ago

OK, then I think I could implement that these windows close when

  1. The dataset is changed
  2. MoBIE is closed
  3. A new exclusive View is opened

That would already help, right?

tischi commented 7 months ago

Should work now once I cut a new release. Please reopen if some issues persit.