Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

RE: RE: mouse clicking multiple cells

Hi Curtis,

I tried  if (e.getInputEvent().getModifiers() & InputEvent.CTRL_MASK != 0) { 
which is what you wrote, but I'm still getting the same behavior. I am still 
able to click on multiple cells by just clicking with the mouse and also 
holding down the "control" key in addition to the method of just clicking on 
cells with the mouse. My goal: I only want to be able to select cells if the 
control key is held down.
Is this the right way to specify if the "control" key is being pressed?:

if (e.getModifiers() == InputEvent.CTRL_MASK) {  //check if it is a mouse click 
AND control button held down

Do you think my implementation of DisplayListener is not completely overriding 
the old implementation of selecting cells? My code is being detected but for 
some reason, it's still allowing a user to just click with the mouse too.

Thanks,



-----Original Message-----
From: [mailto:xxxxxx@xxxxxxxxxxxxxxxxxxx]
Sent: Wednesday, July 23, 2003 11:09 AM
To: User
Subject: FWD: RE: mouse clicking multiple cells


>===== Original Message From Curtis Rueden <curtis@xxxxxxxxxxxxx> ====
Oops, that should be:
    if (e.getInputEvent().getModifiers() & InputEvent.CTRL_MASK != 0) {

-Curtis

At 12:40 PM 7/23/2003, you wrote:
>Try:
>  if (e.getInputEvent().getModifiers() | InputEvent.CTRL_MASK != 0) {
>
>-Curtis


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: