Java Code Examples for javax.swing.JComponent#AccessibleJComponent
The following examples show how to use
javax.swing.JComponent#AccessibleJComponent .
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: netbeans File: ProfilerWindow.java License: Apache License 2.0 | 6 votes |
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new JComponent.AccessibleJComponent() { public AccessibleRole getAccessibleRole() { return AccessibleRole.PANEL; } public String getAccessibleName() { return Bundle.ProfilerWindow_accessName(getDisplayName()); } public String getAccessibleDescription() { ProfilerFeature selected = featuresView == null ? null : featuresView.getSelectedFeature(); return selected == null ? WelcomePanel.CAPTION : (selected.getName() + " " + selected.getDescription()); // NOI18N } }; } return accessibleContext; }
Example 2
Source Project: visualvm File: ProfilerWindow.java License: GNU General Public License v2.0 | 6 votes |
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new JComponent.AccessibleJComponent() { public AccessibleRole getAccessibleRole() { return AccessibleRole.PANEL; } public String getAccessibleName() { return Bundle.ProfilerWindow_accessName(getDisplayName()); } public String getAccessibleDescription() { ProfilerFeature selected = featuresView == null ? null : featuresView.getSelectedFeature(); return selected == null ? WelcomePanel.CAPTION : (selected.getName() + " " + selected.getDescription()); // NOI18N } }; } return accessibleContext; }
Example 3
Source Project: dragonwell8_jdk File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 4
Source Project: TencentKona-8 File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 5
Source Project: jdk8u60 File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 6
Source Project: openjdk-jdk8u File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 7
Source Project: netbeans File: BaseRenderer.java License: Apache License 2.0 | 5 votes |
protected AccessibleContext createAccesibleContext() { return new JComponent.AccessibleJComponent() { public AccessibleRole getAccessibleRole() { return AccessibleRole.LABEL; } public String getAccessibleName() { return BaseRenderer.this.toString(); } }; }
Example 8
Source Project: openjdk-jdk8u-backup File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 9
Source Project: openjdk-jdk9 File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 10
Source Project: jdk8u-jdk File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 11
Source Project: hottub File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 12
Source Project: openjdk-8-source File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 13
Source Project: visualvm File: BaseRenderer.java License: GNU General Public License v2.0 | 5 votes |
protected AccessibleContext createAccesibleContext() { return new JComponent.AccessibleJComponent() { public AccessibleRole getAccessibleRole() { return AccessibleRole.LABEL; } public String getAccessibleName() { return BaseRenderer.this.toString(); } }; }
Example 14
Source Project: openjdk-8 File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 15
Source Project: jdk8u_jdk File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 16
Source Project: jdk8u-jdk File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 17
Source Project: jdk8u-dev-jdk File: JTableAccessibleGetLocationOnScreen.java License: GNU General Public License v2.0 | 5 votes |
private static void assertGetLocation() { // the frame is now invisible // test getLocationOnScreen() of // JTable$AccessibleJTable$AccessibleJTableHeaderCell // and JTable$AccessibleJTable$AccessibleJTableCell AccessibleTable accessibleTable = (AccessibleTable) table .getAccessibleContext(); AccessibleTable header = accessibleTable.getAccessibleColumnHeader(); AccessibleComponent accessibleComp1 = (AccessibleComponent) header .getAccessibleAt(0, 0); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp1.getLocationOnScreen()) { throw new RuntimeException( "JTable$AccessibleJTable$AccessibleJTableHeaderCell." + "getLocation() must be null"); } JComponent.AccessibleJComponent accessibleJComponent = (JComponent.AccessibleJComponent) table.getAccessibleContext(); AccessibleComponent accessibleComp2 = (AccessibleComponent) accessibleJComponent.getAccessibleChild(3); // getLocation() must be null according to its javadoc and no exception // is thrown if (null != accessibleComp2.getLocationOnScreen()) { throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null"); } }
Example 18
Source Project: netbeans File: ProfilerTreeTable.java License: Apache License 2.0 | 4 votes |
public AccessibleContext getAccessibleContext() { TreeCellRenderer renderer = getCellRenderer(); return renderer instanceof Accessible ? ((Accessible)renderer).getAccessibleContext() : new JComponent.AccessibleJComponent() {}; }
Example 19
Source Project: visualvm File: ProfilerTreeTable.java License: GNU General Public License v2.0 | 4 votes |
public AccessibleContext getAccessibleContext() { TreeCellRenderer renderer = getCellRenderer(); return renderer instanceof Accessible ? ((Accessible)renderer).getAccessibleContext() : new JComponent.AccessibleJComponent() {}; }