//# 0 errors, 303 messages
//#
/*
    //#ColourPickerPanel.java:1:1: class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#ColourPickerPanel.java:1:1: method: com.dmdirc.addons.ui_swing.components.ColourPickerPanel.com.dmdirc.addons.ui_swing.components.ColourPickerPanel__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 java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Polygon;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JPanel;

/**
 * The ColourPickerPanel allows users to pick either an IRC colour or a hex
 * colour visually.
 * @author chris
 */
public final class ColourPickerPanel extends JPanel implements MouseListener,
        MouseMotionListener, MouseWheelListener {

    /**
     * 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;
    /** ActionEvent ID for when a hex colour is selected. */
    public static final int ACTION_HEX = 10001;
    /** ActionEvent ID for when an irc colour is selected. */
    public static final int ACTION_IRC = 10002;
    /** The width of each IRC colour patch. */
    private static final int IRC_WIDTH = 9;
    /** The height of each IRC colour patch. */
    private static final int IRC_HEIGHT = 16;
    /** The width of the hex colour patch. */
    private static final int HEX_WIDTH = 125;
    /** The height of the hex colour patch. */
    private static final int HEX_HEIGHT = 125;
    /** The size of borders to use. */
    private static final int BORDER_SIZE = 7;
    /** The size of slider to use. */
    private static final int SLIDER_WIDTH = 10;
    /** The height of the preview area. */
    private static final int PREVIEW_HEIGHT = 20;
    /** Whether to show IRC colours. */
    private final boolean showIrc;
    /** Whether to show hex colours. */
    private final boolean showHex;
    /** The y-coord of the start of the IRC colours block. */
    private int ircOffset;
    /** The y-coord of the start of the hex colours block. */
    private int hexOffset;
    /** The y-coord of the start of the preview block. */
    private int previewOffset;
    /** The saturation to use. */
    private float saturation = (float) 1.0;
    /** The colour to show in the preview window. */
    private Color preview;
    /** Rectangle we use to indicate that only the preview should be drawn. */
    private Rectangle previewRect;
    /** A list of registered actionlisteners. */
    private final List<ActionListener> listeners =
            new ArrayList<ActionListener>();

    /**
     * Creates a new instance of ColourPickerPanel.
     * @param newShowIrc Whether to show IRC colours or not
     * @param newShowHex Whether to show hex colours or not
     */
    public ColourPickerPanel(final boolean newShowIrc,
            final boolean newShowHex) {
        super();
    //#ColourPickerPanel.java:103: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)
    //#input(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): newShowHex
    //#input(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): newShowIrc
    //#input(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): new ArrayList(ColourPickerPanel#1) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this.listeners
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this.saturation
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this.showHex
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this.showIrc
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): new ArrayList(ColourPickerPanel#1)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this.listeners == &new ArrayList(ColourPickerPanel#1)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this.saturation == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this.showHex == newShowHex
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): init'ed(this.showHex)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): this.showIrc == newShowIrc
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): init'ed(this.showIrc)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)): new ArrayList(ColourPickerPanel#1) num objects == 1

        this.showIrc = newShowIrc;
        this.showHex = newShowHex;

        final int height = 65 + (showIrc ? 30 : 0) + (showHex ? 145 : 0) + (showHex & showIrc
                ? 10 : 0);

        setPreferredSize(new Dimension(160, height));
    //#ColourPickerPanel.java:111: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:setPreferredSize(Dimension)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:setPreferredSize(Dimension)

        addMouseListener(this);
    //#ColourPickerPanel.java:113: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseListener(MouseListener)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseListener(MouseListener)
        addMouseMotionListener(this);
    //#ColourPickerPanel.java:114: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseMotionListener(MouseMotionListener)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseMotionListener(MouseMotionListener)
        addMouseWheelListener(this);
    //#ColourPickerPanel.java:115: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseWheelListener(MouseWheelListener)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseWheelListener(MouseWheelListener)
    }
    //#ColourPickerPanel.java:116: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.com.dmdirc.addons.ui_swing.components.ColourPickerPanel(bool, bool)

    /**
     * Creates a new instance of ColourPickerPanel, showing both IRC and Hex
     * colours.
     */
    public ColourPickerPanel() {
        this(true, true);
    //#ColourPickerPanel.java:123: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.com.dmdirc.addons.ui_swing.components.ColourPickerPanel()
    //#input(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): new ArrayList(ColourPickerPanel#1) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this.listeners
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this.saturation
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this.showHex
    //#output(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this.showIrc
    //#new obj(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): new ArrayList(ColourPickerPanel#1)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this.listeners == &new ArrayList(ColourPickerPanel#1)
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this.saturation == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this.showHex == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): this.showIrc == 1
    //#post(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): new ArrayList(ColourPickerPanel#1) num objects == 1
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): Effects-of-calling:javax.swing.JPanel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): Effects-of-calling:java.awt.Dimension
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:setPreferredSize
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseListener
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseMotionListener
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.ColourPickerPanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:addMouseWheelListener
    }
    //#ColourPickerPanel.java:124: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.com.dmdirc.addons.ui_swing.components.ColourPickerPanel()

    /** {@inheritDoc} */
    @Override
    public void paint(final Graphics g) {
        int offset = 20;
    //#ColourPickerPanel.java:129: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.paint(Graphics)
    //#input(void paint(Graphics)): g
    //#input(void paint(Graphics)): java.awt.Color.BLACK
    //#input(void paint(Graphics)): this
    //#input(void paint(Graphics)): this.preview
    //#input(void paint(Graphics)): this.previewOffset
    //#input(void paint(Graphics)): this.previewRect
    //#input(void paint(Graphics)): this.saturation
    //#input(void paint(Graphics)): this.showHex
    //#input(void paint(Graphics)): this.showIrc
    //#output(void paint(Graphics)): new Rectangle(paint#4) num objects
    //#output(void paint(Graphics)): this.hexOffset
    //#output(void paint(Graphics)): this.ircOffset
    //#output(void paint(Graphics)): this.previewOffset
    //#output(void paint(Graphics)): this.previewRect
    //#new obj(void paint(Graphics)): new Rectangle(paint#4)
    //#pre[1] (void paint(Graphics)): g != null
    //#pre[5] (void paint(Graphics)): init'ed(this.previewRect)
    //#pre[7] (void paint(Graphics)): init'ed(this.preview)
    //#pre[4] (void paint(Graphics)): (soft) this.previewOffset <= 4_294_967_275
    //#pre[8] (void paint(Graphics)): (soft) init'ed(this.saturation)
    //#presumption(void paint(Graphics)): com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth(...)@215 >= -2_147_483_634
    //#presumption(void paint(Graphics)): com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth(...)@220 >= -2_147_483_633
    //#presumption(void paint(Graphics)): com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth(...)@223 >= -2_147_483_641
    //#presumption(void paint(Graphics)): com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth(...)@227 >= -2_147_483_633
    //#presumption(void paint(Graphics)): init'ed(java.awt.Color.BLACK)
    //#presumption(void paint(Graphics)): java.lang.Math:round(...)@188 <= 4_294_967_268
    //#presumption(void paint(Graphics)): java.lang.Math:round(...)@188 + offset in {-2_147_483_628..4_294_967_288}
    //#presumption(void paint(Graphics)): java.lang.Math:round(...)@190 <= 4_294_967_263
    //#presumption(void paint(Graphics)): java.lang.Math:round(...)@190 + offset in {-2_147_483_628..4_294_967_283}
    //#presumption(void paint(Graphics)): java.lang.Math:round(...)@192 <= 4_294_967_273
    //#presumption(void paint(Graphics)): java.lang.Math:round(...)@192 + offset in {-2_147_483_628..4_294_967_293}
    //#post(void paint(Graphics)): this.hexOffset == One-of{old this.hexOffset, One-of{20, 63} + 7}
    //#post(void paint(Graphics)): this.ircOffset == One-of{old this.ircOffset, 27}
    //#post(void paint(Graphics)): this.previewOffset == One-of{One-of{20, 63, One-of{20, 63} + 152} + 7, old this.previewOffset}
    //#post(void paint(Graphics)): this.previewOffset <= 4_294_967_275
    //#post(void paint(Graphics)): this.previewRect == One-of{old this.previewRect, &new Rectangle(paint#4)}
    //#post(void paint(Graphics)): this.previewRect != null
    //#post(void paint(Graphics)): new Rectangle(paint#4) num objects <= 1
    //#test_vector(void paint(Graphics)): this.previewRect: Addr_Set{null}, Inverse{null}
    //#test_vector(void paint(Graphics)): this.preview: Inverse{null}, Addr_Set{null}
    //#test_vector(void paint(Graphics)): this.showHex: {0}, {1}
    //#test_vector(void paint(Graphics)): this.showIrc: {0}, {1}
    //#test_vector(void paint(Graphics)): java.awt.Rectangle:equals(...)@131: {1}, {0}

        if (previewRect == null || !previewRect.equals(g.getClipBounds())) {
            g.setColor(getBackground());
    //#ColourPickerPanel.java:132: Warning: method not available - call not analyzed
    //#    call on Color com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getBackground()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: Color com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getBackground()

            g.fillRect(0, 0, getWidth(), getHeight());
    //#ColourPickerPanel.java:134: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
    //#ColourPickerPanel.java:134: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getHeight()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getHeight()

            g.setColor(Color.BLACK);

            if (showIrc) {
                g.drawString("IRC Colours", BORDER_SIZE, offset);

                offset += BORDER_SIZE;

                ircOffset = offset;

                for (int i = 0; i < 16; i++) {
                    g.setColor(ColourManager.getColour(i));
    //#ColourPickerPanel.java:146: Warning: method not available - call not analyzed
    //#    call on Color com.dmdirc.ui.messages.ColourManager:getColour(int)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: Color com.dmdirc.ui.messages.ColourManager:getColour(int)
                    g.fillRect(i * IRC_WIDTH + BORDER_SIZE, offset, IRC_WIDTH,
                            IRC_HEIGHT);
                    g.setColor(Color.BLACK);
                    g.drawRect(i * IRC_WIDTH + BORDER_SIZE, offset, IRC_WIDTH,
                            IRC_HEIGHT);
                }

                offset += IRC_HEIGHT + 20;
            }

            if (showHex) {
                g.drawString("Hex Colours", BORDER_SIZE, offset);

                offset += BORDER_SIZE;

                hexOffset = offset;

                for (int i = HEX_WIDTH; i > 0; i--) {
                    for (int j = HEX_HEIGHT; j > 0; j--) {
                        g.setColor(new Color(Color.HSBtoRGB((float) i /
                                HEX_WIDTH, saturation, (float) j / HEX_HEIGHT)));
                        g.drawLine(BORDER_SIZE + i, offset + HEX_HEIGHT - j,
                                BORDER_SIZE + i, offset + HEX_HEIGHT - j);
                    }
                }

                g.setColor(Color.BLACK);
                g.drawRect(BORDER_SIZE, offset, HEX_HEIGHT, HEX_WIDTH);

                g.drawRect(BORDER_SIZE * 2 + HEX_WIDTH, offset, 10, HEX_HEIGHT);

                for (int i = 1; i < HEX_HEIGHT; i++) {
                    g.setColor(new Color(Color.HSBtoRGB(0, (float) i /
                            HEX_HEIGHT, 1)));
                    g.drawLine(BORDER_SIZE * 2 + HEX_WIDTH + 1, offset + i,
                            BORDER_SIZE * 2 + HEX_WIDTH + SLIDER_WIDTH - 1,
                            offset + i);
                }

                final Polygon arrow = new Polygon();

                arrow.addPoint(HEX_WIDTH + BORDER_SIZE * 2 + 4, offset +
                        Math.round(saturation * HEX_HEIGHT));
                arrow.addPoint(HEX_WIDTH + BORDER_SIZE * 2 + 13, offset +
                        Math.round(saturation * HEX_HEIGHT) + 5);
                arrow.addPoint(HEX_WIDTH + BORDER_SIZE * 2 + 13, offset +
                        Math.round(saturation * HEX_HEIGHT) - 5);

                g.setColor(Color.BLACK);
                g.fillPolygon(arrow);

                offset += HEX_HEIGHT + 20;
            }

            g.drawString("Preview", BORDER_SIZE, offset);

            offset += BORDER_SIZE;

            previewOffset = offset;

            if (previewRect == null) {
                previewRect = new Rectangle(0, previewOffset, getWidth(),
    //#ColourPickerPanel.java:208: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
                        PREVIEW_HEIGHT);
            }
        } else {
            offset = previewOffset;
        }

        g.drawRect(BORDER_SIZE, offset, getWidth() - BORDER_SIZE * 2,
    //#ColourPickerPanel.java:215: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
                PREVIEW_HEIGHT);

        if (preview == null) {
            g.setColor(getBackground());
    //#ColourPickerPanel.java:219: Warning: method not available - call not analyzed
    //#    call on Color com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getBackground()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: Color com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getBackground()
            g.fillRect(BORDER_SIZE + 1, offset + 1,
    //#ColourPickerPanel.java:220: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
                    getWidth() - BORDER_SIZE * 2 - 1, PREVIEW_HEIGHT - 1);
            g.setColor(Color.BLACK);
            g.drawLine(BORDER_SIZE, offset, getWidth() - BORDER_SIZE, offset +
    //#ColourPickerPanel.java:223: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
                    PREVIEW_HEIGHT);
        } else {
            g.setColor(preview);
            g.fillRect(BORDER_SIZE + 1, offset + 1,
    //#ColourPickerPanel.java:227: Warning: method not available - call not analyzed
    //#    call on int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void paint(Graphics)
    //#    unanalyzed callee: int com.dmdirc.addons.ui_swing.components.ColourPickerPanel:getWidth()
                    getWidth() - BORDER_SIZE * 2 - 1, PREVIEW_HEIGHT - 1);
        }
    }
    //#ColourPickerPanel.java:230: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.paint(Graphics)

    /**
     * Retrieves the hex colour beneath the mouse. It is assumed that this
     * method is only called if the mouse is within the hex area.
     * @param e The mouse event that triggered this call
     * @return A colour object representing the colour beneat the mouse
     */
    private Color getHexColour(final MouseEvent e) {
        final int i = e.getX() - BORDER_SIZE;
    //#ColourPickerPanel.java:239: method: Color com.dmdirc.addons.ui_swing.components.ColourPickerPanel.getHexColour(MouseEvent)
    //#input(Color getHexColour(MouseEvent)): e
    //#input(Color getHexColour(MouseEvent)): this
    //#input(Color getHexColour(MouseEvent)): this.hexOffset
    //#input(Color getHexColour(MouseEvent)): this.saturation
    //#output(Color getHexColour(MouseEvent)): new Color(getHexColour#1) num objects
    //#output(Color getHexColour(MouseEvent)): return_value
    //#new obj(Color getHexColour(MouseEvent)): new Color(getHexColour#1)
    //#pre[1] (Color getHexColour(MouseEvent)): e != null
    //#pre[3] (Color getHexColour(MouseEvent)): init'ed(this.hexOffset)
    //#pre[4] (Color getHexColour(MouseEvent)): init'ed(this.saturation)
    //#presumption(Color getHexColour(MouseEvent)): java.awt.event.MouseEvent:getX(...)@239 >= -2_147_483_641
    //#presumption(Color getHexColour(MouseEvent)): java.awt.event.MouseEvent:getY(...)@240 - this.hexOffset in {-4_294_967_170..2_147_483_773}
    //#post(Color getHexColour(MouseEvent)): return_value == &new Color(getHexColour#1)
    //#post(Color getHexColour(MouseEvent)): new Color(getHexColour#1) num objects == 1
        final int j = HEX_HEIGHT - (e.getY() - hexOffset);

        return new Color(Color.HSBtoRGB((float) i / HEX_WIDTH, saturation,
    //#ColourPickerPanel.java:242: end of method: Color com.dmdirc.addons.ui_swing.components.ColourPickerPanel.getHexColour(MouseEvent)
                (float) j / HEX_HEIGHT));
    }

    /**
     * Retrieves the irc colour beneath the mouse. It is assumed that this
     * method is only called if the mouse is within the irc colour area.
     * @param e The mouse event that triggered this call
     * @return A colour object representing the colour beneat the mouse
     */
    private Color getIrcColour(final MouseEvent e) {
        final int i = (e.getX() - BORDER_SIZE) / IRC_WIDTH;
    //#ColourPickerPanel.java:253: method: Color com.dmdirc.addons.ui_swing.components.ColourPickerPanel.getIrcColour(MouseEvent)
    //#input(Color getIrcColour(MouseEvent)): e
    //#output(Color getIrcColour(MouseEvent)): return_value
    //#pre[1] (Color getIrcColour(MouseEvent)): e != null
    //#post(Color getIrcColour(MouseEvent)): init'ed(return_value)

        return ColourManager.getColour(i);
    //#ColourPickerPanel.java:255: Warning: method not available - call not analyzed
    //#    call on Color com.dmdirc.ui.messages.ColourManager:getColour(int)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: Color getIrcColour(MouseEvent)
    //#    unanalyzed callee: Color com.dmdirc.ui.messages.ColourManager:getColour(int)
    //#ColourPickerPanel.java:255: end of method: Color com.dmdirc.addons.ui_swing.components.ColourPickerPanel.getIrcColour(MouseEvent)
    }

    /**
     * Adds an action listener to this object. Action events are generated (and
     * passed to all action listeners) when the user selects a colour. The two
     * IDs used by this object are ACTION_HEX and ACTION_IRC, to indicate a
     * hex colour or an irc colour was selected, respectively.
     * @param listener The action listener to register
     */
    public void addActionListener(final ActionListener listener) {
        listeners.add(listener);
    //#ColourPickerPanel.java:266: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.addActionListener(ActionListener)
    //#input(void addActionListener(ActionListener)): listener
    //#input(void addActionListener(ActionListener)): this
    //#input(void addActionListener(ActionListener)): this.listeners
    //#pre[3] (void addActionListener(ActionListener)): this.listeners != null
    }
    //#ColourPickerPanel.java:267: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.addActionListener(ActionListener)

    /**
     * Removes an action listener from this object.
     * @param listener The listener to be removed
     */
    public void removeActionListener(final ActionListener listener) {
        listeners.remove(listener);
    //#ColourPickerPanel.java:274: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.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
    }
    //#ColourPickerPanel.java:275: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.removeActionListener(ActionListener)

    /**
     * Throws a new action event to all listeners.
     * @param id The id of the action
     * @param message The 'message' to use for the event
     */
    private void throwAction(final int id, final String message) {
        final ActionEvent event = new ActionEvent(this, id, message);
    //#ColourPickerPanel.java:283: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.throwAction(int, String)
    //#input(void throwAction(int, String)): id
    //#input(void throwAction(int, String)): message
    //#input(void throwAction(int, String)): this
    //#input(void throwAction(int, String)): this.listeners
    //#pre[4] (void throwAction(int, String)): this.listeners != null
    //#presumption(void throwAction(int, String)): java.util.Iterator:next(...)@285 != null
    //#test_vector(void throwAction(int, String)): java.util.Iterator:hasNext(...)@285: {0}, {1}

        for (ActionListener listener : listeners) {
            listener.actionPerformed(event);
        }
    }
    //#ColourPickerPanel.java:288: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.throwAction(int, String)

    /**
     * Converts the specified integer (in the range 0-255) into a hex string.
     * @param value The integer to convert
     * @return A char digit hex string representing the specified integer
     */
    private String toHex(final int value) {
        final char[] chars = {
    //#ColourPickerPanel.java:296: method: String com.dmdirc.addons.ui_swing.components.ColourPickerPanel.toHex(int)
    //#input(String toHex(int)): ""._tainted
    //#input(String toHex(int)): value
    //#output(String toHex(int)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String toHex(int)): return_value
    //#new obj(String toHex(int)): java.lang.StringBuilder:toString(...)
    //#pre[1] (String toHex(int)): value in {0..255}
    //#post(String toHex(int)): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String toHex(int)): return_value == &java.lang.StringBuilder:toString(...)
            '0', '1', '2', '3', '4', '5', '6', '7',
            '8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
        };

        return ("" + chars[value / 16]) + chars[value % 16];
    //#ColourPickerPanel.java:301: end of method: String com.dmdirc.addons.ui_swing.components.ColourPickerPanel.toHex(int)
    }

    /** 
     * {@inheritDoc}
     * 
     * @param e Mouse event 
     */
    @Override
    public void mouseClicked(final MouseEvent e) {
        if (showIrc && e.getY() > ircOffset && e.getY() < ircOffset + IRC_HEIGHT &&
    //#ColourPickerPanel.java:311: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseClicked(MouseEvent)
    //#input(void mouseClicked(MouseEvent)): ""._tainted
    //#input(void mouseClicked(MouseEvent)): e
    //#input(void mouseClicked(MouseEvent)): this
    //#input(void mouseClicked(MouseEvent)): this.hexOffset
    //#input(void mouseClicked(MouseEvent)): this.ircOffset
    //#input(void mouseClicked(MouseEvent)): this.listeners
    //#input(void mouseClicked(MouseEvent)): this.saturation
    //#input(void mouseClicked(MouseEvent)): this.showHex
    //#input(void mouseClicked(MouseEvent)): this.showIrc
    //#output(void mouseClicked(MouseEvent)): this.saturation
    //#pre[1] (void mouseClicked(MouseEvent)): (soft) e != null
    //#pre[2] (void mouseClicked(MouseEvent)): (soft) init'ed(this.saturation)
    //#pre[4] (void mouseClicked(MouseEvent)): (soft) init'ed(this.hexOffset)
    //#pre[5] (void mouseClicked(MouseEvent)): (soft) init'ed(this.ircOffset)
    //#pre[6] (void mouseClicked(MouseEvent)): (soft) this.listeners != null
    //#presumption(void mouseClicked(MouseEvent)): java.awt.Color:getBlue(...)@326 in {0..255}
    //#presumption(void mouseClicked(MouseEvent)): java.awt.Color:getGreen(...)@326 in {0..255}
    //#presumption(void mouseClicked(MouseEvent)): java.awt.Color:getRed(...)@326 in {0..255}
    //#post(void mouseClicked(MouseEvent)): init'ed(this.saturation)
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.awt.Color:HSBtoRGB
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.awt.Color
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.awt.event.MouseEvent:getX
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.awt.event.MouseEvent:getY
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.awt.event.ActionEvent
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.awt.event.ActionListener:actionPerformed
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void mouseClicked(MouseEvent)): Effects-of-calling:java.lang.StringBuilder:toString
    //#test_vector(void mouseClicked(MouseEvent)): this.showHex: {0}, {1}
    //#test_vector(void mouseClicked(MouseEvent)): this.showIrc: {0}, {1}
    //#test_vector(void mouseClicked(MouseEvent)): java.awt.event.MouseEvent:getX(...)@311: {-2_147_483_648..7}, {8..4_294_967_295}
    //#test_vector(void mouseClicked(MouseEvent)): java.awt.event.MouseEvent:getX(...)@311: {151..4_294_967_295}, {-2_147_483_648..150}
    //#test_vector(void mouseClicked(MouseEvent)): java.awt.event.MouseEvent:getX(...)@322: {-2_147_483_648..7}, {8..4_294_967_295}
    //#test_vector(void mouseClicked(MouseEvent)): java.awt.event.MouseEvent:getX(...)@322: {132..4_294_967_295}, {-2_147_483_648..131}
    //#test_vector(void mouseClicked(MouseEvent)): java.awt.event.MouseEvent:getX(...)@329: {-2_147_483_648..139}, {140..4_294_967_295}
    //#test_vector(void mouseClicked(MouseEvent)): java.awt.event.MouseEvent:getX(...)@329: {156..4_294_967_295}, {-2_147_483_648..155}
                e.getX() > BORDER_SIZE && e.getX() < BORDER_SIZE + 16 *
                IRC_WIDTH) {

            final int i = (e.getX() - BORDER_SIZE) / IRC_WIDTH;

            throwAction(ACTION_IRC, "" + i);

        } else if (showHex && e.getY() > hexOffset && e.getY() < hexOffset +
                HEX_HEIGHT) {

            if (e.getX() > BORDER_SIZE && e.getX() < BORDER_SIZE + HEX_WIDTH) {

                final Color color = getHexColour(e);

                throwAction(ACTION_HEX, toHex(color.getRed()) +
                        toHex(color.getGreen()) + toHex(color.getBlue()));

            } else if (e.getX() > BORDER_SIZE * 2 + HEX_WIDTH && e.getX() <
                    BORDER_SIZE * 3 + HEX_WIDTH + SLIDER_WIDTH) {
                saturation = (float) (e.getY() - hexOffset) / 125;
                repaint();
    //#ColourPickerPanel.java:332: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:repaint()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void mouseClicked(MouseEvent)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:repaint()
            }
        }
    }
    //#ColourPickerPanel.java:335: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseClicked(MouseEvent)

    /** 
     * {@inheritDoc}
     * 
     * @param e Mouse event 
     */
    @Override
    public void mousePressed(final MouseEvent e) {
    // Do nothing
    }
    //#ColourPickerPanel.java:345: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mousePressed(MouseEvent)
    //#ColourPickerPanel.java:345: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mousePressed(MouseEvent)

    /** 
     * {@inheritDoc}
     * 
     * @param e Mouse event 
     */
    @Override
    public void mouseReleased(final MouseEvent e) {
    // Do nothing
    }
    //#ColourPickerPanel.java:355: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseReleased(MouseEvent)
    //#ColourPickerPanel.java:355: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseReleased(MouseEvent)

    /** 
     * {@inheritDoc}
     * 
     * @param e Mouse event 
     */
    @Override
    public void mouseEntered(final MouseEvent e) {
    // Do nothing
    }
    //#ColourPickerPanel.java:365: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseEntered(MouseEvent)
    //#ColourPickerPanel.java:365: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseEntered(MouseEvent)

    /** 
     * {@inheritDoc}
     * 
     * @param e Mouse event 
     */
    @Override
    public void mouseExited(final MouseEvent e) {
    // Do nothing
    }
    //#ColourPickerPanel.java:375: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseExited(MouseEvent)
    //#ColourPickerPanel.java:375: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseExited(MouseEvent)

    /** 
     * {@inheritDoc}
     * 
     * @param e Mouse event 
     */
    @Override
    public void mouseDragged(final MouseEvent e) {
    // Do nothing
    }
    //#ColourPickerPanel.java:385: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseDragged(MouseEvent)
    //#ColourPickerPanel.java:385: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseDragged(MouseEvent)

    /** 
     * {@inheritDoc}
     * 
     * @param e Mouse event 
     */
    @Override
    public void mouseMoved(final MouseEvent e) {
        if (showIrc && e.getY() > ircOffset && e.getY() < ircOffset + IRC_HEIGHT &&
    //#ColourPickerPanel.java:394: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseMoved(MouseEvent)
    //#input(void mouseMoved(MouseEvent)): e
    //#input(void mouseMoved(MouseEvent)): this
    //#input(void mouseMoved(MouseEvent)): this.hexOffset
    //#input(void mouseMoved(MouseEvent)): this.ircOffset
    //#input(void mouseMoved(MouseEvent)): this.previewRect
    //#input(void mouseMoved(MouseEvent)): this.saturation
    //#input(void mouseMoved(MouseEvent)): this.showHex
    //#input(void mouseMoved(MouseEvent)): this.showIrc
    //#output(void mouseMoved(MouseEvent)): new Color(getHexColour#1) num objects
    //#output(void mouseMoved(MouseEvent)): this.preview
    //#new obj(void mouseMoved(MouseEvent)): new Color(getHexColour#1)
    //#pre[5] (void mouseMoved(MouseEvent)): init'ed(this.previewRect)
    //#pre[1] (void mouseMoved(MouseEvent)): (soft) e != null
    //#pre[3] (void mouseMoved(MouseEvent)): (soft) init'ed(this.hexOffset)
    //#pre[4] (void mouseMoved(MouseEvent)): (soft) init'ed(this.ircOffset)
    //#pre[6] (void mouseMoved(MouseEvent)): (soft) init'ed(this.saturation)
    //#post(void mouseMoved(MouseEvent)): init'ed(this.preview)
    //#post(void mouseMoved(MouseEvent)): new Color(getHexColour#1) num objects <= 1
    //#unanalyzed(void mouseMoved(MouseEvent)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:getColour
    //#unanalyzed(void mouseMoved(MouseEvent)): Effects-of-calling:java.awt.Color:HSBtoRGB
    //#unanalyzed(void mouseMoved(MouseEvent)): Effects-of-calling:java.awt.Color
    //#unanalyzed(void mouseMoved(MouseEvent)): Effects-of-calling:java.awt.event.MouseEvent:getX
    //#unanalyzed(void mouseMoved(MouseEvent)): Effects-of-calling:java.awt.event.MouseEvent:getY
    //#test_vector(void mouseMoved(MouseEvent)): this.showHex: {0}, {1}
    //#test_vector(void mouseMoved(MouseEvent)): this.showIrc: {0}, {1}
    //#test_vector(void mouseMoved(MouseEvent)): java.awt.event.MouseEvent:getX(...)@394: {-2_147_483_648..7}, {8..4_294_967_295}
    //#test_vector(void mouseMoved(MouseEvent)): java.awt.event.MouseEvent:getX(...)@394: {151..4_294_967_295}, {-2_147_483_648..150}
    //#test_vector(void mouseMoved(MouseEvent)): java.awt.event.MouseEvent:getX(...)@398: {-2_147_483_648..7}, {8..4_294_967_295}
    //#test_vector(void mouseMoved(MouseEvent)): java.awt.event.MouseEvent:getX(...)@398: {132..4_294_967_295}, {-2_147_483_648..131}
                e.getX() > BORDER_SIZE && e.getX() < BORDER_SIZE + 16 *
                IRC_WIDTH) {
            preview = getIrcColour(e);
        } else if (showHex && e.getY() > hexOffset && e.getY() < hexOffset +
                HEX_HEIGHT && e.getX() > BORDER_SIZE && e.getX() < BORDER_SIZE +
                HEX_WIDTH) {
            preview = getHexColour(e);
        } else {
            preview = null;
        }

        repaint(previewRect);
    //#ColourPickerPanel.java:406: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:repaint(Rectangle)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void mouseMoved(MouseEvent)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:repaint(Rectangle)
    }
    //#ColourPickerPanel.java:407: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseMoved(MouseEvent)

    /** 
     * {@inheritDoc}
     * 
     * @param e Mouse event 
     */
    @Override
    public void mouseWheelMoved(final MouseWheelEvent e) {
        if (showHex) {
    //#ColourPickerPanel.java:416: method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseWheelMoved(MouseWheelEvent)
    //#input(void mouseWheelMoved(MouseWheelEvent)): e
    //#input(void mouseWheelMoved(MouseWheelEvent)): this
    //#input(void mouseWheelMoved(MouseWheelEvent)): this.hexOffset
    //#input(void mouseWheelMoved(MouseWheelEvent)): this.ircOffset
    //#input(void mouseWheelMoved(MouseWheelEvent)): this.previewRect
    //#input(void mouseWheelMoved(MouseWheelEvent)): this.saturation
    //#input(void mouseWheelMoved(MouseWheelEvent)): this.showHex
    //#input(void mouseWheelMoved(MouseWheelEvent)): this.showIrc
    //#output(void mouseWheelMoved(MouseWheelEvent)): new Color(getHexColour#1) num objects
    //#output(void mouseWheelMoved(MouseWheelEvent)): this.preview
    //#output(void mouseWheelMoved(MouseWheelEvent)): this.saturation
    //#new obj(void mouseWheelMoved(MouseWheelEvent)): new Color(getHexColour#1)
    //#pre[1] (void mouseWheelMoved(MouseWheelEvent)): (soft) e != null
    //#pre[3] (void mouseWheelMoved(MouseWheelEvent)): (soft) init'ed(this.saturation)
    //#pre[5] (void mouseWheelMoved(MouseWheelEvent)): (soft) init'ed(this.hexOffset)
    //#pre[6] (void mouseWheelMoved(MouseWheelEvent)): (soft) init'ed(this.ircOffset)
    //#pre[7] (void mouseWheelMoved(MouseWheelEvent)): (soft) init'ed(this.previewRect)
    //#post(void mouseWheelMoved(MouseWheelEvent)): possibly_updated(this.preview)
    //#post(void mouseWheelMoved(MouseWheelEvent)): this.saturation == One-of{old this.saturation, old this.saturation + One-of{5_368_709/268_435_456, -5_368_709/268_435_456}, +0, 1}
    //#post(void mouseWheelMoved(MouseWheelEvent)): init'ed(this.saturation)
    //#post(void mouseWheelMoved(MouseWheelEvent)): new Color(getHexColour#1) num objects <= 1
    //#unanalyzed(void mouseWheelMoved(MouseWheelEvent)): Effects-of-calling:com.dmdirc.ui.messages.ColourManager:getColour
    //#unanalyzed(void mouseWheelMoved(MouseWheelEvent)): Effects-of-calling:java.awt.Color:HSBtoRGB
    //#unanalyzed(void mouseWheelMoved(MouseWheelEvent)): Effects-of-calling:java.awt.Color
    //#unanalyzed(void mouseWheelMoved(MouseWheelEvent)): Effects-of-calling:java.awt.event.MouseEvent:getX
    //#unanalyzed(void mouseWheelMoved(MouseWheelEvent)): Effects-of-calling:java.awt.event.MouseEvent:getY
    //#unanalyzed(void mouseWheelMoved(MouseWheelEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.ColourPickerPanel:repaint
    //#test_vector(void mouseWheelMoved(MouseWheelEvent)): this.showHex: {0}, {1}
            saturation = saturation + (e.getWheelRotation() >= 0 ? 0.02f : -0.02f);

            if (saturation < 0) {
                saturation = 0f;
            }
            if (saturation > 1) {
                saturation = 1f;
            }

            mouseMoved(e);
            repaint();
    //#ColourPickerPanel.java:427: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:repaint()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
    //#    method: void mouseWheelMoved(MouseWheelEvent)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel:repaint()
        }
    }
    //#ColourPickerPanel.java:429: end of method: void com.dmdirc.addons.ui_swing.components.ColourPickerPanel.mouseWheelMoved(MouseWheelEvent)
}
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/ColourPickerPanel]
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.addActionListener(Ljava/awt/event/ActionListener;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.getHexColour(Ljava/awt/event/MouseEvent;)Ljava/awt/Color;
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.getIrcColour(Ljava/awt/event/MouseEvent;)Ljava/awt/Color;
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseClicked(Ljava/awt/event/MouseEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseDragged(Ljava/awt/event/MouseEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseEntered(Ljava/awt/event/MouseEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseExited(Ljava/awt/event/MouseEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseMoved(Ljava/awt/event/MouseEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mousePressed(Ljava/awt/event/MouseEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseReleased(Ljava/awt/event/MouseEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseWheelMoved(Ljava/awt/event/MouseWheelEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.paint(Ljava/awt/Graphics;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.removeActionListener(Ljava/awt/event/ActionListener;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.throwAction(ILjava/lang/String;)V
    //#output(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.toHex(I)Ljava/lang/String;
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/ColourPickerPanel] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.addActionListener(Ljava/awt/event/ActionListener;)V == &addActionListener
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.getHexColour(Ljava/awt/event/MouseEvent;)Ljava/awt/Color; == &getHexColour
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.getIrcColour(Ljava/awt/event/MouseEvent;)Ljava/awt/Color; == &getIrcColour
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseClicked(Ljava/awt/event/MouseEvent;)V == &mouseClicked
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseDragged(Ljava/awt/event/MouseEvent;)V == &mouseDragged
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseEntered(Ljava/awt/event/MouseEvent;)V == &mouseEntered
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseExited(Ljava/awt/event/MouseEvent;)V == &mouseExited
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseMoved(Ljava/awt/event/MouseEvent;)V == &mouseMoved
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mousePressed(Ljava/awt/event/MouseEvent;)V == &mousePressed
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseReleased(Ljava/awt/event/MouseEvent;)V == &mouseReleased
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.mouseWheelMoved(Ljava/awt/event/MouseWheelEvent;)V == &mouseWheelMoved
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.paint(Ljava/awt/Graphics;)V == &paint
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.removeActionListener(Ljava/awt/event/ActionListener;)V == &removeActionListener
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.throwAction(ILjava/lang/String;)V == &throwAction
    //#post(com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init): __Dispatch_Table.toHex(I)Ljava/lang/String; == &toHex
    //#ColourPickerPanel.java:: end of method: com.dmdirc.addons.ui_swing.components.ColourPickerPanel.com.dmdirc.addons.ui_swing.components.ColourPickerPanel__static_init
    //#ColourPickerPanel.java:: end of class: com.dmdirc.addons.ui_swing.components.ColourPickerPanel
