Java Code Examples for java.awt.Container#getFocusCycleRootAncestor()
The following examples show how to use
java.awt.Container#getFocusCycleRootAncestor() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultFocusManager.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public Component getFirstComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getFirstComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getFirstComponent(root); } return null; }
Example 2
Source File: DefaultFocusManager.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Returns the component before. * @return the component before * @param aContainer a container * @param aComponent a component */ public Component getComponentBefore(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentBefore(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentBefore(root, aComponent); } return null; }
Example 3
Source File: DefaultFocusManager.java From hottub with GNU General Public License v2.0 | 6 votes |
public Component getComponentAfter(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentAfter(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentAfter(root, aComponent); } return null; }
Example 4
Source File: DefaultFocusManager.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public Component getFirstComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getFirstComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getFirstComponent(root); } return null; }
Example 5
Source File: DefaultFocusManager.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public Component getLastComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getLastComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getLastComponent(root); } return null; }
Example 6
Source File: DefaultFocusManager.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public Component getLastComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getLastComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getLastComponent(root); } return null; }
Example 7
Source File: DefaultFocusManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Returns the first component. * @return the first component * @param aContainer a container */ public Component getFirstComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getFirstComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getFirstComponent(root); } return null; }
Example 8
Source File: DefaultFocusManager.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public Component getComponentAfter(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentAfter(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentAfter(root, aComponent); } return null; }
Example 9
Source File: DefaultFocusManager.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public Component getComponentBefore(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentBefore(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentBefore(root, aComponent); } return null; }
Example 10
Source File: DefaultFocusManager.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public Component getLastComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getLastComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getLastComponent(root); } return null; }
Example 11
Source File: DefaultFocusManager.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public Component getLastComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getLastComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getLastComponent(root); } return null; }
Example 12
Source File: DefaultFocusManager.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public Component getComponentAfter(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentAfter(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentAfter(root, aComponent); } return null; }
Example 13
Source File: DefaultFocusManager.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public Component getComponentAfter(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentAfter(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentAfter(root, aComponent); } return null; }
Example 14
Source File: DefaultFocusManager.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public Component getComponentBefore(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentBefore(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentBefore(root, aComponent); } return null; }
Example 15
Source File: DefaultFocusManager.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public Component getFirstComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getFirstComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getFirstComponent(root); } return null; }
Example 16
Source File: DefaultFocusManager.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public Component getComponentAfter(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentAfter(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentAfter(root, aComponent); } return null; }
Example 17
Source File: DefaultFocusManager.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public Component getLastComponent(Container aContainer) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getLastComponent(root); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getLastComponent(root); } return null; }
Example 18
Source File: DefaultFocusManager.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Returns the component after. * @return the component after * @param aContainer a container * @param aComponent a component */ public Component getComponentAfter(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentAfter(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentAfter(root, aComponent); } return null; }
Example 19
Source File: DefaultFocusManager.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public Component getComponentBefore(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentBefore(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentBefore(root, aComponent); } return null; }
Example 20
Source File: DefaultFocusManager.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public Component getComponentBefore(Container aContainer, Component aComponent) { Container root = (aContainer.isFocusCycleRoot()) ? aContainer : aContainer.getFocusCycleRootAncestor(); // Support for mixed 1.4/pre-1.4 focus APIs. If a particular root's // traversal policy is non-legacy, then honor it. if (root != null) { FocusTraversalPolicy policy = root.getFocusTraversalPolicy(); if (policy != gluePolicy) { return policy.getComponentBefore(root, aComponent); } comparator.setComponentOrientation(root.getComponentOrientation()); return layoutPolicy.getComponentBefore(root, aComponent); } return null; }