@Override public CountDownLatch createCountDownLatch() { returnnew CountDownLatch(1);
}
publicvoid createUI() {
INSTRUCTIONS = "INSTRUCTIONS:\n"
+ "Check a11y of JTable.\n\n"
+ "Turn screen reader on, and Tab to the table.\n"
+ "On Windows press the arrow buttons to move through the table.\n\n"
+ "On MacOS, use the up and down arrow buttons to move through rows, and VoiceOver fast navigation to move through columns.\n\n"
+ "If you can hear table cells ctrl+tab further and press PASS, otherwise press FAIL.\n";
JTable table = new JTable(data, columnNames);
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
JScrollPane scrollPane = new JScrollPane(table);
panel.add(scrollPane);
panel.setFocusable(false);
exceptionString = "AccessibleJTable test failed!"; super.createUI(panel, "AccessibleJTableTest");
}
publicvoid createUIDraggable() {
INSTRUCTIONS = "INSTRUCTIONS:\n"
+ "Check that table is properly updated when column order is changed.\n\n"
+ "Turn screen reader on, and Tab to the table.\n"
+ "Using arrow keys navigate to the last cell in the first row in the table."
+ "Screen reader should announce it as \"Column 3 row 1\"\n\n"
+ "Using mouse drag the header of the last culumn so the last column becomes the first one."
+ "Wait for the screen reader to finish announcing new position in table.\n\n"
+ "If new position in table corresponds to the new table layout ctrl+tab further "
+ "and press PASS, otherwise press FAIL.\n";
JTable table = new JTable(data, columnNames);
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
JScrollPane scrollPane = new JScrollPane(table);
panel.add(scrollPane);
panel.setFocusable(false);
exceptionString = "AccessibleJTable test failed!"; super.createUI(panel, "AccessibleJTableTest");
}
publicvoid createUINamed() {
INSTRUCTIONS = "INSTRUCTIONS:\n"
+ "Check a11y of named JTable.\n\n"
+ "Turn screen reader on, and Tab to the table.\n"
+ "Press the ctrl+tab button to move to second table.\n\n"
+ "If you can hear second table name: \"second table\" - ctrl+tab further and press PASS, otherwise press FAIL.\n";
JTable table = new JTable(data, columnNames);
JTable secondTable = new JTable(data, columnNames);
secondTable.getAccessibleContext().setAccessibleName("Second table");
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
JScrollPane scrollPane = new JScrollPane(table);
JScrollPane secondScrollPane = new JScrollPane(secondTable);
panel.add(scrollPane);
panel.add(secondScrollPane);
panel.setFocusable(false);
exceptionString = "AccessibleJTable test failed!"; super.createUI(panel, "AccessibleJTableTest");
}
publicvoid createUIWithChangingContent() {
INSTRUCTIONS = "INSTRUCTIONS:\n"
+ "Check a11y of dynamic JTable.\n\n"
+ "Turn screen reader on, and Tab to the table.\n"
+ "Add and remove rows and columns using the appropriate buttons and try to move around the table\n\n"
+ "If you hear changes in the table - ctrl+tab further and press PASS, otherwise press FAIL.\n";
JTable table = new JTable(new TestTableModel(3, 3));
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
JScrollPane scrollPane = new JScrollPane(table);
panel.add(scrollPane);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.