//# 2 errors, 404 messages
//#
/*
    //#ColourChooser.java:1:1: class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#ColourChooser.java:1:1: method: com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser__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 com.dmdirc.ui.messages.ColourManager;
import com.dmdirc.addons.ui_swing.UIUtilities;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.event.EventListenerList;

import net.miginfocom.swing.MigLayout;

/**
 * Colour chooser widget.
 */
public final class ColourChooser extends JPanel implements ActionListener {

    /**
     * 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 = 1;
    /** Edit button. */
    private JButton editButton;
    /** Panel to show the colour preview. */
    private JPanel previewPanel;
    /** Colours picking dialog. */
    private ColourPickerDialog cpd;
    /** show irc colours. */
    private boolean showIRC;
    /** show hex colours. */
    private boolean showHex;
    /** The value of this component. */
    private String value;
    /** Event listeners. */
    private EventListenerList listeners;
    /** Action command. */
    private String command;
    /** Parent window. */
    private Window window;

    /** Creates a new instance of ColourChooser. */
    public ColourChooser() {
        this("ffffff", true, true);
    //#ColourChooser.java:74: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser()
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser()): java.awt.Color.DARK_GRAY
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new EventListenerList(ColourChooser#1) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new JButton(ColourChooser#2) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new JPanel(ColourChooser#5) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.command
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.editButton
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.listeners
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.previewPanel
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.showHex
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.showIRC
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.value
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.window
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new EventListenerList(ColourChooser#1)
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new JButton(ColourChooser#2)
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new JPanel(ColourChooser#5)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.command == &""
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.editButton == &new JButton(ColourChooser#2)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.listeners == &new EventListenerList(ColourChooser#1)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.previewPanel == &new JPanel(ColourChooser#5)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.showHex == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.showIRC == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new EventListenerList(ColourChooser#1) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new JButton(ColourChooser#2) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): new JPanel(ColourChooser#5) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.value == &"ffffff"
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser()): this.window == null
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:getColour
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.JPanel:setBackground
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.JPanel:setToolTipText
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:parseColour
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.JPanel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.event.EventListenerList
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.JButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:isWindowsUI
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.JButton:setMargin
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.JButton:addActionListener
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:java.awt.Dimension
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.JPanel:setPreferredSize
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.BorderFactory:createLineBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.JPanel:setBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:net.miginfocom.swing.MigLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourChooser:setLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourChooser:add
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:javax.swing.UIManager:getLookAndFeel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:java.lang.Object:getClass
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:java.lang.Class:getName
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser()): Effects-of-calling:java.lang.String:equals
    }
    //#ColourChooser.java:75: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser()
    
    /** 
     * Creates a new instance of ColourChooser.
     * 
     * @param window Parent window
     * 
     * @since 0.6
     */
    public ColourChooser(final Window window) {
        this("ffffff", true, true, window);
    //#ColourChooser.java:85: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser(Window)
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): java.awt.Color.DARK_GRAY
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): window
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new EventListenerList(ColourChooser#1) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new JButton(ColourChooser#2) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new JPanel(ColourChooser#5) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.command
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.editButton
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.listeners
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.previewPanel
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.showHex
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.showIRC
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.value
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.window
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new EventListenerList(ColourChooser#1)
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new JButton(ColourChooser#2)
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new JPanel(ColourChooser#5)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.command == &""
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.editButton == &new JButton(ColourChooser#2)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.listeners == &new EventListenerList(ColourChooser#1)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.previewPanel == &new JPanel(ColourChooser#5)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.showHex == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.showIRC == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new EventListenerList(ColourChooser#1) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new JButton(ColourChooser#2) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): new JPanel(ColourChooser#5) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.value == &"ffffff"
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): this.window == window
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): init'ed(this.window)
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:getColour
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.JPanel:setBackground
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.JPanel:setToolTipText
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:parseColour
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.JPanel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.event.EventListenerList
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.JButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:isWindowsUI
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.JButton:setMargin
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.JButton:addActionListener
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:java.awt.Dimension
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.JPanel:setPreferredSize
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.BorderFactory:createLineBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.JPanel:setBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:net.miginfocom.swing.MigLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourChooser:setLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourChooser:add
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:javax.swing.UIManager:getLookAndFeel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:java.lang.Object:getClass
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:java.lang.Class:getName
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(Window)): Effects-of-calling:java.lang.String:equals
    }
    //#ColourChooser.java:86: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser(Window)
    
    /**
     * Creates a new instance of ColourChooser.
     * 
     * @param initialColour Snitial colour
     * @param ircColours Show irc colours
     * @param hexColours Show hex colours
     */
    public ColourChooser(final String initialColour, final boolean ircColours,
            final boolean hexColours) {
        this(initialColour, ircColours, hexColours, null);
    //#ColourChooser.java:97: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): hexColours
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): initialColour
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): ircColours
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): java.awt.Color.DARK_GRAY
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new EventListenerList(ColourChooser#1) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new JButton(ColourChooser#2) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new JPanel(ColourChooser#5) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.command
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.editButton
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.listeners
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.previewPanel
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.showHex
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.showIRC
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.value
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.window
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new EventListenerList(ColourChooser#1)
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new JButton(ColourChooser#2)
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new JPanel(ColourChooser#5)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.command == &""
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.editButton == &new JButton(ColourChooser#2)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.listeners == &new EventListenerList(ColourChooser#1)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.previewPanel == &new JPanel(ColourChooser#5)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.showHex == hexColours
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): init'ed(this.showHex)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.showIRC == ircColours
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): init'ed(this.showIRC)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.value == initialColour
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): init'ed(this.value)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): this.window == null
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new EventListenerList(ColourChooser#1) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new JButton(ColourChooser#2) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): new JPanel(ColourChooser#5) num objects == 1
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:getColour
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.JPanel:setBackground
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.JPanel:setToolTipText
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:parseColour
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.JPanel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.event.EventListenerList
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.JButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:isWindowsUI
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.JButton:setMargin
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.JButton:addActionListener
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:java.awt.Dimension
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.JPanel:setPreferredSize
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.BorderFactory:createLineBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.JPanel:setBorder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:net.miginfocom.swing.MigLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourChooser:setLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourChooser:add
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:javax.swing.UIManager:getLookAndFeel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:java.lang.Object:getClass
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:java.lang.Class:getName
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)): Effects-of-calling:java.lang.String:equals
    }
    //#ColourChooser.java:98: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool)

