jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java
changeset 20107 18e644411f0b
parent 18295 4fed9f71df91
child 20172 f48935a247ec
equal deleted inserted replaced
20106:5d5f2c72f262 20107:18e644411f0b
   806                     redispatchEvent(comp, e);
   806                     redispatchEvent(comp, e);
   807                 }
   807                 }
   808             }
   808             }
   809         }
   809         }
   810         boolean stopPostProcessing = false;
   810         boolean stopPostProcessing = false;
   811         java.util.List processors = getKeyEventPostProcessors();
   811         java.util.List<KeyEventPostProcessor> processors = getKeyEventPostProcessors();
   812         if (processors != null) {
   812         if (processors != null) {
   813             for (java.util.Iterator iter = processors.iterator();
   813             for (java.util.Iterator<KeyEventPostProcessor> iter = processors.iterator();
   814                  !stopPostProcessing && iter.hasNext(); )
   814                  !stopPostProcessing && iter.hasNext(); )
   815             {
   815             {
   816                 stopPostProcessing = (((KeyEventPostProcessor)(iter.next())).
   816                 stopPostProcessing = iter.next().
   817                             postProcessKeyEvent(e));
   817                             postProcessKeyEvent(e);
   818             }
   818             }
   819         }
   819         }
   820         if (!stopPostProcessing) {
   820         if (!stopPostProcessing) {
   821             postProcessKeyEvent(e);
   821             postProcessKeyEvent(e);
   822         }
   822         }
  1057                 }
  1057                 }
  1058             }
  1058             }
  1059             return true;
  1059             return true;
  1060         }
  1060         }
  1061 
  1061 
  1062         java.util.List dispatchers = getKeyEventDispatchers();
  1062         java.util.List<KeyEventDispatcher> dispatchers = getKeyEventDispatchers();
  1063         if (dispatchers != null) {
  1063         if (dispatchers != null) {
  1064             for (java.util.Iterator iter = dispatchers.iterator();
  1064             for (java.util.Iterator<KeyEventDispatcher> iter = dispatchers.iterator();
  1065                  iter.hasNext(); )
  1065                  iter.hasNext(); )
  1066              {
  1066              {
  1067                  if (((KeyEventDispatcher)(iter.next())).
  1067                  if (iter.next().
  1068                      dispatchKeyEvent(ke))
  1068                      dispatchKeyEvent(ke))
  1069                  {
  1069                  {
  1070                      return true;
  1070                      return true;
  1071                  }
  1071                  }
  1072              }
  1072              }
  1129         {
  1129         {
  1130             AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e),
  1130             AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e),
  1131                 oppStroke = AWTKeyStroke.getAWTKeyStroke(stroke.getKeyCode(),
  1131                 oppStroke = AWTKeyStroke.getAWTKeyStroke(stroke.getKeyCode(),
  1132                                                  stroke.getModifiers(),
  1132                                                  stroke.getModifiers(),
  1133                                                  !stroke.isOnKeyRelease());
  1133                                                  !stroke.isOnKeyRelease());
  1134             Set toTest;
  1134             Set<AWTKeyStroke> toTest;
  1135             boolean contains, containsOpp;
  1135             boolean contains, containsOpp;
  1136 
  1136 
  1137             toTest = focusedComponent.getFocusTraversalKeys(
  1137             toTest = focusedComponent.getFocusTraversalKeys(
  1138                 KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
  1138                 KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
  1139             contains = toTest.contains(stroke);
  1139             contains = toTest.contains(stroke);