@Test public void setStyleShouldSelectButton() throws Exception { final JRadioButtonFixture fixture = findRadioButtonByName("settings.name.style.moshi"); fixture.requireEnabled(); fixture.requireNotSelected(); underTest.setStyle(Style.MOSHI); final JRadioButton radioButton = fixture.target(); assertThat(radioButton.isSelected()).isTrue(); }
public void setStyle(@Nonnull Style style) { getStyleButtonStream().forEach(button -> { final String text = button.getText(); button.setSelected(style.name().equalsIgnoreCase(text)); }); }
SettingsPanel implements Disposable, ActionListener, DocumentListener { public void setStyle(@Nonnull Style style) { getStyleButtonStream().forEach(button -> { final String text = button.getText(); button.setSelected(style.name().equalsIgnoreCase(text)); }); } }
SettingsPanel implements Disposable, ActionListener, DocumentListener { public void setStyle(@Nonnull Style style) { getStyleButtonStream().forEach(button -> { final String text = button.getText(); button.setSelected(style.name().equalsIgnoreCase(text)); }); } SettingsPanel(); }
SettingsPanel implements Disposable, ActionListener, DocumentListener { public void setStyle(@Nonnull Style style) { getStyleButtonStream().forEach(button -> { final String text = button.getText(); button.setSelected(style.name().equalsIgnoreCase(text)); }); } SettingsPanel(); @Override void dispose(); @Override void actionPerformed(@Nonnull ActionEvent event); @Override void insertUpdate(@Nonnull DocumentEvent event); @Override void removeUpdate(@Nonnull DocumentEvent event); @Override void changedUpdate(@Nonnull DocumentEvent event); @Nonnull @CheckReturnValue JComponent getComponent(); @Nonnull @CheckReturnValue Style getStyle(); void setStyle(@Nonnull Style style); @Nonnull @CheckReturnValue String getClassNamePrefix(); void setClassNamePrefix(@Nonnull String prefix); @Nonnull @CheckReturnValue String getClassNameSuffix(); void setClassNameSuffix(@Nonnull String suffix); @CheckReturnValue boolean isGeneratedAnnotationEnabled(); void setGeneratedAnnotationEnabled(boolean enabled); @CheckReturnValue boolean isSuppressWarningsAnnotationEnabled(); void setSuppressWarningsAnnotationEnabled(boolean enabled); void setPreviewText(@Nonnull String text); }
SettingsPanel implements Disposable, ActionListener, DocumentListener { public void setStyle(@Nonnull Style style) { getStyleButtonStream().forEach(button -> { final String text = button.getText(); button.setSelected(style.name().equalsIgnoreCase(text)); }); } SettingsPanel(); @Override void dispose(); @Override void actionPerformed(@Nonnull ActionEvent event); @Override void insertUpdate(@Nonnull DocumentEvent event); @Override void removeUpdate(@Nonnull DocumentEvent event); @Override void changedUpdate(@Nonnull DocumentEvent event); @Nonnull @CheckReturnValue JComponent getComponent(); @Nonnull @CheckReturnValue Style getStyle(); void setStyle(@Nonnull Style style); @Nonnull @CheckReturnValue String getClassNamePrefix(); void setClassNamePrefix(@Nonnull String prefix); @Nonnull @CheckReturnValue String getClassNameSuffix(); void setClassNameSuffix(@Nonnull String suffix); @CheckReturnValue boolean isGeneratedAnnotationEnabled(); void setGeneratedAnnotationEnabled(boolean enabled); @CheckReturnValue boolean isSuppressWarningsAnnotationEnabled(); void setSuppressWarningsAnnotationEnabled(boolean enabled); void setPreviewText(@Nonnull String text);  }