/** * Returns whether showing components are the only ones participating in a component lookup. The returned value is * obtained from the {@link org.assertj.swing.core.Settings#componentLookupScope() component lookup scope} stored in * this fixture's {@link Robot}. * * @return {@code true} if only showing components can participate in a component lookup, {@code false} otherwise. */ protected boolean requireShowing() { return requireShowing(robot()); }
@Nonnull private static <C extends Component> C findTarget(@Nonnull Robot robot, @Nullable String name, @Nonnull Class<? extends C> type) { checkNotNull(robot); checkNotNull(type); return robot.finder().findByName(name, type, requireShowing(robot)); }
@Nonnull private static <C extends Component> C findTarget(@Nonnull Robot robot, @Nonnull Class<? extends C> type) { checkNotNull(robot); checkNotNull(type); return robot.finder().findByType(type, requireShowing(robot)); }