List of usage examples for javax.swing JToggleButton isEnabled
public boolean isEnabled()
From source file:krasa.formatter.plugin.ProjectSettingsForm.java
private void enabledBy(@NotNull JComponent[] targets, @NotNull JToggleButton... control) { boolean b = true; for (JToggleButton jToggleButton : control) { b = b && (jToggleButton.isEnabled() && jToggleButton.isSelected()); }//from w w w . ja v a 2 s.c o m for (JComponent target : targets) { target.setEnabled(b); } }
From source file:krasa.formatter.plugin.ProjectSettingsForm.java
private void enabledByAny(@NotNull JComponent[] targets, @NotNull JToggleButton... control) { boolean b = false; for (JToggleButton jToggleButton : control) { b = b || (jToggleButton.isEnabled() && jToggleButton.isSelected()); }//ww w .ja v a2 s .c om for (JComponent target : targets) { target.setEnabled(b); } }
From source file:krasa.formatter.plugin.ProjectSettingsForm.java
private void enabledByAny(@NotNull JComponent[] targets, @NotNull JToggleButton[] negated, @NotNull JToggleButton... control) { boolean b = false; for (JToggleButton jToggleButton : control) { b = b || (jToggleButton.isEnabled() && jToggleButton.isSelected()); }/*from ww w . j a v a2s . c om*/ for (JToggleButton jToggleButton : negated) { b = b || (jToggleButton.isEnabled() && !jToggleButton.isSelected()); } for (JComponent target : targets) { target.setEnabled(b); } }