src/nl/knokko/gui/testing/GuiTestHelper.java
/**
	 * Checks the checkbox closest to the commponent with the given text. The total amount of checkboxes is 
	 * needed to make sure all checkbox are taken into account. If it is already checked, a TestException is 
	 * thrown.
	 * @param nearest The text of the component the target checkbox should be close to
	 * @param totalAmount The total amount of checkboxes in the window
	 */
Checks the checkbox closest to the commponent with the given text. The total amount of checkboxes is
needed to make sure all checkbox are taken into account. If it is already checked, a TestException is
thrown.
@param nearest The text of the component the target checkbox should be close to
@param totalAmount The total amount of checkboxes in the window
Checks the checkbox closest to the commponent with the given text . The total amount of checkboxes is needed to make sure all checkbox are taken into account . If it is already checked a TestException is thrown . @param nearest The text of the component the target checkbox should be close to @param totalAmount The total amount of checkboxes in the window
public void check(String nearest, int totalAmount) {
		CheckableComponent.Pair checkbox = getCheckbox(nearest, totalAmount);
		if (checkbox.isChecked()) {
			throw new TestException("The checkbox closest to " + nearest + " is already checked");
		} else {
			Point2D.Float location = checkbox.getCenter();
			click(location.x, location.y);
		}
	}
public void check ( String nearest , int totalAmount ) { CheckableComponent . Pair checkbox = getCheckbox ( nearest , totalAmount ) ; if ( checkbox . isChecked ( ) ) { throw new TestException ( "The checkbox closest to " + nearest + " is already checked" ) ; } else { Point2D . Float location = checkbox . getCenter ( ) ; click ( location . x , location . y ) ; } }
Checks the checkbox closest to the commponent with the given text.
Checks the checkbox closest to the commponent with the given text .