    /**
     * Creates a new instance of ColourChooser.
     * 
     * @param initialColour initial colour
     * @param ircColours show irc colours
     * @param hexColours show hex colours
     * @param window Parent window
     * 
     * @since 0.6
     */
    public ColourChooser(final String initialColour, final boolean ircColours,
            final boolean hexColours, final Window window) {
        super();
    //#ColourChooser.java:112: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): hexColours
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): initialColour
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): ircColours
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): java.awt.Color.DARK_GRAY
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this
    //#input(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): window
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new EventListenerList(ColourChooser#1) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new JButton(ColourChooser#2) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new JPanel(ColourChooser#5) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.command
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.editButton
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.listeners
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.previewPanel
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.showHex
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.showIRC
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.value
    //#output(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.window
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new EventListenerList(ColourChooser#1)
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new JButton(ColourChooser#2)
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new JPanel(ColourChooser#5)
    //#presumption(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): init'ed(java.awt.Color.DARK_GRAY)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.command == &""
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.editButton == &new JButton(ColourChooser#2)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.listeners == &new EventListenerList(ColourChooser#1)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.previewPanel == &new JPanel(ColourChooser#5)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.showHex == hexColours
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): init'ed(this.showHex)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.showIRC == ircColours
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): init'ed(this.showIRC)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.value == initialColour
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): init'ed(this.value)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): this.window == window
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): init'ed(this.window)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new EventListenerList(ColourChooser#1) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new JButton(ColourChooser#2) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): new JPanel(ColourChooser#5) num objects == 1
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:getColour
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:javax.swing.JPanel:setBackground
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:javax.swing.JPanel:setToolTipText
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:parseColour
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:javax.swing.UIManager:getLookAndFeel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:java.lang.Object:getClass
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:java.lang.Class:getName
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)): Effects-of-calling:java.lang.String:equals

        this.window = window;
        showIRC = ircColours;
        showHex = hexColours;
        value = initialColour;
        listeners = new EventListenerList();
        command = "";

        editButton = new JButton("Edit");
        if (UIUtilities.isWindowsUI()) {
            editButton.setMargin(new Insets(2, 4, 2, 4));
        } else {
            editButton.setMargin(new Insets(0, 2, 0, 2));
        }

        editButton.addActionListener(this);

        previewPanel = new JPanel();
        previewPanel.setPreferredSize(new Dimension(40, 10));
        previewPanel.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY));

        setLayout(new MigLayout("ins 0, fill"));
    //#ColourChooser.java:134: Warning: method not available - call not analyzed
    //#    call on void net.miginfocom.swing.MigLayout(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)
    //#    unanalyzed callee: void net.miginfocom.swing.MigLayout(String)
    //#ColourChooser.java:134: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourChooser:setLayout(LayoutManager)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourChooser:setLayout(LayoutManager)

        add(previewPanel, "growx, pushx, sgy all");
    //#ColourChooser.java:136: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourChooser:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourChooser:add(Component, Object)
        add(editButton, "sgy all");
    //#ColourChooser.java:137: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourChooser:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourChooser:add(Component, Object)

        updateColour(initialColour);
    }
    //#ColourChooser.java:140: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser(String, bool, bool, Window)

    /**
     * Returns the selected colour from this component.
     * @return This components colour, as a string
     */
    public String getColour() {
        return value;
    //#ColourChooser.java:147: method: String com.dmdirc.addons.ui_swing.components.ColourChooser.getColour()
    //#input(String getColour()): this
    //#input(String getColour()): this.value
    //#output(String getColour()): return_value
    //#pre[2] (String getColour()): init'ed(this.value)
    //#post(String getColour()): return_value == this.value
    //#post(String getColour()): init'ed(return_value)
    //#ColourChooser.java:147: end of method: String com.dmdirc.addons.ui_swing.components.ColourChooser.getColour()
    }

    /**
     * Sets the selected colour for this component.
     * @param newValue New colour
     */
    public void setColour(final String newValue) {
        value = newValue;
    //#ColourChooser.java:155: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.setColour(String)
    //#input(void setColour(String)): newValue
    //#input(void setColour(String)): this
    //#input(void setColour(String)): this.previewPanel
    //#output(void setColour(String)): this.value
    //#pre[3] (void setColour(String)): this.previewPanel != null
    //#post(void setColour(String)): this.value == newValue
    //#post(void setColour(String)): init'ed(this.value)
    //#unanalyzed(void setColour(String)): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void setColour(String)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:getColour
    //#unanalyzed(void setColour(String)): Effects-of-calling:javax.swing.JPanel:setBackground
    //#unanalyzed(void setColour(String)): Effects-of-calling:javax.swing.JPanel:setToolTipText
    //#unanalyzed(void setColour(String)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:parseColour
        updateColour(value);
    }
    //#ColourChooser.java:157: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.setColour(String)

    /** Sets the colour back to white. */
    public void clearColour() {
        value = "ffffff";
    //#ColourChooser.java:161: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.clearColour()
    //#input(void clearColour()): this
    //#input(void clearColour()): this.previewPanel
    //#output(void clearColour()): this.value
    //#pre[2] (void clearColour()): this.previewPanel != null
    //#post(void clearColour()): this.value == &"ffffff"
        previewPanel.setBackground(ColourManager.getColour("ffffff"));
    //#ColourChooser.java:162: Warning: method not available - call not analyzed
    //#    call on Color com.dmdirc.ui.messages.ColourManager:getColour(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void clearColour()
    //#    unanalyzed callee: Color com.dmdirc.ui.messages.ColourManager:getColour(String)
        previewPanel.setToolTipText("");
    }
    //#ColourChooser.java:164: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.clearColour()

    /**
     * Updates the colour panel.
     * @param newColour The new colour to use.
     */
    private void updateColour(final String newColour) {
        if (newColour == null || newColour.isEmpty()) {
    //#ColourChooser.java:171: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.updateColour(String)
    //#input(void updateColour(String)): newColour
    //#input(void updateColour(String)): this
    //#input(void updateColour(String)): this.previewPanel
    //#pre[3] (void updateColour(String)): this.previewPanel != null
    //#test_vector(void updateColour(String)): newColour: Addr_Set{null}, Inverse{null}
    //#test_vector(void updateColour(String)): java.lang.String:isEmpty(...)@171: {0}, {1}
            previewPanel.setBackground(ColourManager.getColour("ffffff"));
    //#ColourChooser.java:172: Warning: method not available - call not analyzed
    //#    call on Color com.dmdirc.ui.messages.ColourManager:getColour(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void updateColour(String)
    //#    unanalyzed callee: Color com.dmdirc.ui.messages.ColourManager:getColour(String)
            previewPanel.setToolTipText("");
        } else {
            previewPanel.setBackground(ColourManager.parseColour(newColour));
    //#ColourChooser.java:175: Warning: method not available - call not analyzed
    //#    call on Color com.dmdirc.ui.messages.ColourManager:parseColour(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void updateColour(String)
    //#    unanalyzed callee: Color com.dmdirc.ui.messages.ColourManager:parseColour(String)
            previewPanel.setToolTipText(newColour);
        }
    }
    //#ColourChooser.java:178: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.updateColour(String)

    /** 
     * {@inheritDoc}.
     * 
     * @param e Action event
     */
    @Override
    public void actionPerformed(final ActionEvent e) {
        if (e.getSource() == editButton) {
    //#ColourChooser.java:187: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.actionPerformed(ActionEvent)
    //#input(void actionPerformed(ActionEvent)): com/dmdirc/addons/ui_swing/components/ColourPickerDialog.java.awt.Dialog$ModalityType.MODELESS
    //#input(void actionPerformed(ActionEvent)): e
    //#input(void actionPerformed(ActionEvent)): this
    //#input(void actionPerformed(ActionEvent)): this.command
    //#input(void actionPerformed(ActionEvent)): this.cpd
    //#input(void actionPerformed(ActionEvent)): this.cpd.colourChooser.listeners
    //#input(void actionPerformed(ActionEvent)): this.editButton
    //#input(void actionPerformed(ActionEvent)): this.listeners
    //#input(void actionPerformed(ActionEvent)): this.previewPanel
    //#input(void actionPerformed(ActionEvent)): this.showHex
    //#input(void actionPerformed(ActionEvent)): this.showIRC
    //#input(void actionPerformed(ActionEvent)): this.window
    //#output(void actionPerformed(ActionEvent)): new ArrayList(ColourPickerPanel#1) num objects
    //#output(void actionPerformed(ActionEvent)): new ColourPickerDialog(actionPerformed#1) num objects
    //#output(void actionPerformed(ActionEvent)): new ColourPickerDialog(actionPerformed#1).__Tag
    //#output(void actionPerformed(ActionEvent)): new ColourPickerDialog(actionPerformed#1).colourChooser
    //#output(void actionPerformed(ActionEvent)): new ColourPickerDialog(actionPerformed#1).window
    //#output(void actionPerformed(ActionEvent)): new ColourPickerPanel(ColourPickerDialog#1) num objects
    //#output(void actionPerformed(ActionEvent)): new ColourPickerPanel(ColourPickerDialog#1).__Tag
    //#output(void actionPerformed(ActionEvent)): new ColourPickerPanel(ColourPickerDialog#1).listeners
    //#output(void actionPerformed(ActionEvent)): new ColourPickerPanel(ColourPickerDialog#1).saturation
    //#output(void actionPerformed(ActionEvent)): new ColourPickerPanel(ColourPickerDialog#1).showHex
    //#output(void actionPerformed(ActionEvent)): new ColourPickerPanel(ColourPickerDialog#1).showIrc
    //#output(void actionPerformed(ActionEvent)): this.cpd
    //#output(void actionPerformed(ActionEvent)): this.value
    //#new obj(void actionPerformed(ActionEvent)): new ArrayList(ColourPickerPanel#1)
    //#new obj(void actionPerformed(ActionEvent)): new ColourPickerDialog(actionPerformed#1)
    //#new obj(void actionPerformed(ActionEvent)): new ColourPickerPanel(ColourPickerDialog#1)
    //#pre[1] (void actionPerformed(ActionEvent)): e != null
    //#pre[8] (void actionPerformed(ActionEvent)): init'ed(this.editButton)
    //#pre[2] (void actionPerformed(ActionEvent)): (soft) this.cpd != null
    //#pre[5] (void actionPerformed(ActionEvent)): (soft) init'ed(this.command)
    //#pre[9] (void actionPerformed(ActionEvent)): (soft) this.listeners != null
    //#pre[10] (void actionPerformed(ActionEvent)): (soft) this.previewPanel != null
    //#pre[11] (void actionPerformed(ActionEvent)): (soft) init'ed(this.showHex)
    //#pre[12] (void actionPerformed(ActionEvent)): (soft) init'ed(this.showIRC)
    //#pre[13] (void actionPerformed(ActionEvent)): (soft) init'ed(this.window)
    //#post(void actionPerformed(ActionEvent)): this.cpd == One-of{&new ColourPickerDialog(actionPerformed#1), old this.cpd}
    //#post(void actionPerformed(ActionEvent)): this.cpd != null
    //#post(void actionPerformed(ActionEvent)): possibly_updated(this.value)
    //#post(void actionPerformed(ActionEvent)): new ArrayList(ColourPickerPanel#1) num objects <= 1
    //#post(void actionPerformed(ActionEvent)): new ColourPickerDialog(actionPerformed#1) num objects <= 1
    //#post(void actionPerformed(ActionEvent)): init'ed(new ColourPickerDialog(actionPerformed#1).__Tag)
    //#post(void actionPerformed(ActionEvent)): init'ed(new ColourPickerDialog(actionPerformed#1).colourChooser)
    //#post(void actionPerformed(ActionEvent)): init'ed(new ColourPickerDialog(actionPerformed#1).window)
    //#post(void actionPerformed(ActionEvent)): new ColourPickerPanel(ColourPickerDialog#1) num objects <= 1
    //#post(void actionPerformed(ActionEvent)): init'ed(new ColourPickerPanel(ColourPickerDialog#1).__Tag)
    //#post(void actionPerformed(ActionEvent)): init'ed(new ColourPickerPanel(ColourPickerDialog#1).listeners)
    //#post(void actionPerformed(ActionEvent)): init'ed(new ColourPickerPanel(ColourPickerDialog#1).saturation)
    //#post(void actionPerformed(ActionEvent)): init'ed(new ColourPickerPanel(ColourPickerDialog#1).showHex)
    //#post(void actionPerformed(ActionEvent)): init'ed(new ColourPickerPanel(ColourPickerDialog#1).showIrc)
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:getColour
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:javax.swing.JPanel:setBackground
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:javax.swing.JPanel:setToolTipText
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:parseColour
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:javax.swing.event.EventListenerList:getListenerList
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.awt.event.ActionEvent
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.awt.event.ActionListener:actionPerformed
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.awt.event.WindowAdapter
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.awt.Window:addWindowListener
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.StandardDialog:setIconImages
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:javax.swing.JDialog
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.awt.Window:getIconImages
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:javax.swing.JPanel
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.awt.Dimension
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:setPreferredSize
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseListener
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseMotionListener
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseWheelListener
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerDialog:setDefaultCloseOperation
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerDialog:add
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerDialog:pack
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerDialog:setResizable
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerDialog:setFocusableWindowState
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.util.List:add
            cpd = new ColourPickerDialog(showIRC, showHex, window);
            cpd.setLocationRelativeTo(editButton);
    //#ColourChooser.java:189: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerDialog:setLocationRelativeTo(Component)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerDialog:setLocationRelativeTo(Component)
            cpd.addActionListener(this);
            cpd.setVisible(true);
    //#ColourChooser.java:191: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerDialog:setVisible(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerDialog:setVisible(bool)
        } else {
            value = e.getActionCommand();
            updateColour(e.getActionCommand());
            fireActionPerformed();
            cpd.dispose();
    //#ColourChooser.java:196: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerDialog:dispose()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerDialog:dispose()
        }
    }
    //#ColourChooser.java:198: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.actionPerformed(ActionEvent)

    /**
     * Sets this colour choosers action command.
     *
     * @param command New action command
     */
    public void setActionCommand(final String command) {
        this.command = command;
    //#ColourChooser.java:206: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.setActionCommand(String)
    //#input(void setActionCommand(String)): command
    //#input(void setActionCommand(String)): this
    //#output(void setActionCommand(String)): this.command
    //#post(void setActionCommand(String)): this.command == command
    //#post(void setActionCommand(String)): init'ed(this.command)
    }
    //#ColourChooser.java:207: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.setActionCommand(String)

    /**
     * Adds a ActionListener to the listener list.
     *
     * @param listener Listener to add
     */
    public void addActionListener(final ActionListener listener) {
        synchronized (listeners) {
    //#ColourChooser.java:215: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.addActionListener(ActionListener)
    //#input(void addActionListener(ActionListener)): listener
    //#input(void addActionListener(ActionListener)): this
    //#input(void addActionListener(ActionListener)): this.listeners
    //#input(void addActionListener(ActionListener)): this.listeners.__Lock
    //#pre[3] (void addActionListener(ActionListener)): (soft) this.listeners != null
    //#test_vector(void addActionListener(ActionListener)): listener: Inverse{null}, Addr_Set{null}
            if (listener == null) {
                return;
            }
            listeners.add(ActionListener.class, listener);
        }
    }
    //#ColourChooser.java:221: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.addActionListener(ActionListener)

    /**
     * Removes a ActionListener from the listener list.
     *
     * @param listener Listener to remove
     */
    public void removeActionListener(final ActionListener listener) {
        listeners.remove(ActionListener.class, listener);
    //#ColourChooser.java:229: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.removeActionListener(ActionListener)
    //#input(void removeActionListener(ActionListener)): listener
    //#input(void removeActionListener(ActionListener)): this
    //#input(void removeActionListener(ActionListener)): this.listeners
    //#pre[3] (void removeActionListener(ActionListener)): this.listeners != null
    }
    //#ColourChooser.java:230: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.removeActionListener(ActionListener)

    /**
     * Fires the action performed method on all listeners.
     */
    protected void fireActionPerformed() {
        final Object[] localListenerList = listeners.getListenerList();
    //#ColourChooser.java:236: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.fireActionPerformed()
    //#input(void fireActionPerformed()): this
    //#input(void fireActionPerformed()): this.command
    //#input(void fireActionPerformed()): this.listeners
    //#pre[3] (void fireActionPerformed()): this.listeners != null
    //#pre[2] (void fireActionPerformed()): (soft) init'ed(this.command)
    //#presumption(void fireActionPerformed()): javax.swing.event.EventListenerList:getListenerList(...)@236 != null
    //#presumption(void fireActionPerformed()): localListenerList.length@236 in {0, 2..4_294_967_295}
    //#presumption(void fireActionPerformed()): localListenerList[i + 1]@236 != null
    //#test_vector(void fireActionPerformed()): localListenerList[i]@236: Inverse{&java.awt.event.ActionListener.__Class_Obj}, Addr_Set{&java.awt.event.ActionListener.__Class_Obj}
        for (int i = 0; i < localListenerList.length; i += 2) {
    //#ColourChooser.java:237: ?overflow
    //#    i in {-2_147_483_650..4_294_967_293}
    //#    severity: LOW
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void fireActionPerformed()
    //#    basic block: bb_5
    //#    assertion: i in {-2_147_483_650..4_294_967_293}
    //#    VN: i + 2
    //#    Expected: {-2_147_483_648..4_294_967_295, Invalid}
    //#    Bad: {4_294_967_296}
    //#    Attribs:  Int  Bad singleton  Bad > Exp
            if (localListenerList[i] == ActionListener.class) {
                ((ActionListener) localListenerList[i + 1]).actionPerformed(
    //#ColourChooser.java:239: ?array index out of bounds
    //#    (i + 1) < localListenerList.length
    //#    severity: MEDIUM
    //#    class: com.dmdirc.addons.ui_swing.components.ColourChooser
    //#    method: void fireActionPerformed()
    //#    basic block: bb_4
    //#    assertion: (i + 1) < localListenerList.length
    //#    VN: -((i - localListenerList.length@236) + 1)
    //#    Expected: {1..+Inf}
    //#    Bad: {0}
    //#    Attribs:  Int  Bad singleton  Bad overlaps +/-1000  Bad < Exp
                        new ActionEvent(this,
                        ActionEvent.ACTION_PERFORMED, command));
            }
        }
    }
    //#ColourChooser.java:244: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.fireActionPerformed()
    
    /**
     * Sets the Parent window.
     * 
     * @param window Parent window
     */
    public void setWindow(final Window window) {
        this.window = window;
    //#ColourChooser.java:252: method: void com.dmdirc.addons.ui_swing.components.ColourChooser.setWindow(Window)
    //#input(void setWindow(Window)): this
    //#input(void setWindow(Window)): window
    //#output(void setWindow(Window)): this.window
    //#post(void setWindow(Window)): this.window == window
    //#post(void setWindow(Window)): init'ed(this.window)
    }
    //#ColourChooser.java:253: end of method: void com.dmdirc.addons.ui_swing.components.ColourChooser.setWindow(Window)
}
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/ColourChooser]
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.addActionListener(Ljava/awt/event/ActionListener;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.clearColour()V
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.fireActionPerformed()V
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.getColour()Ljava/lang/String;
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.removeActionListener(Ljava/awt/event/ActionListener;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.setActionCommand(Ljava/lang/String;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.setColour(Ljava/lang/String;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.setWindow(Ljava/awt/Window;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.updateColour(Ljava/lang/String;)V
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/ColourChooser] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V == &actionPerformed
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.addActionListener(Ljava/awt/event/ActionListener;)V == &addActionListener
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.clearColour()V == &clearColour
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.fireActionPerformed()V == &fireActionPerformed
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.getColour()Ljava/lang/String; == &getColour
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.removeActionListener(Ljava/awt/event/ActionListener;)V == &removeActionListener
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.setActionCommand(Ljava/lang/String;)V == &setActionCommand
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.setColour(Ljava/lang/String;)V == &setColour
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.setWindow(Ljava/awt/Window;)V == &setWindow
    //#post(com.dmdirc.addons.ui_swing.components.ColourChooser__static_init): __Dispatch_Table.updateColour(Ljava/lang/String;)V == &updateColour
    //#ColourChooser.java:: end of method: com.dmdirc.addons.ui_swing.components.ColourChooser.com.dmdirc.addons.ui_swing.components.ColourChooser__static_init
    //#ColourChooser.java:: end of class: com.dmdirc.addons.ui_swing.components.ColourChooser
