//# 0 errors, 268 messages
//#
/*
    //#URLDialog.java:1:1: class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#URLDialog.java:1:1: method: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__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.dialogs.url;

import com.dmdirc.addons.ui_swing.components.text.TextLabel;
import com.dmdirc.addons.ui_swing.components.StandardDialog;
import com.dmdirc.addons.ui_swing.components.URLProtocolPanel;
import com.dmdirc.util.URLHandler;

import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URI;

import javax.swing.JButton;

import net.miginfocom.swing.MigLayout;

/** URL Protocol dialog. */
public class URLDialog extends StandardDialog 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;
    /** A previously created instance of URLDialog. */
    private static volatile URLDialog me;
    /** URL protocol config panel. */
    private URLProtocolPanel panel;
    /** URL. */
    private URI url;
    /** Blurb label. */
    private TextLabel blurb;
    /** Swing controller. */
    private Window parentWindow;

    /**
     * Instantiates the URLDialog.
     *
     * @param url URL to open once added
     * @param parentWindow Parent window
     */
    private URLDialog(final URI url, final Window parentWindow) {
        super(parentWindow, ModalityType.MODELESS);
    //#URLDialog.java:66: method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)
    //#URLDialog.java:66: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)
    //#input(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): " URL protocols from the list "._tainted
    //#input(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): "Please select the appropriate action to handle "._tainted
    //#input(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): "below."._tainted
    //#input(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): java.awt.Dialog$ModalityType.MODELESS
    //#input(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): parentWindow
    //#input(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this
    //#input(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): url
    //#output(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): new TextLabel(initComponents#3) num objects
    //#output(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): new URLProtocolPanel(initComponents#5) num objects
    //#output(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.blurb
    //#output(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.panel
    //#output(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.parentWindow
    //#output(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.url
    //#new obj(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): new TextLabel(initComponents#3)
    //#new obj(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): new URLProtocolPanel(initComponents#5)
    //#pre[3] (void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): url != null
    //#presumption(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): init'ed(java.awt.Dialog$ModalityType.MODELESS)
    //#post(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.blurb == &new TextLabel(initComponents#3)
    //#post(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.panel == &new URLProtocolPanel(initComponents#5)
    //#post(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.parentWindow == parentWindow
    //#post(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): init'ed(this.parentWindow)
    //#post(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.url == url
    //#post(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): this.url != null
    //#post(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): new TextLabel(initComponents#3) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): new URLProtocolPanel(initComponents#5) num objects == 1
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:javax.swing.JButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:orderButtons
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:java.net.URI:getScheme
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.URLProtocolPanel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:net.miginfocom.swing.MigLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getLeftButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getRightButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getOkButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:javax.swing.JButton:addActionListener
    //#unanalyzed(void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getCancelButton
        
        this.url = url;
        this.parentWindow = parentWindow;
        
        initComponents();
        layoutComponents();
        addListeners();

        setTitle("DMDirc: Unknown URL Protocol");
    //#URLDialog.java:75: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setTitle(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setTitle(String)

        pack();
    //#URLDialog.java:77: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:pack()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:pack()
    }
    //#URLDialog.java:78: end of method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.com.dmdirc.addons.ui_swing.dialogs.url.URLDialog(URI, Window)

    /**
     * Creates the new URLDialog if one doesn't exist, and displays it.
     *
     * @param url URL to open once added
     * @param parentWindow Parent window
     */
    public static void showURLDialog(final URI url, final Window parentWindow) {
        me = getURLDialog(url, parentWindow);
    //#URLDialog.java:87: method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.showURLDialog(URI, Window)
    //#input(void showURLDialog(URI, Window)): " URL protocols from the list "._tainted
    //#input(void showURLDialog(URI, Window)): "Please select the appropriate action to handle "._tainted
    //#input(void showURLDialog(URI, Window)): "below."._tainted
    //#input(void showURLDialog(URI, Window)): __Class_Obj.__Lock
    //#input(void showURLDialog(URI, Window)): java.awt.Dialog$ModalityType.MODELESS
    //#input(void showURLDialog(URI, Window)): me
    //#input(void showURLDialog(URI, Window)): parentWindow
    //#input(void showURLDialog(URI, Window)): url
    //#output(void showURLDialog(URI, Window)): me
    //#output(void showURLDialog(URI, Window)): new TextLabel(initComponents#3) num objects
    //#output(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1) num objects
    //#output(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).__Tag
    //#output(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).blurb
    //#output(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).panel
    //#output(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).parentWindow
    //#output(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).url
    //#output(void showURLDialog(URI, Window)): new URLProtocolPanel(initComponents#5) num objects
    //#new obj(void showURLDialog(URI, Window)): new TextLabel(initComponents#3)
    //#new obj(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1)
    //#new obj(void showURLDialog(URI, Window)): new URLProtocolPanel(initComponents#5)
    //#pre[1] (void showURLDialog(URI, Window)): init'ed(me)
    //#pre[3] (void showURLDialog(URI, Window)): (soft) url != null
    //#post(void showURLDialog(URI, Window)): me == One-of{old me, &new URLDialog(getURLDialog#1)}
    //#post(void showURLDialog(URI, Window)): me != null
    //#post(void showURLDialog(URI, Window)): new TextLabel(initComponents#3) num objects <= 1
    //#post(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1) num objects == new TextLabel(initComponents#3) num objects
    //#post(void showURLDialog(URI, Window)): new URLProtocolPanel(initComponents#5) num objects == new TextLabel(initComponents#3) num objects
    //#post(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).__Tag == com/dmdirc/addons/ui_swing/dialogs/url/URLDialog
    //#post(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).blurb == &new TextLabel(initComponents#3)
    //#post(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).panel == &new URLProtocolPanel(initComponents#5)
    //#post(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).parentWindow == parentWindow
    //#post(void showURLDialog(URI, Window)): init'ed(new URLDialog(getURLDialog#1).parentWindow)
    //#post(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).url == url
    //#post(void showURLDialog(URI, Window)): new URLDialog(getURLDialog#1).url != null
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:javax.swing.JButton
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:orderButtons
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:java.net.URI:getScheme
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.URLProtocolPanel
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:net.miginfocom.swing.MigLayout
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLayout
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getLeftButton
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getRightButton
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getOkButton
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:javax.swing.JButton:addActionListener
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getCancelButton
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.StandardDialog
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setTitle
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:pack
    //#unanalyzed(void showURLDialog(URI, Window)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj

        me.setLocationRelativeTo(parentWindow);
    //#URLDialog.java:89: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLocationRelativeTo(Component)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void showURLDialog(URI, Window)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLocationRelativeTo(Component)
        me.setVisible(true);
    //#URLDialog.java:90: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setVisible(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void showURLDialog(URI, Window)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setVisible(bool)
        me.requestFocusInWindow();
    //#URLDialog.java:91: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:requestFocusInWindow()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void showURLDialog(URI, Window)
    //#    unanalyzed callee: bool com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:requestFocusInWindow()
    }
    //#URLDialog.java:92: end of method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.showURLDialog(URI, Window)

    /**
     * Returns the current instance of the URLDialog.
     *
     * @param url URL to open once added
     * @param parentWindow Parent window
     * 
     * @return The current URLDialog instance
     */
    public static URLDialog getURLDialog(final URI url, final Window parentWindow) {
        synchronized (URLDialog.class) {
    //#URLDialog.java:103: method: URLDialog com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.getURLDialog(URI, Window)
    //#input(URLDialog getURLDialog(URI, Window)): " URL protocols from the list "._tainted
    //#input(URLDialog getURLDialog(URI, Window)): "Please select the appropriate action to handle "._tainted
    //#input(URLDialog getURLDialog(URI, Window)): "below."._tainted
    //#input(URLDialog getURLDialog(URI, Window)): __Class_Obj.__Lock
    //#input(URLDialog getURLDialog(URI, Window)): java.awt.Dialog$ModalityType.MODELESS
    //#input(URLDialog getURLDialog(URI, Window)): me
    //#input(URLDialog getURLDialog(URI, Window)): parentWindow
    //#input(URLDialog getURLDialog(URI, Window)): url
    //#output(URLDialog getURLDialog(URI, Window)): me
    //#output(URLDialog getURLDialog(URI, Window)): new TextLabel(initComponents#3) num objects
    //#output(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1) num objects
    //#output(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).__Tag
    //#output(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).blurb
    //#output(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).panel
    //#output(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).parentWindow
    //#output(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).url
    //#output(URLDialog getURLDialog(URI, Window)): new URLProtocolPanel(initComponents#5) num objects
    //#output(URLDialog getURLDialog(URI, Window)): return_value
    //#new obj(URLDialog getURLDialog(URI, Window)): new TextLabel(initComponents#3)
    //#new obj(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1)
    //#new obj(URLDialog getURLDialog(URI, Window)): new URLProtocolPanel(initComponents#5)
    //#pre[1] (URLDialog getURLDialog(URI, Window)): init'ed(me)
    //#pre[3] (URLDialog getURLDialog(URI, Window)): (soft) url != null
    //#post(URLDialog getURLDialog(URI, Window)): me == One-of{old me, &new URLDialog(getURLDialog#1)}
    //#post(URLDialog getURLDialog(URI, Window)): me != null
    //#post(URLDialog getURLDialog(URI, Window)): return_value == One-of{old me, &new URLDialog(getURLDialog#1)}
    //#post(URLDialog getURLDialog(URI, Window)): return_value != null
    //#post(URLDialog getURLDialog(URI, Window)): new TextLabel(initComponents#3) num objects <= 1
    //#post(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1) num objects <= 1
    //#post(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).__Tag == com/dmdirc/addons/ui_swing/dialogs/url/URLDialog
    //#post(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).blurb == &new TextLabel(initComponents#3)
    //#post(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).panel == &new URLProtocolPanel(initComponents#5)
    //#post(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).parentWindow == parentWindow
    //#post(URLDialog getURLDialog(URI, Window)): init'ed(new URLDialog(getURLDialog#1).parentWindow)
    //#post(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).url == url
    //#post(URLDialog getURLDialog(URI, Window)): new URLDialog(getURLDialog#1).url != null
    //#post(URLDialog getURLDialog(URI, Window)): new URLProtocolPanel(initComponents#5) num objects <= 1
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:javax.swing.JButton
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:orderButtons
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:java.net.URI:getScheme
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.URLProtocolPanel
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:net.miginfocom.swing.MigLayout
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLayout
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getLeftButton
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getRightButton
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getOkButton
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:javax.swing.JButton:addActionListener
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getCancelButton
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.StandardDialog
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setTitle
    //#unanalyzed(URLDialog getURLDialog(URI, Window)): Effects-of-calling:com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:pack
            if (me == null) {
                me = new URLDialog(url, parentWindow);
            }
        }

        return me;
    //#URLDialog.java:109: end of method: URLDialog com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.getURLDialog(URI, Window)
    }

    /** Initialises the components. */
    private void initComponents() {
        orderButtons(new JButton(), new JButton());
    //#URLDialog.java:114: method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.initComponents()
    //#URLDialog.java:114: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:orderButtons(JButton, JButton)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void initComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:orderButtons(JButton, JButton)
    //#input(void initComponents()): " URL protocols from the list "._tainted
    //#input(void initComponents()): "Please select the appropriate action to handle "._tainted
    //#input(void initComponents()): "below."._tainted
    //#input(void initComponents()): this
    //#input(void initComponents()): this.url
    //#output(void initComponents()): new TextLabel(initComponents#3) num objects
    //#output(void initComponents()): new URLProtocolPanel(initComponents#5) num objects
    //#output(void initComponents()): this.blurb
    //#output(void initComponents()): this.panel
    //#new obj(void initComponents()): new TextLabel(initComponents#3)
    //#new obj(void initComponents()): new URLProtocolPanel(initComponents#5)
    //#pre[2] (void initComponents()): this.url != null
    //#post(void initComponents()): this.blurb == &new TextLabel(initComponents#3)
    //#post(void initComponents()): this.panel == &new URLProtocolPanel(initComponents#5)
    //#post(void initComponents()): new TextLabel(initComponents#3) num objects == 1
    //#post(void initComponents()): new URLProtocolPanel(initComponents#5) num objects == 1
        blurb = new TextLabel("Please select the appropriate action to " +
    //#URLDialog.java:115: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.text.TextLabel(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void initComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.text.TextLabel(String)
                "handle " + url.getScheme() + " URL protocols from the list " +
                "below.");
        panel = new URLProtocolPanel(url, false);
    //#URLDialog.java:118: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.URLProtocolPanel(URI, bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void initComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.URLProtocolPanel(URI, bool)
    }
    //#URLDialog.java:119: end of method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.initComponents()

    /** Lays out the components. */
    private void layoutComponents() {
        setLayout(new MigLayout("fill, wrap 1, pack"));
    //#URLDialog.java:123: method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.layoutComponents()
    //#URLDialog.java:123: Warning: method not available - call not analyzed
    //#    call on void net.miginfocom.swing.MigLayout(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void net.miginfocom.swing.MigLayout(String)
    //#URLDialog.java:123: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLayout(LayoutManager)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLayout(LayoutManager)
    //#input(void layoutComponents()): this
    //#input(void layoutComponents()): this.blurb
    //#input(void layoutComponents()): this.panel
    //#pre[2] (void layoutComponents()): init'ed(this.blurb)
    //#pre[3] (void layoutComponents()): init'ed(this.panel)

        add(blurb, "");
    //#URLDialog.java:125: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add(Component, Object)
        add(panel, "grow, push");
    //#URLDialog.java:126: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add(Component, Object)
        add(getLeftButton(), "split 2, right");
    //#URLDialog.java:127: Warning: method not available - call not analyzed
    //#    call on JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getLeftButton()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void layoutComponents()
    //#    unanalyzed callee: JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getLeftButton()
    //#URLDialog.java:127: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add(Component, Object)
        add(getRightButton(), "right");
    //#URLDialog.java:128: Warning: method not available - call not analyzed
    //#    call on JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getRightButton()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void layoutComponents()
    //#    unanalyzed callee: JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getRightButton()
    //#URLDialog.java:128: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:add(Component, Object)
    }
    //#URLDialog.java:129: end of method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.layoutComponents()

    /** Adds listeners to the components. */
    private void addListeners() {
        getOkButton().addActionListener(this);
    //#URLDialog.java:133: method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.addListeners()
    //#URLDialog.java:133: Warning: method not available - call not analyzed
    //#    call on JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getOkButton()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void addListeners()
    //#    unanalyzed callee: JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getOkButton()
    //#input(void addListeners()): this
    //#presumption(void addListeners()): com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getCancelButton(...)@134 != null
    //#presumption(void addListeners()): com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getOkButton(...)@133 != null
        getCancelButton().addActionListener(this);
    //#URLDialog.java:134: Warning: method not available - call not analyzed
    //#    call on JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getCancelButton()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void addListeners()
    //#    unanalyzed callee: JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getCancelButton()
    }
    //#URLDialog.java:135: end of method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.addListeners()

    /**
     * {@inheritDoc}
     *
     * @param e action event
     */
    @Override
    public void actionPerformed(final ActionEvent e) {
        if (e.getSource() == getOkButton()) {
    //#URLDialog.java:144: method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.actionPerformed(ActionEvent)
    //#URLDialog.java:144: Warning: method not available - call not analyzed
    //#    call on JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getOkButton()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getOkButton()
    //#input(void actionPerformed(ActionEvent)): __Descendant_Table[com/dmdirc/addons/ui_swing/dialogs/url/URLDialog]
    //#input(void actionPerformed(ActionEvent)): __Descendant_Table[others]
    //#input(void actionPerformed(ActionEvent)): __Dispatch_Table.dispose()V
    //#input(void actionPerformed(ActionEvent)): e
    //#input(void actionPerformed(ActionEvent)): me
    //#input(void actionPerformed(ActionEvent)): this
    //#input(void actionPerformed(ActionEvent)): this.__Tag
    //#input(void actionPerformed(ActionEvent)): this.panel
    //#input(void actionPerformed(ActionEvent)): this.url
    //#output(void actionPerformed(ActionEvent)): me
    //#pre[1] (void actionPerformed(ActionEvent)): e != null
    //#pre[3] (void actionPerformed(ActionEvent)): (soft) init'ed(me)
    //#pre[5] (void actionPerformed(ActionEvent)): (soft) this.__Tag == com/dmdirc/addons/ui_swing/dialogs/url/URLDialog
    //#pre[6] (void actionPerformed(ActionEvent)): (soft) this.panel != null
    //#pre[7] (void actionPerformed(ActionEvent)): (soft) init'ed(this.url)
    //#presumption(void actionPerformed(ActionEvent)): com.dmdirc.util.URLHandler:getURLHander(...)@147 != null
    //#post(void actionPerformed(ActionEvent)): me == One-of{old me, null}
    //#post(void actionPerformed(ActionEvent)): init'ed(me)
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:com.dmdirc.addons.ui_swing.components.StandardDialog:dispose
            panel.save();
    //#URLDialog.java:145: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.URLProtocolPanel:save()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.URLProtocolPanel:save()
            dispose();
            URLHandler.getURLHander().launchApp(url);
    //#URLDialog.java:147: Warning: method not available - call not analyzed
    //#    call on URLHandler com.dmdirc.util.URLHandler:getURLHander()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: URLHandler com.dmdirc.util.URLHandler:getURLHander()
    //#URLDialog.java:147: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.util.URLHandler:launchApp(URI)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: void com.dmdirc.util.URLHandler:launchApp(URI)
        } else if (e.getSource() == getCancelButton()) {
    //#URLDialog.java:148: Warning: method not available - call not analyzed
    //#    call on JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getCancelButton()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: JButton com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:getCancelButton()
            dispose();
        }
    }
    //#URLDialog.java:151: end of method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.actionPerformed(ActionEvent)

    /** {@inheritDoc} */
    @Override
    public void validate() {
        super.validate();
    //#URLDialog.java:156: method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.validate()
    //#URLDialog.java:156: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.StandardDialog:validate()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void validate()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.StandardDialog:validate()
    //#input(void validate()): this
    //#input(void validate()): this.parentWindow
    //#pre[2] (void validate()): init'ed(this.parentWindow)

        setLocationRelativeTo(parentWindow);
    //#URLDialog.java:158: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLocationRelativeTo(Component)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void validate()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog:setLocationRelativeTo(Component)
    }
    //#URLDialog.java:159: end of method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.validate()

    /** {@inheritDoc} */
    @Override
    public void dispose() {
        if (me == null) {
    //#URLDialog.java:164: method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.dispose()
    //#input(void dispose()): me
    //#input(void dispose()): me.__Lock
    //#input(void dispose()): this
    //#output(void dispose()): me
    //#pre[1] (void dispose()): init'ed(me)
    //#post(void dispose()): me == null
    //#test_vector(void dispose()): me: Inverse{null}, Addr_Set{null}
            return;
        }
        synchronized (me) {
            super.dispose();
    //#URLDialog.java:168: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.StandardDialog:dispose()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
    //#    method: void dispose()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.StandardDialog:dispose()
            me = null;
        }
    }
    //#URLDialog.java:171: end of method: void com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.dispose()
}
    //#output(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/dialogs/url/URLDialog]
    //#output(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V
    //#output(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.addListeners()V
    //#output(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.dispose()V
    //#output(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.initComponents()V
    //#output(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.layoutComponents()V
    //#output(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.validate()V
    //#post(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/dialogs/url/URLDialog] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V == &actionPerformed
    //#post(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.addListeners()V == &addListeners
    //#post(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.dispose()V == &dispose
    //#post(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.initComponents()V == &initComponents
    //#post(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.layoutComponents()V == &layoutComponents
    //#post(com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init): __Dispatch_Table.validate()V == &validate
    //#URLDialog.java:: end of method: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog.com.dmdirc.addons.ui_swing.dialogs.url.URLDialog__static_init
    //#URLDialog.java:: end of class: com.dmdirc.addons.ui_swing.dialogs.url.URLDialog
