def on_show_imagej(self): """Show the ImageJ user interface This method shows the ImageJ user interface when the user presses the Show ImageJ button. """ logger.debug("Starting ImageJ UI") ui_service = ij2.get_ui_service(get_context()) if ui_service is not None and not ui_service.isVisible(): if cpprefs.get_headless(): # Silence the auto-updater in the headless preferences # ij2.update_never_remind() ui_service.createUI() elif ui_service is not None: ui = ui_service.getDefaultUI() J.execute_runnable_in_main_thread( J.run_script( """new java.lang.Runnable() { run: function() { ui.getApplicationFrame().setVisible(true); }}""", dict(ui=ui), ), True, )
def on_show_imagej(self): '''Show the ImageJ user interface This method shows the ImageJ user interface when the user presses the Show ImageJ button. ''' logger.debug("Starting ImageJ UI") ui_service = ij2.get_ui_service(get_context()) if ui_service is not None and not ui_service.isVisible(): if cpprefs.get_headless(): # Silence the auto-updater in the headless preferences # ij2.update_never_remind() ui_service.createUI()
def on_show_imagej(self): '''Show the ImageJ user interface This method shows the ImageJ user interface when the user presses the Show ImageJ button. ''' logger.debug("Starting ImageJ UI") ui_service = ij2.get_ui_service(get_context()) if ui_service is not None and not ui_service.isVisible(): if cpprefs.get_headless(): # Silence the auto-updater in the headless preferences # ij2.update_never_remind() ui_service.createUI() elif ui_service is not None: ui = ui_service.getDefaultUI() J.execute_runnable_in_main_thread( J.run_script( """new java.lang.Runnable() { run: function() { ui.getApplicationFrame().setVisible(true); }}""", dict(ui=ui)), True)