/** * Shows a pop-up menu at the given point using this fixture's {@code JPanel} as the invoker of the pop-up menu. * * @param p the given point where to show the pop-up menu. * @return a fixture that manages the displayed pop-up menu. * @throws IllegalStateException if {@link org.assertj.swing.core.Settings#clickOnDisabledComponentsAllowed()} is <code>false</code> and this * fixture's {@code JPanel} is disabled. * @throws IllegalStateException if this fixture's {@code JPanel} is not showing on the screen. * @throws org.assertj.swing.exception.ComponentLookupException if a pop-up menu cannot be found. */ @Override @Nonnull public JPopupMenuFixture showPopupMenuAt(@Nonnull Point p) { return new JPopupMenuFixture(robot(), driver().invokePopupMenu(target(), p)); } }
/** * Shows a pop-up menu using this fixture's {@code JPanel} as the invoker of the pop-up menu. * * @return a fixture that manages the displayed pop-up menu. * @throws IllegalStateException if {@link org.assertj.swing.core.Settings#clickOnDisabledComponentsAllowed()} is <code>false</code> and this * fixture's {@code JPanel} is disabled. * @throws IllegalStateException if this fixture's {@code JPanel} is not showing on the screen. * @throws org.assertj.swing.exception.ComponentLookupException if a pop-up menu cannot be found. */ @Override @Nonnull public JPopupMenuFixture showPopupMenu() { return new JPopupMenuFixture(robot(), driver().invokePopupMenu(target())); }