Package javax.accessibility

Examples of javax.accessibility.AccessibleAction


class ComponentPerformDefaultAccessibleActionTask {
  private static final int DEFAULT_ACTION_INDEX = 0;

  @RunsInCurrentThread
  static void performDefaultAccessibleAction(final @Nonnull Component c) {
    AccessibleAction action = c.getAccessibleContext().getAccessibleAction();
    if (action == null || action.getAccessibleActionCount() == 0) {
      throw actionFailure(concat("Unable to perform accessible action for ", format(c)));
    }
    action.doAccessibleAction(DEFAULT_ACTION_INDEX);
  }
View Full Code Here


        button.setLabel(label);
        assertEquals(label, ac.getAccessibleName());
    }

    public final void testGetAccessibleAction() {
        AccessibleAction aa = ac.getAccessibleAction();
        assertNotNull(aa);
        assertTrue(aa instanceof AccessibleAWTButton);
    }
View Full Code Here

        assertEquals("button has 1 accessible action", 1,
                     ac.getAccessibleAction().getAccessibleActionCount());
    }

    public final void testGetAccessibleActionDescription() {
        AccessibleAction aa = ac.getAccessibleAction();
        assertNull(aa.getAccessibleActionDescription(-1));
        assertEquals("click", aa.getAccessibleActionDescription(0));
        assertNull(aa.getAccessibleActionDescription(1));
    }
View Full Code Here

            }
        };
    }

    public final void testGetAccessibleAction() {
        AccessibleAction aa = ac.getAccessibleAction();
        assertNotNull(aa);
        assertTrue(aa instanceof AccessibleAWTCheckbox);
    }
View Full Code Here

            }
        };
    }

    public final void testGetAccessibleAction() {
        AccessibleAction aa = ac.getAccessibleAction();
        assertNotNull(aa);
        assertTrue(aa instanceof AccessibleAWTCheckbox);
    }
View Full Code Here

        button.setLabel(label);
        assertEquals(label, ac.getAccessibleName());
    }

    public final void testGetAccessibleAction() {
        AccessibleAction aa = ac.getAccessibleAction();
        assertNotNull(aa);
        assertTrue(aa instanceof AccessibleAWTButton);
    }
View Full Code Here

        assertEquals("button has 1 accessible action", 1,
                     ac.getAccessibleAction().getAccessibleActionCount());
    }

    public final void testGetAccessibleActionDescription() {
        AccessibleAction aa = ac.getAccessibleAction();
        assertNull(aa.getAccessibleActionDescription(-1));
        assertEquals("click", aa.getAccessibleActionDescription(0));
        assertNull(aa.getAccessibleActionDescription(1));
    }
View Full Code Here

TOP

Related Classes of javax.accessibility.AccessibleAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.