Package javax.swing

Examples of javax.swing.SortingFocusTraversalPolicy$NextComponentFinder


            FocusTraversalPolicy policy = ancestor.getFocusTraversalPolicy();
            if (!(policy instanceof SortingFocusTraversalPolicy)) {
                return;
            }

            SortingFocusTraversalPolicy sortingPolicy = (SortingFocusTraversalPolicy)policy;

            boolean implicitEnabled = sortingPolicy.getImplicitDownCycleTraversal();
            sortingPolicy.setImplicitDownCycleTraversal(false);

            Component result = null;
            String action = (String)getValue(NAME);
            if ("navigateNext".equals(action)) {
                result = policy.getComponentAfter(ancestor, desktop);
            } else if ("navigatePrevious".equals(action)) {
                result = policy.getComponentBefore(ancestor, desktop);
            }

            sortingPolicy.setImplicitDownCycleTraversal(implicitEnabled);

            if (result != null) {
                result.requestFocus();
            }
        }
View Full Code Here

TOP

Related Classes of javax.swing.SortingFocusTraversalPolicy$NextComponentFinder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.