Java Code Examples for java.awt.Component#getAccessibleContext()
The following examples show how to use
java.awt.Component#getAccessibleContext() .
These examples are extracted from open source projects.
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 Project: jdk1.8-source-analysis File: JMenu.java License: Apache License 2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 2
Source Project: jdk8u-dev-jdk File: JMenu.java License: GNU General Public License v2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 3
Source Project: jdk8u-jdk File: JMenu.java License: GNU General Public License v2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 4
Source Project: openjdk-8-source File: JMenu.java License: GNU General Public License v2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 5
Source Project: TencentKona-8 File: JMenu.java License: GNU General Public License v2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 6
Source Project: jdk8u60 File: JMenu.java License: GNU General Public License v2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 7
Source Project: openjdk-jdk8u File: JMenu.java License: GNU General Public License v2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 8
Source Project: Java8CN File: JMenu.java License: Apache License 2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 9
Source Project: openjdk-jdk8u-backup File: JMenu.java License: GNU General Public License v2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 10
Source Project: hottub File: JMenu.java License: GNU General Public License v2.0 | 6 votes |
/** * Returns the nth Accessible child of the object. * * @param i zero-based index of child * @return the nth Accessible child of the object */ public Accessible getAccessibleChild(int i) { Component[] children = getMenuComponents(); int count = 0; for (Component child : children) { if (child instanceof Accessible) { if (count == i) { if (child instanceof JComponent) { // FIXME: [[[WDW - probably should set this when // the component is added to the menu. I tried // to do this in most cases, but the separators // added by addSeparator are hard to get to.]]] AccessibleContext ac = child.getAccessibleContext(); ac.setAccessibleParent(JMenu.this); } return (Accessible) child; } else { count++; } } } return null; }
Example 11
Source Project: TencentKona-8 File: ProgressMonitor.java License: GNU General Public License v2.0 | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 12
Source Project: jdk8u60 File: ProgressMonitor.java License: GNU General Public License v2.0 | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 13
Source Project: openjdk-8-source File: ProgressMonitor.java License: GNU General Public License v2.0 | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 14
Source Project: JDKSourceCode1.8 File: ProgressMonitor.java License: MIT License | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 15
Source Project: openjdk-jdk8u-backup File: ProgressMonitor.java License: GNU General Public License v2.0 | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 16
Source Project: Bytecoder File: ProgressMonitor.java License: Apache License 2.0 | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 17
Source Project: jdk8u-jdk File: ProgressMonitor.java License: GNU General Public License v2.0 | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 18
Source Project: openjdk-jdk9 File: ProgressMonitor.java License: GNU General Public License v2.0 | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 19
Source Project: Java8CN File: ProgressMonitor.java License: Apache License 2.0 | 5 votes |
private AccessibleContext getPanelAccessibleContext() { if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { return c.getAccessibleContext(); } } return null; }
Example 20
Source Project: Bytecoder File: JTabbedPane.java License: Apache License 2.0 | 4 votes |
private void clearAccessibleParent(Component c) { AccessibleContext ac = c.getAccessibleContext(); if (ac != null) { ac.setAccessibleParent(null); } }