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

Component.isEventMaskEnabled(long) is required

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 7
    • 7
    • client-libs
    • None
    • generic
    • generic

      There are several projects that work on applying affine transforms on Swing components.
      (SceneGraph, JXTransformer or ZoomUI)

      The usual practice is keep the component off screen,
      send it transformed input events and show its transformed view.

      Unfortunately it is impossible to detect is a component receives particular events or not. For example, if you add a mouseListener to a component it starts consuming mouseEvents and you can detect it by reading the number of mouseListeners.

      However a component can also listen for event with help of Component.enableEvents(),
      there is no way for users to detect this situation

      A few core Swing components use enableEvents(), see JFormattedTextField, JRootPane, JPopupMenu

      public isEventMaskEnabled(long) method will make it possible to implement correct event processing for tranformed components.

      This CR is filed specially for ZoomUI project
      http://www.pbjar.org/blogs/jxlayer/JXLayer_two.html

      which will also benefit from including JXLayer to JDK 7

            alexp Alexander Potochkin (Inactive)
            alexp Alexander Potochkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: