Hi everyone (probably Wayne),
ImageJ 1.53g has added the possibility to have long-clicks for the context menu. I have a plugin where I drag a point of a custom overlay (to modify that overlay). After dragging for about a second, the context menu interferes. I guess that the same might happen for other plugins that use mouseDragged. I could not find any method to disable the long-click context menu. Did I miss it, or otherwise, could we have something like an ImagePlus.enableLongClickForContextMenu(boolean) method? Or is there some other alternative for dragging points in a plugin without triggering the context menu? Best regards, Michael -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
I agree that there should be a way to disable long-clicks if you don't need it.
Or perhaps the length of the long-click delay could be specifiable? The right place for this choice would be in Edit → Options → Appearance Either a checkbox for disabling the long-click context (it can by default be on, to allow use on mobile platforms), or a specifiable delay (is it something like 1.5 second today?) that can be set to a negative or NaN value to disable it. Stein -----Original Message----- From: ImageJ Interest Group <[hidden email]> On Behalf Of Michael Schmid Sent: 27. oktober 2020 11:10 To: [hidden email] Subject: disable long-click for context menu? Hi everyone (probably Wayne), ImageJ 1.53g has added the possibility to have long-clicks for the context menu. I have a plugin where I drag a point of a custom overlay (to modify that overlay). After dragging for about a second, the context menu interferes. I guess that the same might happen for other plugins that use mouseDragged. I could not find any method to disable the long-click context menu. Did I miss it, or otherwise, could we have something like an ImagePlus.enableLongClickForContextMenu(boolean) method? Or is there some other alternative for dragging points in a plugin without triggering the context menu? Best regards, Michael -- ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=04%7C01%7Cstein.rorvik%40sintef.no%7C497ad3fe86dd4eacb02b08d87a60bab3%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637393903154366397%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=C%2FX%2B%2FfgFk0CbANQLBIi0M%2F%2FBP1PxkXu4uNw1%2Bh8ohVc%3D&reserved=0 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Michael Schmid
> On Oct 27, 2020, at 6:10 AM, Michael Schmid <[hidden email]> wrote:
> > Hi everyone (probably Wayne), > > ImageJ 1.53g has added the possibility to have long-clicks for the context menu. > I have a plugin where I drag a point of a custom overlay (to modify that overlay). After dragging for about a second, the context menu interferes. I guess that the same might happen for other plugins that use mouseDragged. Hi Michael, This problem should be fixed in the 1.53g2 daily build, where the context menu is not displayed if the cursor has moved. It would help to have a small plugin that reproduces this problem. The macros in the Help>Examples>Tools menu that move overlay objects (e.g., the Circle Tool) do not trigger the context menu. -wayne > I could not find any method to disable the long-click context menu. Did I miss it, or otherwise, could we have something like an ImagePlus.enableLongClickForContextMenu(boolean) method? > > Or is there some other alternative for dragging points in a plugin without triggering the context menu? -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Wayne,
yes, the problem is solved with the new daily build, thank you! (Unfortunately, it is not a small plugin that I have, and rather spezilized. It would only make sense to publish it as part of a plugin collection - I intend to do so, but I have to find time for fixing a few things before doing so...) Michael ________________________________________________________________ On 27.10.20 16:55, Wayne Rasband wrote: >> On Oct 27, 2020, at 6:10 AM, Michael Schmid <[hidden email]> wrote: >> >> Hi everyone (probably Wayne), >> >> ImageJ 1.53g has added the possibility to have long-clicks for the context menu. >> I have a plugin where I drag a point of a custom overlay (to modify that overlay). After dragging for about a second, the context menu interferes. I guess that the same might happen for other plugins that use mouseDragged. > > Hi Michael, > > This problem should be fixed in the 1.53g2 daily build, where the context menu is not displayed if the cursor has moved. It would help to have a small plugin that reproduces this problem. The macros in the Help>Examples>Tools menu that move overlay objects (e.g., the Circle Tool) do not trigger the context menu. > > -wayne > > >> I could not find any method to disable the long-click context menu. Did I miss it, or otherwise, could we have something like an ImagePlus.enableLongClickForContextMenu(boolean) method? >> >> Or is there some other alternative for dragging points in a plugin without triggering the context menu? > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
I still have problems with this, using daily build g3.
When trying to make a regular rectangular ROI by dragging with the mouse, the context menu appears before I get the chance to move the mouse. The menu pops up in less than a second after the left-mouse-button down. Can the delay be made a bit longer like 3 seconds or so? Or preferably configure-able, or disable-able. Stein -----Original Message----- Sent: 27. oktober 2020 17:54 Subject: Re: disable long-click for context menu? Hi Wayne, yes, the problem is solved with the new daily build, thank you! (Unfortunately, it is not a small plugin that I have, and rather spezilized. It would only make sense to publish it as part of a plugin collection - I intend to do so, but I have to find time for fixing a few things before doing so...) Michael ________________________________________________________________ On 27.10.20 16:55, Wayne Rasband wrote: >> On Oct 27, 2020, at 6:10 AM, Michael Schmid <[hidden email]> wrote: >> >> Hi everyone (probably Wayne), >> >> ImageJ 1.53g has added the possibility to have long-clicks for the context menu. >> I have a plugin where I drag a point of a custom overlay (to modify that overlay). After dragging for about a second, the context menu interferes. I guess that the same might happen for other plugins that use mouseDragged. > > Hi Michael, > > This problem should be fixed in the 1.53g2 daily build, where the context menu is not displayed if the cursor has moved. It would help to have a small plugin that reproduces this problem. The macros in the Help>Examples>Tools menu that move overlay objects (e.g., the Circle Tool) do not trigger the context menu. > > -wayne > > >> I could not find any method to disable the long-click context menu. Did I miss it, or otherwise, could we have something like an ImagePlus.enableLongClickForContextMenu(boolean) method? >> >> Or is there some other alternative for dragging points in a plugin without triggering the context menu? > > -- > ImageJ mailing list: > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimage > j.nih.gov%2Fij%2Flist.html&data=04%7C01%7Cstein.rorvik%40sintef.no > %7Cd1280756d515466eb0e908d87a9a030f%7Ce1f00f39604145b0b309e0210d8b32af > %7C1%7C0%7C637394149204679596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw > MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Qp > ulPPXt6k5O9Ay9dGq8sjh3OOidDmGTCTIjrw49WLg%3D&reserved=0 > -- ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=04%7C01%7Cstein.rorvik%40sintef.no%7Cd1280756d515466eb0e908d87a9a030f%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637394149204679596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QpulPPXt6k5O9Ay9dGq8sjh3OOidDmGTCTIjrw49WLg%3D&reserved=0 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> On Oct 28, 2020, at 6:14 PM, Stein Rørvik <[hidden email]> wrote:
> > I still have problems with this, using daily build g3. > > When trying to make a regular rectangular ROI by dragging with the mouse, the context menu appears before I get the chance to move the mouse. The menu pops up in less than a second after the left-mouse-button down. Can the delay be made a bit longer like 3 seconds or so? Or preferably configure-able, or disable-able. The ImageJ 1.53g4 daily build adds the ImageCanvas.setLongClickDelay(int) method. To set the image context menu delay to 3 seconds (the default is 1), add call("ij.gui.ImageCanvas.setLongClickDelay", 3000); to the Edit>Options>Startup dialog. Set the delay to 0 to disable long click triggering of the context menu. -wayne > -----Original Message----- > Sent: 27. oktober 2020 17:54 > Subject: Re: disable long-click for context menu? > > Hi Wayne, > > yes, the problem is solved with the new daily build, thank you! > > (Unfortunately, it is not a small plugin that I have, and rather spezilized. It would only make sense to publish it as part of a plugin collection - I intend to do so, but I have to find time for fixing a few things before doing so...) > > Michael > ________________________________________________________________ > On 27.10.20 16:55, Wayne Rasband wrote: >>> On Oct 27, 2020, at 6:10 AM, Michael Schmid <[hidden email]> wrote: >>> >>> Hi everyone (probably Wayne), >>> >>> ImageJ 1.53g has added the possibility to have long-clicks for the context menu. >>> I have a plugin where I drag a point of a custom overlay (to modify that overlay). After dragging for about a second, the context menu interferes. I guess that the same might happen for other plugins that use mouseDragged. >> >> Hi Michael, >> >> This problem should be fixed in the 1.53g2 daily build, where the context menu is not displayed if the cursor has moved. It would help to have a small plugin that reproduces this problem. The macros in the Help>Examples>Tools menu that move overlay objects (e.g., the Circle Tool) do not trigger the context menu. >> >> -wayne >> >> >>> I could not find any method to disable the long-click context menu. Did I miss it, or otherwise, could we have something like an ImagePlus.enableLongClickForContextMenu(boolean) method? >>> >>> Or is there some other alternative for dragging points in a plugin without triggering the context menu? >> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thanks, this works as advertised for the context menu for images.
Can you apply the same fix for the context menu of toolbar icons, for consistency? It is less of a problem there though, as one usually uses only a very short click to activate a toolbar icon. Stein -----Original Message----- Sent: 29. oktober 2020 00:23 Subject: Re: disable long-click for context menu? > On Oct 28, 2020, at 6:14 PM, Stein Rørvik <[hidden email]> wrote: > > I still have problems with this, using daily build g3. > > When trying to make a regular rectangular ROI by dragging with the mouse, the context menu appears before I get the chance to move the mouse. The menu pops up in less than a second after the left-mouse-button down. Can the delay be made a bit longer like 3 seconds or so? Or preferably configure-able, or disable-able. The ImageJ 1.53g4 daily build adds the ImageCanvas.setLongClickDelay(int) method. To set the image context menu delay to 3 seconds (the default is 1), add call("ij.gui.ImageCanvas.setLongClickDelay", 3000); to the Edit>Options>Startup dialog. Set the delay to 0 to disable long click triggering of the context menu. -wayne > -----Original Message----- > Sent: 27. oktober 2020 17:54 > Subject: Re: disable long-click for context menu? > > Hi Wayne, > > yes, the problem is solved with the new daily build, thank you! > > (Unfortunately, it is not a small plugin that I have, and rather spezilized. It would only make sense to publish it as part of a plugin collection - I intend to do so, but I have to find time for fixing a few things before doing so...) > > Michael > ________________________________________________________________ > On 27.10.20 16:55, Wayne Rasband wrote: >>> On Oct 27, 2020, at 6:10 AM, Michael Schmid <[hidden email]> wrote: >>> >>> Hi everyone (probably Wayne), >>> >>> ImageJ 1.53g has added the possibility to have long-clicks for the context menu. >>> I have a plugin where I drag a point of a custom overlay (to modify that overlay). After dragging for about a second, the context menu interferes. I guess that the same might happen for other plugins that use mouseDragged. >> >> Hi Michael, >> >> This problem should be fixed in the 1.53g2 daily build, where the context menu is not displayed if the cursor has moved. It would help to have a small plugin that reproduces this problem. The macros in the Help>Examples>Tools menu that move overlay objects (e.g., the Circle Tool) do not trigger the context menu. >> >> -wayne >> >> >>> I could not find any method to disable the long-click context menu. Did I miss it, or otherwise, could we have something like an ImagePlus.enableLongClickForContextMenu(boolean) method? >>> >>> Or is there some other alternative for dragging points in a plugin without triggering the context menu? >> -- ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=04%7C01%7Cstein.rorvik%40sintef.no%7C7cf991a24d3e4b32c46608d87b98b26d%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C1%7C637395243051176769%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uvZq6sDNxplEKzwgTdqkyXi8mQnBgGCksmECfXr9gkE%3D&reserved=0 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |