equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
44 * for more information. |
44 * for more information. |
45 * |
45 * |
46 * @author Arnaud Weber |
46 * @author Arnaud Weber |
47 * @author David Mendenhall |
47 * @author David Mendenhall |
48 */ |
48 */ |
|
49 @SuppressWarnings("serial") // Obsolete class |
49 public class DefaultFocusManager extends FocusManager { |
50 public class DefaultFocusManager extends FocusManager { |
50 |
51 |
51 final FocusTraversalPolicy gluePolicy = |
52 final FocusTraversalPolicy gluePolicy = |
52 new LegacyGlueFocusTraversalPolicy(this); |
53 new LegacyGlueFocusTraversalPolicy(this); |
53 private final FocusTraversalPolicy layoutPolicy = |
54 private final FocusTraversalPolicy layoutPolicy = |
146 public boolean compareTabOrder(Component a, Component b) { |
147 public boolean compareTabOrder(Component a, Component b) { |
147 return (comparator.compare(a, b) < 0); |
148 return (comparator.compare(a, b) < 0); |
148 } |
149 } |
149 } |
150 } |
150 |
151 |
|
152 @SuppressWarnings("serial") // JDK-implementation class |
151 final class LegacyLayoutFocusTraversalPolicy |
153 final class LegacyLayoutFocusTraversalPolicy |
152 extends LayoutFocusTraversalPolicy |
154 extends LayoutFocusTraversalPolicy |
153 { |
155 { |
154 LegacyLayoutFocusTraversalPolicy(DefaultFocusManager defaultFocusManager) { |
156 LegacyLayoutFocusTraversalPolicy(DefaultFocusManager defaultFocusManager) { |
155 super(new CompareTabOrderComparator(defaultFocusManager)); |
157 super(new CompareTabOrderComparator(defaultFocusManager)); |