Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4519416

REGRESSION: ALT_MASK no longer represented in MouseEvent.getModifiers() 1.4beta2

XMLWordPrintable

    • rc1
    • x86
    • windows_2000
    • Verified



      Name: ddT132432 Date: 10/25/2001


      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)

      The InputEvent.ALT_MASK modifier is not being properly applied to MouseEvent
      objects in JRE 1.4.0_beta2. Below is an application that demonstrates that
      when the ALT key is pressed and a click occurs, the ALT_MASK (value == 8) is
      not added to the 'modifiers' member of the MouseEvent as it is with the
      CTRL_MASK and SHIFT_MASK.


      import java.awt.event.*;
      import javax.swing.*;

      public class AltModifierTest extends JFrame
        {
      //
      // Main Method
      //
        public static void main(String[] arg)
          {
          AltModifierTest alt = new AltModifierTest();
          alt.setSize(100, 100);
          alt.setLocation(200, 200);
          alt.setVisible(true);
          } // ends main(String[])

      //
      // Constructors
      //
        public AltModifierTest()
          {
          this.addMouseListener(new MouseAdapter() {
            public void mousePressed(MouseEvent me)
              {
              System.err.println("press detected with modifiers " + me.getModifiers());
              System.err.println(" MouseEvent.SHIFT_MASK: " + MouseEvent.SHIFT_MASK);
              System.err.println(" MouseEvent.CTRL_MASK: " + MouseEvent.CTRL_MASK);
              System.err.println(" MouseEvent.META_MASK: " + MouseEvent.META_MASK);
              System.err.println(" MouseEvent.ALT_MASK: " + MouseEvent.ALT_MASK);
              } // ends mousePressed(MouseEvent)

            } // ends anonymous MouseAdapter class

          ); // ends addition of MouseListener

          } // ends constructor AltModifierTest(void)

        } // ends class AltModifierTest

      Release Regression From : merlin-beta2
      The above release value was the last known release where this
      bug was knwon to work. Since then there has been a regression.

      (Review ID: 134397)
      ======================================================================

            bchristi Brent Christian
            ddressersunw Daniel Dresser (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: