
org.fernice.reflare.ui.FlareRadioButtonUI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fernice-reflare Show documentation
Show all versions of fernice-reflare Show documentation
CSS integration through fernice-flare in Java Swing as a LookAndFeel
package org.fernice.reflare.ui;
import fernice.reflare.StyledImageIcon;
import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.JRadioButton;
import javax.swing.plaf.ComponentUI;
import org.fernice.reflare.element.ButtonElement;
import org.fernice.reflare.element.RadioButtonElement;
import org.fernice.reflare.meta.DefinedBy;
import org.fernice.reflare.meta.DefinedBy.Api;
@SuppressWarnings("unused")
public class FlareRadioButtonUI extends FlareToggleButtonUI {
@DefinedBy(Api.LOOK_AND_FEEL)
public static ComponentUI createUI(JComponent c) {
return new FlareRadioButtonUI();
}
@Override
protected void installDefaults(AbstractButton button) {
super.installDefaults(button);
button.setIcon(StyledImageIcon.fromResource("/reflare/icons/radio.png"));
button.setSelectedIcon(StyledImageIcon.fromResource("/reflare/icons/radio-checked.png"));
}
@Override
protected ButtonElement createElement(AbstractButton button) {
return new RadioButtonElement((JRadioButton) button);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy