|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.swing.fixture.ComponentFixture<T>
T - the type of Component that this fixture can manage.public abstract class ComponentFixture<T extends Component>
Understands functional testing of s:
Component
| Field Summary | |
|---|---|
protected static String |
BACKGROUND_PROPERTY
Name of the property "background". |
protected static String |
FONT_PROPERTY
Name of the property "font". |
protected static String |
FOREGROUND_PROPERTY
Name of the property "foreground". |
Robot |
robot
Performs simulation of user events on |
T |
target
This fixture's . |
| Constructor Summary | |
|---|---|
ComponentFixture(Robot robot,
Class<? extends T> type)
Creates a new . |
|
ComponentFixture(Robot robot,
String name,
Class<? extends T> type)
Creates a new . |
|
ComponentFixture(Robot robot,
T target)
Creates a new . |
|
| Method Summary | ||
|---|---|---|
ColorFixture |
background()
Returns a fixture that verifies the background color of this fixture's . |
|
T |
component()
Returns the GUI component in this fixture (same as .) |
|
FontFixture |
font()
Returns a fixture that verifies the font of this fixture's . |
|
ColorFixture |
foreground()
Returns a fixture that verifies the foreground color of this fixture's . |
|
protected boolean |
requireShowing()
Returns whether showing components are the only ones participating in a component lookup. |
|
|
targetCastedTo(Class<C> type)
Returns this fixture's casted to the given sub-type. |
|
protected static void |
validateNotNull(ComponentDriver driver)
Validates that the given is not null. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String FONT_PROPERTY
protected static final String BACKGROUND_PROPERTY
protected static final String FOREGROUND_PROPERTY
public final Robot robot
target
public final T extends Component target
Component.
Note: Access to this GUI component must be executed in the event dispatch thread. To do
so, please execute a or
GuiQuery (depending on what you need to do,) inside a
GuiTask. To learn more about Swing threading, please read the
Swing Threading Policy.
GuiActionRunner
| Constructor Detail |
|---|
public ComponentFixture(Robot robot,
Class<? extends T> type)
ComponentFixture.
robot - performs simulation of user events on a Component.type - the type of the Component to find using the given RobotFixture.
NullPointerException - if robot is null.
NullPointerException - if type is null.
ComponentLookupException - if a matching component could not be found.
ComponentLookupException - if more than one matching component is found.
public ComponentFixture(Robot robot,
String name,
Class<? extends T> type)
ComponentFixture.
robot - performs simulation of user events on a Component.name - the name of the Component to find using the given RobotFixture.type - the type of the Component to find using the given RobotFixture.
NullPointerException - if robot is null.
NullPointerException - if type is null.
ComponentLookupException - if a matching component could not be found.
ComponentLookupException - if more than one matching component is found.
public ComponentFixture(Robot robot,
T target)
ComponentFixture.
robot - performs simulation of user events on the given Component.target - the Component to be managed by this fixture.
NullPointerException - if robot is null.
NullPointerException - if target is null.| Method Detail |
|---|
protected static void validateNotNull(ComponentDriver driver)
ComponentDriver is not null.
driver - the ComponentDriver to validate.
NullPointerException - if driver is null.protected boolean requireShowing()
component lookup scope stored in this
fixture's Robot.
true if only showing components can participate in a component lookup, false
otherwise.public final FontFixture font()
Component.
Component.public final ColorFixture background()
Component.
Component.public final ColorFixture foreground()
Component.
Component.public final <C extends T> C targetCastedTo(Class<C> type)
Component casted to the given sub-type.
C - enforces that the given type is a sub-type of the managed Component.type - the type that the managed Component will be casted to.
Component casted to the given sub-type.
AssertionError - if this fixture's Component is not an instance of the given type.public final T component()
target.)
Note: Access to the GUI component returned by this method must be executed in the event
dispatch thread. To do so, please execute a or
GuiQuery (depending on what you need to do,) inside a
GuiTask. To learn more about Swing threading, please read the
Swing Threading Policy.
GuiActionRunner
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||