//# 0 errors, 68 messages
//#
/*
    //#ImageToggleButton.java:1:1: class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#ImageToggleButton.java:1:1: method: com.dmdirc.addons.ui_swing.components.ImageToggleButton.com.dmdirc.addons.ui_swing.components.ImageToggleButton__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.addons.ui_swing.components;

import java.awt.Dimension;
import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JToggleButton;

/**
 * Image toggle button.
 */
public class ImageToggleButton extends JToggleButton {
    
    /**
     * A version number for this class. It should be changed whenever the class
     * structure is changed (or anything else that would prevent serialized
     * objects being unserialized with the new class).
     */
    private static final long serialVersionUID = 2;
    
    /**
     * Creates a new instance of ImageToggleButton.
     *
     * @param actionCommand Action command for the button
     * @param icon Normal icon for the button
     */
    public ImageToggleButton(final String actionCommand, final Icon icon) {
        this(actionCommand, icon, icon);
    //#ImageToggleButton.java:51: method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton.com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): actionCommand
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): icon
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): this
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:javax.swing.JToggleButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setIcon
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setRolloverIcon
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPressedIcon
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setSelectedIcon
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setContentAreaFilled
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:javax.swing.BorderFactory:createEmptyBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setMargin
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:java.awt.Dimension
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPreferredSize
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setActionCommand
    }
    //#ImageToggleButton.java:52: end of method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton.com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon)
    
    /**
     * Creates a new instance of ImageToggleButton.
     *
     * @param actionCommand Action command for the button
     * @param icon Normal icon for the button
     * @param rolloverIcon Rollover icon for the button
     */
    public ImageToggleButton(final String actionCommand, final Icon icon, 
            final Icon rolloverIcon) {
        this(actionCommand, icon, rolloverIcon, rolloverIcon);
    //#ImageToggleButton.java:63: method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton.com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): actionCommand
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): icon
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): rolloverIcon
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): this
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:javax.swing.JToggleButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setIcon
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setRolloverIcon
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPressedIcon
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setSelectedIcon
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setContentAreaFilled
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:javax.swing.BorderFactory:createEmptyBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setMargin
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:java.awt.Dimension
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPreferredSize
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ImageToggleButton:setActionCommand
    }
    //#ImageToggleButton.java:64: end of method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton.com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon)
    
    /**
     * Creates a new instance of ImageToggleButton.
     *
     * @param actionCommand Action command for the button
     * @param icon Normal icon for the button
     * @param rolloverIcon Rollover icon for the button
     * @param pressedIcon Pressed icon for the button
     */
    public ImageToggleButton(final String actionCommand, final Icon icon, 
            final Icon rolloverIcon, final Icon pressedIcon) {
        super();
    //#ImageToggleButton.java:76: method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton.com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)): actionCommand
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)): icon
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)): pressedIcon
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)): rolloverIcon
    //#input(void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)): this
        
        setIcon(icon);
    //#ImageToggleButton.java:78: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setIcon(Icon)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setIcon(Icon)
        setRolloverIcon(rolloverIcon);
    //#ImageToggleButton.java:79: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setRolloverIcon(Icon)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setRolloverIcon(Icon)
        setPressedIcon(pressedIcon);
    //#ImageToggleButton.java:80: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPressedIcon(Icon)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPressedIcon(Icon)
        setSelectedIcon(pressedIcon);
    //#ImageToggleButton.java:81: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setSelectedIcon(Icon)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setSelectedIcon(Icon)
        setContentAreaFilled(false);
    //#ImageToggleButton.java:82: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setContentAreaFilled(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setContentAreaFilled(bool)
        setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    //#ImageToggleButton.java:83: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setBorder(Border)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setBorder(Border)
        setMargin(new Insets(0, 0, 0, 0));
    //#ImageToggleButton.java:84: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setMargin(Insets)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setMargin(Insets)
        setPreferredSize(new Dimension(16, 0));
    //#ImageToggleButton.java:85: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPreferredSize(Dimension)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPreferredSize(Dimension)
        setActionCommand(actionCommand);
    //#ImageToggleButton.java:86: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setActionCommand(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setActionCommand(String)
    }
    //#ImageToggleButton.java:87: end of method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton.com.dmdirc.addons.ui_swing.components.ImageToggleButton(String, Icon, Icon, Icon)
    
    /**
     * Sets all the image buttons icons
     * 
     * @param icon New icon
     */
    public void setIcons(final Icon icon) {
        setIcon(icon);
    //#ImageToggleButton.java:95: method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton.setIcons(Icon)
    //#ImageToggleButton.java:95: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setIcon(Icon)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void setIcons(Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setIcon(Icon)
    //#input(void setIcons(Icon)): icon
    //#input(void setIcons(Icon)): this
        setRolloverIcon(icon);
    //#ImageToggleButton.java:96: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setRolloverIcon(Icon)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void setIcons(Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setRolloverIcon(Icon)
        setPressedIcon(icon);
    //#ImageToggleButton.java:97: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPressedIcon(Icon)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
    //#    method: void setIcons(Icon)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ImageToggleButton:setPressedIcon(Icon)
    }
    //#ImageToggleButton.java:98: end of method: void com.dmdirc.addons.ui_swing.components.ImageToggleButton.setIcons(Icon)
}
    //#output(com.dmdirc.addons.ui_swing.components.ImageToggleButton__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/ImageToggleButton]
    //#output(com.dmdirc.addons.ui_swing.components.ImageToggleButton__static_init): __Dispatch_Table.setIcons(Ljavax/swing/Icon;)V
    //#post(com.dmdirc.addons.ui_swing.components.ImageToggleButton__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/ImageToggleButton] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.ImageToggleButton__static_init): __Dispatch_Table.setIcons(Ljavax/swing/Icon;)V == &setIcons
    //#ImageToggleButton.java:: end of method: com.dmdirc.addons.ui_swing.components.ImageToggleButton.com.dmdirc.addons.ui_swing.components.ImageToggleButton__static_init
    //#ImageToggleButton.java:: end of class: com.dmdirc.addons.ui_swing.components.ImageToggleButton
