S - used to simulate "self types." For more information please read "Emulating 'self types' using Java Generics to simplify fluent API implementation."T - the type of JComponent that this fixture can manage.D - the type of JComponentDriver that this fixture uses internally.public abstract class AbstractJPopupMenuInvokerFixture<S,T extends JComponent,D extends JComponentDriver> extends AbstractJComponentFixture<S,T,D> implements JPopupMenuInvokerFixture
JComponents capable of invoking JPopupMenus.BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY| Constructor and Description |
|---|
AbstractJPopupMenuInvokerFixture(Class<S> selfType,
Robot robot,
Class<? extends T> type)
Creates a new
AbstractJPopupMenuInvokerFixture. |
AbstractJPopupMenuInvokerFixture(Class<S> selfType,
Robot robot,
String name,
Class<? extends T> type)
Creates a new
AbstractJPopupMenuInvokerFixture. |
AbstractJPopupMenuInvokerFixture(Class<S> selfType,
Robot robot,
T target)
Creates a new
AbstractJPopupMenuInvokerFixture. |
| Modifier and Type | Method and Description |
|---|---|
JPopupMenuFixture |
showPopupMenu()
Shows a pop-up menu using this fixture's
JComponent as the invoker of the pop-up menu. |
JPopupMenuFixture |
showPopupMenuAt(Point p)
Shows a pop-up menu at the given point using this fixture's
JComponent as the invoker of the pop-up menu. |
clientProperty, requireToolTip, requireToolTipbackground, click, click, click, createDriver, doubleClick, driver, focus, font, foreground, isEnabled, myself, pressAndReleaseKey, pressAndReleaseKeys, pressKey, releaseKey, replaceDriverWith, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireShowing, requireVisible, rightClick, robot, target, targetCastedTopublic AbstractJPopupMenuInvokerFixture(@Nonnull Class<S> selfType, @Nonnull Robot robot, @Nonnull Class<? extends T> type)
AbstractJPopupMenuInvokerFixture.selfType - the "self type."robot - performs simulation of user events on a JComponent.type - the type of the JComponent to find using the given Robot.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 AbstractJPopupMenuInvokerFixture(@Nonnull Class<S> selfType, @Nonnull Robot robot, @Nullable String name, @Nonnull Class<? extends T> type)
AbstractJPopupMenuInvokerFixture.selfType - the "self type."robot - performs simulation of user events on a JComponent.name - the name of the JComponent to find using the given Robot.type - the type of the JComponent to find using the given Robot.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 AbstractJPopupMenuInvokerFixture(@Nonnull Class<S> selfType, @Nonnull Robot robot, @Nonnull T target)
AbstractJPopupMenuInvokerFixture.selfType - the "self type."robot - performs simulation of user events on the given JComponent.target - the JComponent to be managed by this fixture.NullPointerException - if robot is null.NullPointerException - if target is null.@Nonnull public JPopupMenuFixture showPopupMenu()
JComponent as the invoker of the pop-up menu.showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's JComponent is disabled.IllegalStateException - if this fixture's JComponent is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.@Nonnull public JPopupMenuFixture showPopupMenuAt(@Nonnull Point p)
JComponent as the invoker of the pop-up menu.showPopupMenuAt in interface JPopupMenuInvokerFixturep - the given point where to show the pop-up menu.IllegalStateException - if this fixture's JComponent is disabled.IllegalStateException - if this fixture's JComponent is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.Copyright © 2014 AssertJ. All rights reserved.