Package | Description |
---|---|
student |
This package provides classes written for use in introductory
computer science courses.
|
student.testingsupport |
Modifier and Type | Method and Description |
---|---|
<T extends acm.graphics.GObject> |
GraphicTestCase.getAllGObjectsMatching(Class<T> type,
GObjectFilter filter)
Look up all
GObject s on the canvas of the
GraphicsProgram being tested by specifying their
class and a GObjectFilter . |
List<acm.graphics.GObject> |
GraphicTestCase.getAllGObjectsMatching(GObjectFilter filter)
Look up all
GObject s on the canvas of the
GraphicsProgram being tested by specifying
a GObjectFilter . |
<T extends acm.graphics.GObject> |
GraphicTestCase.getFirstGObjectMatching(Class<T> type,
GObjectFilter filter)
Look up a
GObject on the canvas of the GraphicsProgram
being tested by specifying its class and a GObjectFilter . |
acm.graphics.GObject |
GraphicTestCase.getFirstGObjectMatching(GObjectFilter filter)
|
<T extends acm.graphics.GObject> |
GraphicTestCase.getGObject(Class<T> type,
GObjectFilter filter)
Look up a
GObject on the canvas of the GraphicsProgram
being tested by specifying its class and a GObjectFilter . |
acm.graphics.GObject |
GraphicTestCase.getGObject(GObjectFilter filter)
Look up a
GObject on the canvas of the GraphicsProgram
being tested, using a filter to specify which GObject you want. |
Modifier and Type | Method and Description |
---|---|
GObjectFilter |
GObjectFilter.and(GObjectFilter otherFilter)
The "and" operator for combining filters, when you want to use
parentheses to group its righthand argument.
|
protected abstract GObjectFilter |
GObjectFilter.Operator.applySelfTo(GObjectFilter otherFilter)
Concrete subclasses must override this to implement an
operation on the filter being passed in to transform it into
another filter.
|
protected GObjectFilter |
GObjectFilter.BinaryOperator.applySelfTo(GObjectFilter otherFilter)
Implements a composite filter based on a binary operation,
where the "left"/"first" filter is the parent from which this
class was created, and the "right"/"second" filter is the
argument supplied to this operation.
|
GObjectFilter |
GObjectFilter.Operator.cointainsPoint(double x,
double y)
Create a filter that checks that a GObject contains
the given point.
|
GObjectFilter |
GObjectFilter.Operator.cointainsPoint(acm.graphics.GPoint point)
Create a filter that checks that a GObject contains
the given point.
|
GObjectFilter |
GObjectFilter.Operator.colorIs(Color color)
Create a filter that checks a GObject's color.
|
GObjectFilter |
GObjectFilter.Operator.fillColorIs(Color color)
Create a filter that checks a GObject's fill color.
|
GObjectFilter |
GObjectFilter.Operator.filledIs(boolean filled)
Create a filter that checks whether a GObject is filled.
|
GObjectFilter |
GObjectFilter.Operator.heightIs(double value)
Create a filter that checks a GObject's height.
|
GObjectFilter |
GObjectFilter.Operator.isContainedWithin(Rectangle region)
Create a filter that checks whether a GObject's bounding box
(as returned by
GObject.getBounds() ) lies within a
specific rectangle--that is, whether the entire GObject's area,
rather than just its top left corner, lies within the specified
region. |
GObjectFilter |
GObjectFilter.Operator.isLocatedWithin(Rectangle region)
Create a filter that checks whether a GObject's location (its
top left corner) lies within a specific rectangle.
|
GObjectFilter |
GObjectFilter.Operator.isNear(double x,
double y)
Create a filter that checks that a GObject is within 50
pixels of the given point.
|
GObjectFilter |
GObjectFilter.Operator.isNear(double x,
double y,
double distance)
Create a filter that checks that a GObject is within
distance pixels of the given point.
|
GObjectFilter |
GObjectFilter.Operator.isNear(acm.graphics.GPoint point)
Create a filter that checks that a GObject is within 50
pixels of the given point.
|
GObjectFilter |
GObjectFilter.Operator.isNear(acm.graphics.GPoint point,
double distance)
Create a filter that checks that a GObject is within
distance pixels of the given point.
|
GObjectFilter |
GObjectFilter.Operator.lineEndPointIs(double x,
double y)
Create a filter that checks that a GPoint is a line
that ends at the point (x, y).
|
GObjectFilter |
GObjectFilter.Operator.lineEndPointIs(acm.graphics.GPoint point)
Create a filter that checks that a GOBject is a line
that ends at point.
|
GObjectFilter |
GObjectFilter.Operator.lineStartPointIs(double x,
double y)
Create a filter that checks that a GPoint is a line
that starts at the point (x, y).
|
GObjectFilter |
GObjectFilter.Operator.lineStartPointIs(acm.graphics.GPoint point)
Create a filter that checks that a GOBject is a line
that starts at point.
|
GObjectFilter |
GObjectFilter.Operator.locationIs(double x,
double y)
Create a filter that checks a GObject's location relative to
its parent.
|
GObjectFilter |
GObjectFilter.Operator.locationIs(acm.graphics.GPoint point)
Create a filter that checks a GObject's location relative to
its parent.
|
GObjectFilter |
GObjectFilter.BinaryOperator.not(GObjectFilter otherFilter)
The "not" operator for negating an existing filter, when you
want to use parentheses to group its righthand argument.
|
static GObjectFilter |
GObjectFilter.ClientImports.not(GObjectFilter otherFilter)
The "not" operator for negating an existing filter, when the not
operation is at the very beginning of the expression.
|
GObjectFilter |
GObjectFilter.or(GObjectFilter otherFilter)
The "or" operator for combining filters, when you want to use
parentheses to group its righthand argument.
|
GObjectFilter |
GObjectFilter.Operator.sizeIs(double width,
double height)
Create a filter that checks a GObject's size.
|
GObjectFilter |
GObjectFilter.Operator.sizeIsWithin(double maxWidth,
double maxHeight)
Create a filter that checks a GObject's size.
|
GObjectFilter |
GObjectFilter.Operator.textIs(String text)
Create a filter that checks the text of a GObject by calling the
GObject's
getText() method. |
GObjectFilter |
GObjectFilter.Operator.typeIs(Class<? extends acm.graphics.GObject> aClass)
Create a filter that checks the class of a GObject.
|
GObjectFilter |
GObjectFilter.Operator.visibilityIs(boolean visibility)
Create a filter that checks a GObject's visibilty.
|
GObjectFilter |
GObjectFilter.Operator.widthIs(double value)
Create a filter that checks a GObject's width.
|
GObjectFilter |
GObjectFilter.Operator.xLocationIs(double x)
Create a filter that checks a GObject's x-coordinate.
|
GObjectFilter |
GObjectFilter.Operator.yLocationIs(double y)
Create a filter that checks a GObject's y-coordinate.
|
Modifier and Type | Method and Description |
---|---|
GObjectFilter |
GObjectFilter.and(GObjectFilter otherFilter)
The "and" operator for combining filters, when you want to use
parentheses to group its righthand argument.
|
protected abstract GObjectFilter |
GObjectFilter.Operator.applySelfTo(GObjectFilter otherFilter)
Concrete subclasses must override this to implement an
operation on the filter being passed in to transform it into
another filter.
|
protected GObjectFilter |
GObjectFilter.BinaryOperator.applySelfTo(GObjectFilter otherFilter)
Implements a composite filter based on a binary operation,
where the "left"/"first" filter is the parent from which this
class was created, and the "right"/"second" filter is the
argument supplied to this operation.
|
GObjectFilter |
GObjectFilter.BinaryOperator.not(GObjectFilter otherFilter)
The "not" operator for negating an existing filter, when you
want to use parentheses to group its righthand argument.
|
static GObjectFilter |
GObjectFilter.ClientImports.not(GObjectFilter otherFilter)
The "not" operator for negating an existing filter, when the not
operation is at the very beginning of the expression.
|
GObjectFilter |
GObjectFilter.or(GObjectFilter otherFilter)
The "or" operator for combining filters, when you want to use
parentheses to group its righthand argument.
|