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");
}
}
Aggregations