package tmaestroplayer.template;

import javax.swing.ImageIcon;

/**
 *
 * @author Gonzalo
 */
public class ImageButton extends javax.swing.JRadioButton {

    private ImageIcon normalStateIcon = null;
    private ImageIcon focusedStateIcon = null;
    private ImageIcon actionedStateIcon = null;
    private String buttonName;

    public void setNormalIcon() {
        if (this.normalStateIcon != null) {
            setIcon(normalStateIcon);
        }
    }

    public void setFocusedIcon() {
        if (this.focusedStateIcon != null) {
            setIcon(focusedStateIcon);
        }
    }

    public void setActionedIcon() {
        if (this.actionedStateIcon != null) {
            setIcon(actionedStateIcon);
        }
    }

    /**
     * @param normalStateIcon the normalStateIcon to set
     */
    public void setNormalStateIcon(ImageIcon normalStateIcon) {
        this.normalStateIcon = normalStateIcon;

    }

    /**
     * @param focusedStateIcon the focusedStateIcon to set
     */
    public void setFocusedStateIcon(ImageIcon focusedStateIcon) {
        this.focusedStateIcon = focusedStateIcon;
    }

    /**
     * @param actionedStateIcon the actionedStateIcon to set
     */
    public void setActionedStateIcon(ImageIcon actionedStateIcon) {
        this.actionedStateIcon = actionedStateIcon;
    }

    /**
     * @return the buttonName
     */
    public String getButtonName() {
        return buttonName;
    }

    /**
     * @param buttonName the buttonName to set
     */
    public void setButtonName(String buttonName) {
        this.buttonName = buttonName;
    }
}
