Browse Source

Add overload to make the ToggleIcon api meaningful for situations where it isn't used for enabled/disabled icons.

pull/214/head
weisj 4 years ago
parent
commit
969cf0bfc5
  1. 8
      property-loader/src/main/java/com/github/weisj/darklaf/icons/ToggleIcon.java

8
property-loader/src/main/java/com/github/weisj/darklaf/icons/ToggleIcon.java

@ -37,6 +37,14 @@ public class ToggleIcon implements Icon {
this.inactiveIcon = inactive; this.inactiveIcon = inactive;
} }
public void setChooseAlternativeIcon(final boolean chooseAlternative) {
setActive(!chooseAlternative);
}
public boolean isChooseAlternativeIcon() {
return !isActive();
}
public void setActive(final boolean active) { public void setActive(final boolean active) {
this.active = active; this.active = active;
} }

Loading…
Cancel
Save