Search in sources :

Example 1 with AccessibleTable

use of javax.accessibility.AccessibleTable in project jdk8u_jdk by JetBrains.

the class JTableAccessibleGetLocationOnScreen method assertGetLocation.

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);
    // 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);
    // is thrown
    if (null != accessibleComp2.getLocationOnScreen()) {
        throw new RuntimeException("JTable$AccessibleJTable$" + "AccessibleJTableCell.getLocation() must be null");
    }
}
Also used : AccessibleComponent(javax.accessibility.AccessibleComponent) JComponent(javax.swing.JComponent) AccessibleTable(javax.accessibility.AccessibleTable)

Aggregations

AccessibleComponent (javax.accessibility.AccessibleComponent)1 AccessibleTable (javax.accessibility.AccessibleTable)1 JComponent (javax.swing.JComponent)1