Java Code Examples for javax.swing.JRadioButton#getIcon()

The following examples show how to use javax.swing.JRadioButton#getIcon() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JExtendedRadioButton.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static Icon getDisabledIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon disabledIcon = radio.getDisabledIcon();

    return (disabledIcon != null) ? disabledIcon : getIconSafe(radio);
}
 
Example 2
Source File: JExtendedRadioButton.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static Icon getDisabledSelectedIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon disabledSelectedIcon = radio.getDisabledSelectedIcon();

    return (disabledSelectedIcon != null) ? disabledSelectedIcon : getIconSafe(radio);
}
 
Example 3
Source File: JExtendedRadioButton.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static Icon getPressedIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon pressedIcon = radio.getPressedIcon();

    if (pressedIcon == null) {
        pressedIcon = radio.getSelectedIcon();
    }

    return (pressedIcon != null) ? pressedIcon : getIconSafe(radio);
}
 
Example 4
Source File: JExtendedRadioButton.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static Icon getRolloverIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon rolloverIcon = radio.getRolloverIcon();

    return (rolloverIcon != null) ? rolloverIcon : getIconSafe(radio);
}
 
Example 5
Source File: JExtendedRadioButton.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static Icon getRolloverSelectedIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon rolloverSelectedIcon = radio.getRolloverSelectedIcon();

    if (rolloverSelectedIcon == null) {
        rolloverSelectedIcon = radio.getSelectedIcon();
    }

    return (rolloverSelectedIcon != null) ? rolloverSelectedIcon : getIconSafe(radio);
}
 
Example 6
Source File: JExtendedRadioButton.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static Icon getSelectedIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon selectedIcon = radio.getSelectedIcon();

    return (selectedIcon != null) ? selectedIcon : getIconSafe(radio);
}
 
Example 7
Source File: JExtendedRadioButton.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private static Icon getDisabledIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon disabledIcon = radio.getDisabledIcon();

    return (disabledIcon != null) ? disabledIcon : getIconSafe(radio);
}
 
Example 8
Source File: JExtendedRadioButton.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private static Icon getDisabledSelectedIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon disabledSelectedIcon = radio.getDisabledSelectedIcon();

    return (disabledSelectedIcon != null) ? disabledSelectedIcon : getIconSafe(radio);
}
 
Example 9
Source File: JExtendedRadioButton.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private static Icon getPressedIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon pressedIcon = radio.getPressedIcon();

    if (pressedIcon == null) {
        pressedIcon = radio.getSelectedIcon();
    }

    return (pressedIcon != null) ? pressedIcon : getIconSafe(radio);
}
 
Example 10
Source File: JExtendedRadioButton.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private static Icon getRolloverIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon rolloverIcon = radio.getRolloverIcon();

    return (rolloverIcon != null) ? rolloverIcon : getIconSafe(radio);
}
 
Example 11
Source File: JExtendedRadioButton.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private static Icon getRolloverSelectedIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon rolloverSelectedIcon = radio.getRolloverSelectedIcon();

    if (rolloverSelectedIcon == null) {
        rolloverSelectedIcon = radio.getSelectedIcon();
    }

    return (rolloverSelectedIcon != null) ? rolloverSelectedIcon : getIconSafe(radio);
}
 
Example 12
Source File: JExtendedRadioButton.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private static Icon getSelectedIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    if (icon == null) {
        return getDefaultIcon();
    }

    Icon selectedIcon = radio.getSelectedIcon();

    return (selectedIcon != null) ? selectedIcon : getIconSafe(radio);
}
 
Example 13
Source File: JExtendedRadioButton.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private static Icon getIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    return (icon != null) ? icon : getDefaultIcon();
}
 
Example 14
Source File: JExtendedRadioButton.java    From visualvm with GNU General Public License v2.0 4 votes vote down vote up
private static Icon getIconSafe(JRadioButton radio) {
    Icon icon = radio.getIcon();

    return (icon != null) ? icon : getDefaultIcon();
}