Bob or other control panel guru,
Once icons are placed on the control panel, the tooltip says "Alt-click to see menu, drag with meta key..." Ok, I can move the icons around with the right mouse button, but I tried all the combinations I could think of and haven't been able to produce a menu. Is there a way to delete icons, etc?
Can you view the sensor or turnout number once you place them on the panel?
Thanks.
Robin
PS. Bob - hardly worth noting at this point but the readme files show up in the resource lists. So does logo.gif and decoderpro.gif, but hey somebody might want them on their panel!
|
At 8:52 AM -0700 8/8/02, Robin Becker wrote: Bob or other control panel guru,
Once icons are placed on the control panel, the tooltip says "Alt-click to see menu, drag with meta key..." Ok, I can move the icons around with the right mouse button, but I tried all the combinations I could think of and haven't been able to produce a menu. Is there a way to delete icons, etc?
Can you view the sensor or turnout number once you place them on the panel? Uh, I don't know? On a Mac, with only one button, "alt" is the control or option keys. So to see the popup menu I hold control and click-down on something. "Meta" is the command (a.k.a. Apple) key, so I hold that down to move things around. Maybe control works the same on a Windows box? PS. Bob - hardly worth noting at this point but the readme files show up in the resource lists. So does logo.gif and decoderpro.gif, but hey somebody might want them on their panel! Worth noting, as I hadn't noticed. Will fix that, at least for the README file. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957) At CERN until August 10, replies may be slow.
|
Bob, Once icons are placed on the control panel, the tooltip says "Alt-click to
see menu, drag with meta key..."
On a Mac, with only one button, "alt" is the control or option keys. So to see the popup menu I hold control and click-down on something. "Meta" is the command (a.k.a. Apple) key, so I hold that down to move things around.
Maybe control works the same on a Windows box?
Tried CTRL or ALT with left and right mouse buttons but nothing causes a menu to pop up. The right mouse button seems to be the "meta" key. Can you view the sensor or turnout number once you place them on the panel?
Uh, I don't know?
Sorry, not sure if you were responding above to the popup menu or the object number question. Robin
|
At 11:58 AM -0700 8/8/02, Robin Becker wrote: Bob,
>Once icons are placed on the control panel, the tooltip says "Alt-click to > >see menu, drag with meta key..." ... Tried CTRL or ALT with left and right mouse buttons but nothing causes a menu to pop up.
The right mouse button seems to be the "meta" key. OK, I'm clearly confused. What does one normally do to get pop-up menus on a Windows machine? e.g. in other applications, etc. Is there a standard? Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957) At CERN until August 10, replies may be slow.
|
At 8:52 AM -0700 8/8/02, Robin Becker wrote: Can you view the sensor or turnout number once you place them on the panel? Sorry, gave a confusing answer to that before. The ID numbers are in the popup menu. But that doesn't help until we get the popup working for you. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957) At CERN until August 10, replies may be slow.
|
What does one normally do to get pop-up menus on a Windows machine? e.g. in other applications, etc. Is there a standard? Bob, I you like, I can take a look at this if you can tell me where to look in the code for the mouse events. Alex
|
At 4:00 PM +1200 8/9/02, Alex Shepherd wrote: > What does one normally do to get pop-up menus on a Windows machine?
e.g. in other applications, etc. Is there a standard? Bob,
I you like, I can take a look at this if you can tell me where to look in the code for the mouse events.
Thanks, I'd appreciate it. The mouse events are handled primarily in jmri.jmrit.display.PositionableLabel where I decode what's going on, then invoke a subclass method to really display the popup. There's a lot of debugging there, so if you just turn on the log4j category with jmri.jmrit.display.PositionableLabel = DEBUG and click around you'll probably find what I did wrong. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957) At CERN until August 10, replies may be slow.
|
Bob,
From what I gather about the menu, right mouse click would be the usual way.
Robin
> >> >Once icons are placed on the control panel, the tooltip says >> "Alt-click to > > >see menu, drag with meta key..." >... >Tried CTRL or ALT with left and right mouse buttons but nothing causes a >menu to pop up. > >The right mouse button seems to be the "meta" key.
OK, I'm clearly confused.
What does one normally do to get pop-up menus on a Windows machine? e.g. in other applications, etc. Is there a standard?
|
Thanks, I'd appreciate it. The mouse events are handled primarily in jmri.jmrit.display.PositionableLabel where I decode what's going on, then invoke a subclass method to really display the popup. There's a lot of debugging there, so if you just turn on the log4j category with Well making the change below if (e.isPopupTrigger() || ( ( e.getModifiers() & MouseEvent.META_MASK ) != 0 ) ) { allows a "Right-Click" to activate the popup so it now works for Win2K at least. I'm not really sure how isPopupTrigger() will ever return true as it is not obvious from the source - needs some more research to really determine what is supposed to happen. I'll have a did into the swing demo samples, maybe they will reveal the secret... Alex
|
needs some more research to really determine what is supposed to happen. I'll have a did into the swing demo samples, maybe they will reveal the secret... Found it - the MouseEvent.isPopupTrigger() needs to be checked in the Released event not the Pressed I shifted showPopUp() to the Released event and it works as expected Alex
|
At 11:25 PM +1200 8/9/02, Alex Shepherd wrote: Found it - the MouseEvent.isPopupTrigger() needs to be checked in the Released event not the Pressed
I shifted showPopUp() to the Released event and it works as expected Thanks! I _never_ would have found that. Apparently, on a Windows machine you get popup menus when you "click and release"; on a Mac, you "click and hold" to get a popup. For the future-Java-junkies out there, Java Swing handles this by providing a "isPopUpTrigger()" predicate that varies with the look&feel you're using. But you have to make sure to check it everywhere that it might come true. I was only checking it on some mouse events, not all, hence the problem. Is this worth another installer right away, or can it wait a little while? I'll probably get to rotating icons, etc, in a few days, can put them out together then, along with whatever fixes the AD4 needs. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957) At CERN until August 10, replies may be slow.
|
Thanks! I _never_ would have found that.
Apparently, on a Windows machine you get popup menus when you "click and release"; on a Mac, you "click and hold" to get a popup. So do we need it on both events so that both the Mac and PC are covered? Is this worth another installer right away, or can it wait a little while? I'll probably get to rotating icons, etc, in a few days, can put them out together then, along with whatever fixes the AD4 needs. Not for me. ALex
|