GT-3054: Updated function tag panel to include table showing all

functions using a tag
This commit is contained in:
adamopolous 2019-08-12 10:26:30 -04:00
parent 4496e51b0b
commit bddb1a5518
21 changed files with 1111 additions and 370 deletions

View file

@ -15,7 +15,7 @@
*/
package generic.test;
import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;
import java.awt.*;
import java.awt.event.*;
@ -1296,6 +1296,46 @@ public abstract class AbstractGenericTest extends AbstractGTest {
waitForSwing();
}
/**
* Clicks a range of items in a list (simulates holding SHIFT and selecting
* each item in the range in-turn)
*
* @param list the list to select from
* @param row the initial index
* @param count the number of rows to select
* @throws Exception if there's a problem simulating the click
*/
public static void clickListRange(final JList list, final int row, int count)
throws Exception {
waitForSwing();
for (int i = row; i < row + count; i++) {
Rectangle rect = list.getCellBounds(i, i);
clickMouse(list, MouseEvent.BUTTON1, rect.x + 10, rect.y + 10, 1,
InputEvent.SHIFT_DOWN_MASK);
}
waitForSwing();
}
/**
* Clicks a range of items in a table (simulates holding SHIFT and selecting
* each item in the range)
*
* @param table the table to select
* @param row the starting row index
* @param count the number of rows to select
* @throws Exception
*/
public static void clickTableRange(final JTable table, final int row, int count)
throws Exception {
waitForSwing();
for (int i = row; i < row + count; i++) {
Rectangle rect = table.getCellRect(i, 0, true);
clickMouse(table, MouseEvent.BUTTON1, rect.x + 10, rect.y + 10, 1,
InputEvent.SHIFT_DOWN_MASK);
}
waitForSwing();
}
public static TableCellEditor editCell(final JTable table, final int row, final int col) {
waitForSwing();