public class JLabelFixture extends AbstractJPopupMenuInvokerFixture<JLabelFixture,JLabel,JLabelDriver> implements TextDisplayFixture<JLabelFixture>
JLabels.BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY| Constructor and Description |
|---|
JLabelFixture(Robot robot,
JLabel target)
Creates a new
JLabelFixture. |
JLabelFixture(Robot robot,
String labelName)
Creates a new
JLabelFixture. |
| Modifier and Type | Method and Description |
|---|---|
protected JLabelDriver |
createDriver(Robot robot) |
JLabelFixture |
requireText(Pattern pattern)
Asserts that the text of this fixture's
JLabel matches the given regular expression pattern. |
JLabelFixture |
requireText(String expected)
Asserts that the text of this fixture's
JLabel is equal to the specified String. |
String |
text() |
showPopupMenu, showPopupMenuAtclientProperty, requireToolTip, requireToolTipbackground, click, click, click, doubleClick, driver, focus, font, foreground, isEnabled, myself, pressAndReleaseKey, pressAndReleaseKeys, pressKey, releaseKey, replaceDriverWith, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireShowing, requireVisible, rightClick, robot, target, targetCastedTopublic JLabelFixture(@Nonnull Robot robot, @Nonnull JLabel target)
JLabelFixture.robot - performs simulation of user events on the given JLabel.target - the JLabel to be managed by this fixture.NullPointerException - if robot is null.NullPointerException - if target is null.public JLabelFixture(@Nonnull Robot robot, @Nullable String labelName)
JLabelFixture.robot - performs simulation of user events on a JLabel.labelName - the name of the JLabel to find using the given Robot.NullPointerException - if robot is null.ComponentLookupException - if a matching JLabel could not be found.ComponentLookupException - if more than one matching JLabel is found.@Nonnull protected JLabelDriver createDriver(@Nonnull Robot robot)
createDriver in class AbstractComponentFixture<JLabelFixture,JLabel,JLabelDriver>@Nullable public String text()
text in interface TextDisplayFixture<JLabelFixture>JLabel.@Nonnull public JLabelFixture requireText(@Nullable String expected)
JLabel is equal to the specified String.requireText in interface TextDisplayFixture<JLabelFixture>expected - the text to match.AssertionError - if the text of this fixture's JLabel is not equal to the given one.@Nonnull public JLabelFixture requireText(@Nonnull Pattern pattern)
JLabel matches the given regular expression pattern.requireText in interface TextDisplayFixture<JLabelFixture>pattern - the regular expression pattern to match.AssertionError - if the text of this fixture's JLabel does not match the given regular expression
pattern.NullPointerException - if the given regular expression pattern is null.Copyright © 2014 AssertJ. All rights reserved.