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,
Michelle

Michelle Kam           (408) 742-2881
Lockheed Martin Space Systems Co. SSM/ATC/MSIS
B/153 O/L922 
1111 Lockheed Martin Way, Sunnyvale, CA 94089




-----Original Message-----
From: Michelle Kam [mailto:shellzie@xxxxxxxxxxxxxxxxxxx]
Sent: Wednesday, July 23, 2003 11:09 AM
To: Kam, Michelle C
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: