//# 0 errors, 371 messages
//#
/*
    //#ThemePanel.java:1:1: class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1
    //#ThemePanel.java:1:1: method: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1.com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1__static_init
    //#ThemePanel.java:1:1: class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#ThemePanel.java:1:1: method: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__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.themepanel;

import com.dmdirc.config.IdentityManager;
import com.dmdirc.config.prefs.PreferencesInterface;
import com.dmdirc.addons.ui_swing.components.LoggingSwingWorker;
import com.dmdirc.ui.themes.Theme;
import com.dmdirc.ui.themes.ThemeManager;
import com.dmdirc.addons.ui_swing.components.text.TextLabel;
import com.dmdirc.addons.ui_swing.components.renderers.AddonCellRenderer;
import com.dmdirc.util.URLHandler;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

import net.miginfocom.swing.MigLayout;

/**
 * Theme panel. Shows users available themes and allows them to enable/disbale
 * them.
 */
public final class ThemePanel extends JPanel implements
    //#ThemePanel.java:55: method: JList com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.access$000(ThemePanel)
    //#input(JList access$000(ThemePanel)): x0
    //#input(JList access$000(ThemePanel)): x0.themeList
    //#input(JList access$000(ThemePanel)): x0.toggleButton
    //#output(JList access$000(ThemePanel)): return_value
    //#pre[1] (JList access$000(ThemePanel)): x0 != null
    //#pre[2] (JList access$000(ThemePanel)): x0.themeList != null
    //#pre[3] (JList access$000(ThemePanel)): (soft) x0.toggleButton != null
    //#post(JList access$000(ThemePanel)): return_value == x0.themeList
    //#post(JList access$000(ThemePanel)): return_value != null
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:javax.swing.JButton:setEnabled
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:com.dmdirc.ui.themes.ThemeManager:getAvailableThemes
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:java.util.Map:values
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:java.util.Collections:sort
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:javax.swing.JList:getModel
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:javax.swing.DefaultListModel:clear
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:com.dmdirc.ui.themes.Theme:isEnabled
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:javax.swing.DefaultListModel:addElement
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:javax.swing.DefaultListModel:size
    //#unanalyzed(JList access$000(ThemePanel)): Effects-of-calling:javax.swing.JList:repaint
    //#ThemePanel.java:55: end of method: JList com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.access$000(ThemePanel)
    //#ThemePanel.java:55: method: JList com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.access$100(ThemePanel)
    //#input(JList access$100(ThemePanel)): x0
    //#input(JList access$100(ThemePanel)): x0.themeList
    //#output(JList access$100(ThemePanel)): return_value
    //#pre[1] (JList access$100(ThemePanel)): x0 != null
    //#pre[2] (JList access$100(ThemePanel)): init'ed(x0.themeList)
    //#post(JList access$100(ThemePanel)): return_value == x0.themeList
    //#post(JList access$100(ThemePanel)): init'ed(return_value)
    //#ThemePanel.java:55: end of method: JList com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.access$100(ThemePanel)
    //#ThemePanel.java:55: method: JScrollPane com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.access$200(ThemePanel)
    //#input(JScrollPane access$200(ThemePanel)): x0
    //#input(JScrollPane access$200(ThemePanel)): x0.scrollPane
    //#output(JScrollPane access$200(ThemePanel)): return_value
    //#pre[1] (JScrollPane access$200(ThemePanel)): x0 != null
    //#pre[2] (JScrollPane access$200(ThemePanel)): init'ed(x0.scrollPane)
    //#post(JScrollPane access$200(ThemePanel)): return_value == x0.scrollPane
    //#post(JScrollPane access$200(ThemePanel)): init'ed(return_value)
    //#ThemePanel.java:55: end of method: JScrollPane com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.access$200(ThemePanel)
        ActionListener, ListSelectionListener, PreferencesInterface {
    
    /**
     * 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 = 3;
    
    /** List of themes. */
    private JList themeList;
    
    /** plugin list scroll pane. */
    private JScrollPane scrollPane;
    
    /** Button to enable/disable theme. */
    private JButton toggleButton;
    
    /** Currently selected theme. */
    private int selectedTheme;
    
    /** Blurb label. */
    private TextLabel blurbLabel;
    
    /** Creates a new instance of PluginDialog. */
    public ThemePanel() {
        super();
    //#ThemePanel.java:82: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): "; "._tainted
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): "body { font-family: "._tainted
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): "font-size: "._tainted
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): "pt; }"._tainted
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): com/dmdirc/addons/ui_swing/components/text/TextLabel.__Descendant_Table[com/dmdirc/addons/ui_swing/components/text/TextLabel]
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): com/dmdirc/addons/ui_swing/components/text/TextLabel.__Descendant_Table[others]
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): com/dmdirc/addons/ui_swing/components/text/TextLabel.__Dispatch_Table.getDocument()Ljavax/swing/text/StyledDocument;
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): com/dmdirc/addons/ui_swing/components/text/TextLabel.__Dispatch_Table.setText(Ljava/lang/String;)V
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JButton(initComponents#6) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JList(initComponents#1) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JScrollPane(initComponents#4) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new SimpleAttributeSet(TextLabel#6) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new TextLabel(initComponents#7) num objects
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new TextLabel(initComponents#7).__Tag
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new TextLabel(initComponents#7).sas
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.blurbLabel
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.scrollPane
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.selectedTheme
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.themeList
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.toggleButton
    //#new obj(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JButton(initComponents#6)
    //#new obj(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JList(initComponents#1)
    //#new obj(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JScrollPane(initComponents#4)
    //#new obj(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new SimpleAttributeSet(TextLabel#6)
    //#new obj(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new TextLabel(initComponents#7)
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.blurbLabel == &new TextLabel(initComponents#7)
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.scrollPane == &new JScrollPane(initComponents#4)
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.selectedTheme == 0
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.themeList == &new JList(initComponents#1)
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): this.toggleButton == &new JButton(initComponents#6)
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JButton(initComponents#6) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JList(initComponents#1) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new JScrollPane(initComponents#4) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new SimpleAttributeSet(TextLabel#6) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new TextLabel(initComponents#7) num objects == 1
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new TextLabel(initComponents#7).__Tag == com/dmdirc/addons/ui_swing/components/text/TextLabel
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): new TextLabel(initComponents#7).sas == &new SimpleAttributeSet(TextLabel#6)
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.DefaultListModel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JList
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JPanel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JList:setCellRenderer
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JLabel
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JScrollPane
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JScrollPane:setHorizontalScrollBarPolicy
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JScrollPane:setVerticalScrollBarPolicy
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JButton
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JButton:setEnabled
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JTextPane:getDocument
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JTextPane:setText
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.text.StyledDocument:setParagraphAttributes
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.text.DefaultStyledDocument
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JTextPane
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.text.html.HTMLEditorKit
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setEditorKit
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.plaf.basic.BasicTextPaneUI
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setUI
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.UIManager:getFont
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.text.html.HTMLDocument:getStyleSheet
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:java.awt.Font:getFamily
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:java.awt.Font:getSize
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.text.html.StyleSheet:addRule
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setOpaque
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setEditable
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setHighlighter
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setMargin
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.text.SimpleAttributeSet
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.text.StyleConstants:setAlignment
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.LoggingSwingWorker
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1:execute
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JButton:addActionListener
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:javax.swing.JList:addListSelectionListener
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:net.miginfocom.swing.MigLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:setLayout
    //#unanalyzed(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add

        initComponents();
        addListeners();
        layoutComponents();
        
        themeList.setSelectedIndex(0);
        selectedTheme = 0;
    }
    //#ThemePanel.java:90: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel()
    
    /** Initialises the components. */
    private void initComponents() {                        
        themeList = new JList(new DefaultListModel());
    //#ThemePanel.java:94: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.initComponents()
    //#input(void initComponents()): "; "._tainted
    //#input(void initComponents()): "body { font-family: "._tainted
    //#input(void initComponents()): "font-size: "._tainted
    //#input(void initComponents()): "pt; }"._tainted
    //#input(void initComponents()): com/dmdirc/addons/ui_swing/components/text/TextLabel.__Descendant_Table[com/dmdirc/addons/ui_swing/components/text/TextLabel]
    //#input(void initComponents()): com/dmdirc/addons/ui_swing/components/text/TextLabel.__Descendant_Table[others]
    //#input(void initComponents()): com/dmdirc/addons/ui_swing/components/text/TextLabel.__Dispatch_Table.getDocument()Ljavax/swing/text/StyledDocument;
    //#input(void initComponents()): com/dmdirc/addons/ui_swing/components/text/TextLabel.__Dispatch_Table.setText(Ljava/lang/String;)V
    //#input(void initComponents()): this
    //#output(void initComponents()): new JButton(initComponents#6) num objects
    //#output(void initComponents()): new JList(initComponents#1) num objects
    //#output(void initComponents()): new JScrollPane(initComponents#4) num objects
    //#output(void initComponents()): new SimpleAttributeSet(TextLabel#6) num objects
    //#output(void initComponents()): new TextLabel(initComponents#7) num objects
    //#output(void initComponents()): this.blurbLabel.__Tag
    //#output(void initComponents()): this.blurbLabel.sas
    //#output(void initComponents()): this.blurbLabel
    //#output(void initComponents()): this.scrollPane
    //#output(void initComponents()): this.themeList
    //#output(void initComponents()): this.toggleButton
    //#new obj(void initComponents()): new JButton(initComponents#6)
    //#new obj(void initComponents()): new JList(initComponents#1)
    //#new obj(void initComponents()): new JScrollPane(initComponents#4)
    //#new obj(void initComponents()): new SimpleAttributeSet(TextLabel#6)
    //#new obj(void initComponents()): new TextLabel(initComponents#7)
    //#post(void initComponents()): this.blurbLabel == &new TextLabel(initComponents#7)
    //#post(void initComponents()): this.scrollPane == &new JScrollPane(initComponents#4)
    //#post(void initComponents()): this.themeList == &new JList(initComponents#1)
    //#post(void initComponents()): this.toggleButton == &new JButton(initComponents#6)
    //#post(void initComponents()): new JButton(initComponents#6) num objects == 1
    //#post(void initComponents()): new JList(initComponents#1) num objects == 1
    //#post(void initComponents()): new JScrollPane(initComponents#4) num objects == 1
    //#post(void initComponents()): new SimpleAttributeSet(TextLabel#6) num objects == 1
    //#post(void initComponents()): new TextLabel(initComponents#7) num objects == 1
    //#post(void initComponents()): this.blurbLabel.__Tag == com/dmdirc/addons/ui_swing/components/text/TextLabel
    //#post(void initComponents()): this.blurbLabel.sas == &new SimpleAttributeSet(TextLabel#6)
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.JPanel
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.JTextPane:getDocument
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.JTextPane:setText
    //#unanalyzed(void initComponents()): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void initComponents()): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.text.StyledDocument:setParagraphAttributes
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.text.DefaultStyledDocument
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.JTextPane
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.text.html.HTMLEditorKit
    //#unanalyzed(void initComponents()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setEditorKit
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.plaf.basic.BasicTextPaneUI
    //#unanalyzed(void initComponents()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setUI
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.UIManager:getFont
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.text.html.HTMLDocument:getStyleSheet
    //#unanalyzed(void initComponents()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void initComponents()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void initComponents()): Effects-of-calling:java.awt.Font:getFamily
    //#unanalyzed(void initComponents()): Effects-of-calling:java.awt.Font:getSize
    //#unanalyzed(void initComponents()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.text.html.StyleSheet:addRule
    //#unanalyzed(void initComponents()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setOpaque
    //#unanalyzed(void initComponents()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setEditable
    //#unanalyzed(void initComponents()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setHighlighter
    //#unanalyzed(void initComponents()): Effects-of-calling:java.awt.Insets
    //#unanalyzed(void initComponents()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.text.TextLabel:setMargin
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.text.SimpleAttributeSet
    //#unanalyzed(void initComponents()): Effects-of-calling:javax.swing.text.StyleConstants:setAlignment
    //#unanalyzed(void initComponents()): Effects-of-calling:com.dmdirc.addons.ui_swing.components.LoggingSwingWorker
        themeList.setCellRenderer(new AddonCellRenderer());
        
        scrollPane = new JScrollPane(new JLabel("Loading plugins..."));
        scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
                
        toggleButton = new JButton("Enable");
        toggleButton.setEnabled(false);
        
        blurbLabel = new TextLabel("Themes alter the appearance of DMDirc");
        
        /** {@inheritDoc}. */
        new LoggingSwingWorker() {
    //#ThemePanel.java:107: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1.com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1(ThemePanel)
    //#ThemePanel.java:107: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1
    //#    method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1(ThemePanel)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker()
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1(ThemePanel)): Param_1
    //#input(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1(ThemePanel)): this
    //#output(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1(ThemePanel)): this.this$0
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1(ThemePanel)): this.this$0 == Param_1
    //#post(void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1(ThemePanel)): init'ed(this.this$0)
    //#ThemePanel.java:107: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1.com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1(ThemePanel)
    //#ThemePanel.java:107: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1:execute()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void initComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1:execute()

            /** {@inheritDoc}. */
            @Override
            protected Object doInBackground() {
                return populateList();
    //#ThemePanel.java:112: method: Object com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1.doInBackground()
    //#input(Object doInBackground()): this
    //#input(Object doInBackground()): this.this$0
    //#input(Object doInBackground()): this.this$0.themeList
    //#input(Object doInBackground()): this.this$0.toggleButton
    //#output(Object doInBackground()): return_value
    //#pre[2] (Object doInBackground()): this.this$0 != null
    //#pre[3] (Object doInBackground()): this.themeList != null
    //#pre[4] (Object doInBackground()): (soft) this.toggleButton != null
    //#post(Object doInBackground()): return_value == this.themeList
    //#post(Object doInBackground()): return_value != null
    //#unanalyzed(Object doInBackground()): Effects-of-calling:javax.swing.JButton:setEnabled
    //#unanalyzed(Object doInBackground()): Effects-of-calling:com.dmdirc.ui.themes.ThemeManager:getAvailableThemes
    //#unanalyzed(Object doInBackground()): Effects-of-calling:java.util.Map:values
    //#unanalyzed(Object doInBackground()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(Object doInBackground()): Effects-of-calling:java.util.Collections:sort
    //#unanalyzed(Object doInBackground()): Effects-of-calling:javax.swing.JList:getModel
    //#unanalyzed(Object doInBackground()): Effects-of-calling:javax.swing.DefaultListModel:clear
    //#unanalyzed(Object doInBackground()): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(Object doInBackground()): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(Object doInBackground()): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(Object doInBackground()): Effects-of-calling:com.dmdirc.ui.themes.Theme:isEnabled
    //#unanalyzed(Object doInBackground()): Effects-of-calling:javax.swing.DefaultListModel:addElement
    //#unanalyzed(Object doInBackground()): Effects-of-calling:javax.swing.DefaultListModel:size
    //#unanalyzed(Object doInBackground()): Effects-of-calling:javax.swing.JList:repaint
    //#ThemePanel.java:112: end of method: Object com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1.doInBackground()
            }

            /** {@inheritDoc}. */
            @Override
            protected void done() {
                super.done();
    //#ThemePanel.java:118: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1.done()
    //#ThemePanel.java:118: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker:done()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1
    //#    method: void done()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker:done()
    //#input(void done()): this
    //#input(void done()): this.this$0
    //#input(void done()): this.this$0.scrollPane
    //#input(void done()): this.this$0.themeList
    //#pre[2] (void done()): this.this$0 != null
    //#pre[3] (void done()): this.scrollPane != null
    //#pre[4] (void done()): init'ed(this.themeList)
                scrollPane.setViewportView(themeList);
            }
    //#ThemePanel.java:120: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1.done()
        }.execute();
    }
    //#ThemePanel.java:122: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.initComponents()
    
    /** Lays out the dialog. */
    private void layoutComponents() {
        setLayout(new MigLayout("ins 0, fill"));
    //#ThemePanel.java:126: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.layoutComponents()
    //#ThemePanel.java:126: Warning: method not available - call not analyzed
    //#    call on void net.miginfocom.swing.MigLayout(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void net.miginfocom.swing.MigLayout(String)
    //#ThemePanel.java:126: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:setLayout(LayoutManager)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:setLayout(LayoutManager)
    //#input(void layoutComponents()): this
    //#input(void layoutComponents()): this.blurbLabel
    //#input(void layoutComponents()): this.scrollPane
    //#input(void layoutComponents()): this.toggleButton
    //#pre[2] (void layoutComponents()): init'ed(this.blurbLabel)
    //#pre[3] (void layoutComponents()): init'ed(this.scrollPane)
    //#pre[4] (void layoutComponents()): init'ed(this.toggleButton)
        
        add(blurbLabel, "wrap 10, growx, pushx");
    //#ThemePanel.java:128: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add(Component, Object)
        
        add(scrollPane, "wrap 5, grow, push");
    //#ThemePanel.java:130: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add(Component, Object)
               
        add(toggleButton, "split 2, growx, pushx, sg button");
    //#ThemePanel.java:132: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add(Component, Object)
        
        final JButton button = new JButton("Get more themes");
        button.addActionListener(this);
        add(button, "growx, pushx, sg button");
    //#ThemePanel.java:136: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add(Component, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void layoutComponents()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel:add(Component, Object)
    }
    //#ThemePanel.java:137: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.layoutComponents()
    
    
    /** 
     * Populates the plugins list with plugins from the plugin manager. 
     * 
     * @return Populated list
     */
    private JList populateList() {
        final List<Theme> list = new ArrayList<Theme>(ThemeManager.getAvailableThemes().values());
    //#ThemePanel.java:146: method: JList com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.populateList()
    //#ThemePanel.java:146: Warning: method not available - call not analyzed
    //#    call on Map com.dmdirc.ui.themes.ThemeManager:getAvailableThemes()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: JList populateList()
    //#    unanalyzed callee: Map com.dmdirc.ui.themes.ThemeManager:getAvailableThemes()
    //#input(JList populateList()): this
    //#input(JList populateList()): this.themeList
    //#input(JList populateList()): this.toggleButton
    //#output(JList populateList()): return_value
    //#pre[2] (JList populateList()): this.themeList != null
    //#pre[3] (JList populateList()): (soft) this.toggleButton != null
    //#presumption(JList populateList()): com.dmdirc.ui.themes.ThemeManager:getAvailableThemes(...)@146 != null
    //#presumption(JList populateList()): java.util.Iterator:next(...)@151 != null
    //#presumption(JList populateList()): javax.swing.JList:getModel(...)@149 != null
    //#presumption(JList populateList()): javax.swing.JList:getModel(...)@152 != null
    //#presumption(JList populateList()): javax.swing.JList:getModel(...)@155 != null
    //#post(JList populateList()): return_value == this.themeList
    //#post(JList populateList()): return_value != null
    //#unanalyzed(JList populateList()): Effects-of-calling:com.dmdirc.ui.themes.Theme:isEnabled
    //#test_vector(JList populateList()): java.util.Iterator:hasNext(...)@151: {0}, {1}
    //#test_vector(JList populateList()): javax.swing.DefaultListModel:size(...)@155: {-2_147_483_648..0}, {1..4_294_967_295}
        Collections.sort(list);
        
        ((DefaultListModel) themeList.getModel()).clear();
        
        for (Theme plugin : list) {
            ((DefaultListModel) themeList.getModel()).addElement(new ThemeToggle(plugin));
        }
        
        if (((DefaultListModel) themeList.getModel()).size() > 0) {
            toggleButton.setEnabled(true);
        }
        
        themeList.repaint();
        return themeList;
    //#ThemePanel.java:160: end of method: JList com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.populateList()
    }
    
    /** Adds listeners to components. */
    private void addListeners() {
        toggleButton.addActionListener(this);
    //#ThemePanel.java:165: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.addListeners()
    //#input(void addListeners()): this
    //#input(void addListeners()): this.themeList
    //#input(void addListeners()): this.toggleButton
    //#pre[2] (void addListeners()): this.themeList != null
    //#pre[3] (void addListeners()): this.toggleButton != null
        themeList.addListSelectionListener(this);
    }
    //#ThemePanel.java:167: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.addListeners()
    
    /**
     * Invoked when an action occurs.
     * 
     * @param e The event related to this action.
     */
    @Override
    public void actionPerformed(final ActionEvent e) {
        if (e.getSource() == toggleButton && selectedTheme >= 0) {
    //#ThemePanel.java:176: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.actionPerformed(ActionEvent)
    //#input(void actionPerformed(ActionEvent)): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Descendant_Table[com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle]
    //#input(void actionPerformed(ActionEvent)): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Descendant_Table[others]
    //#input(void actionPerformed(ActionEvent)): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Dispatch_Table.getState()Z
    //#input(void actionPerformed(ActionEvent)): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Dispatch_Table.toggle()V
    //#input(void actionPerformed(ActionEvent)): e
    //#input(void actionPerformed(ActionEvent)): this
    //#input(void actionPerformed(ActionEvent)): this.selectedTheme
    //#input(void actionPerformed(ActionEvent)): this.themeList
    //#input(void actionPerformed(ActionEvent)): this.toggleButton
    //#pre[1] (void actionPerformed(ActionEvent)): e != null
    //#pre[3] (void actionPerformed(ActionEvent)): (soft) init'ed(this.selectedTheme)
    //#pre[4] (void actionPerformed(ActionEvent)): (soft) this.themeList != null
    //#pre[5] (void actionPerformed(ActionEvent)): (soft) this.toggleButton != null
    //#presumption(void actionPerformed(ActionEvent)): com.dmdirc.util.URLHandler:getURLHander(...)@189 != null
    //#presumption(void actionPerformed(ActionEvent)): javax.swing.JList:getSelectedValue(...).__Tag@177 == com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle
    //#presumption(void actionPerformed(ActionEvent)): javax.swing.JList:getSelectedValue(...)@177 != null
    //#test_vector(void actionPerformed(ActionEvent)): this.selectedTheme: {-2_147_483_648..-1}, {0..4_294_967_295}
    //#test_vector(void actionPerformed(ActionEvent)): theme.enable@177: {1}, {0}
            final ThemeToggle theme = (ThemeToggle) themeList.getSelectedValue();
            
            theme.toggle();
            
            if (theme.getState()) {
                toggleButton.setText("Disable");
            } else {
                toggleButton.setText("Enable");
            }
            
            themeList.repaint();
        } else if (e.getSource() != toggleButton) {
            URLHandler.getURLHander().launchApp("http://addons.dmdirc.com/");
    //#ThemePanel.java:189: Warning: method not available - call not analyzed
    //#    call on URLHandler com.dmdirc.util.URLHandler:getURLHander()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: URLHandler com.dmdirc.util.URLHandler:getURLHander()
    //#ThemePanel.java:189: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.util.URLHandler:launchApp(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: void com.dmdirc.util.URLHandler:launchApp(String)
        }
    }
    //#ThemePanel.java:191: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.actionPerformed(ActionEvent)
    
    /** {@inheritDoc}. */
    @Override
    public void valueChanged(final ListSelectionEvent e) {
        if (!e.getValueIsAdjusting()) {
    //#ThemePanel.java:196: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.valueChanged(ListSelectionEvent)
    //#input(void valueChanged(ListSelectionEvent)): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Descendant_Table[com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle]
    //#input(void valueChanged(ListSelectionEvent)): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Descendant_Table[others]
    //#input(void valueChanged(ListSelectionEvent)): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Dispatch_Table.getState()Z
    //#input(void valueChanged(ListSelectionEvent)): e
    //#input(void valueChanged(ListSelectionEvent)): this
    //#input(void valueChanged(ListSelectionEvent)): this.toggleButton
    //#output(void valueChanged(ListSelectionEvent)): this.selectedTheme
    //#pre[1] (void valueChanged(ListSelectionEvent)): e != null
    //#pre[4] (void valueChanged(ListSelectionEvent)): (soft) this.toggleButton != null
    //#presumption(void valueChanged(ListSelectionEvent)): javax.swing.JList:getSelectedValue(...).__Tag@199 == com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle
    //#presumption(void valueChanged(ListSelectionEvent)): javax.swing.JList:getSelectedValue(...)@199 != null
    //#presumption(void valueChanged(ListSelectionEvent)): javax.swing.event.ListSelectionEvent:getSource(...)@197 != null
    //#presumption(void valueChanged(ListSelectionEvent)): javax.swing.event.ListSelectionEvent:getSource(...)@199 != null
    //#post(void valueChanged(ListSelectionEvent)): possibly_updated(this.selectedTheme)
    //#test_vector(void valueChanged(ListSelectionEvent)): javax.swing.JList:getSelectedIndex(...)@197: {-2_147_483_648..-1}, {0..4_294_967_295}
    //#test_vector(void valueChanged(ListSelectionEvent)): javax.swing.event.ListSelectionEvent:getValueIsAdjusting(...)@196: {1}, {0}
    //#test_vector(void valueChanged(ListSelectionEvent)): theme.enable@199: {0}, {1}
            final int selected = ((JList) e.getSource()).getSelectedIndex();
            if (selected >= 0) {
                final ThemeToggle theme = (ThemeToggle) 
                        ((JList) e.getSource()).getSelectedValue();
                toggleButton.setEnabled(true);
                
                if (theme.getState()) {
                    toggleButton.setText("Disable");
                } else {
                    toggleButton.setText("Enable");
                }
            }
            selectedTheme = selected;
        }
    }
    //#ThemePanel.java:211: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.valueChanged(ListSelectionEvent)
    
    /** {@inheritDoc} */
    @Override
    public void save() {
        final List<String> enabled = new ArrayList<String>();
    //#ThemePanel.java:216: method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.save()
    //#input(void save()): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Descendant_Table[com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle]
    //#input(void save()): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Descendant_Table[others]
    //#input(void save()): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Dispatch_Table.getState()Z
    //#input(void save()): com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle.__Dispatch_Table.getTheme()Lcom/dmdirc/ui/themes/Theme;
    //#input(void save()): this
    //#input(void save()): this.themeList
    //#pre[2] (void save()): this.themeList != null
    //#presumption(void save()): arr$.length@218 <= 4_294_967_295
    //#presumption(void save()): arr$[i$]@218 != null
    //#presumption(void save()): com.dmdirc.config.IdentityManager:getConfigIdentity(...)@224 != null
    //#presumption(void save()): javax.swing.DefaultListModel:toArray(...)@218 != null
    //#presumption(void save()): javax.swing.JList:getModel(...)@218 != null
    //#presumption(void save()): pit.__Tag@218 == com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle
    //#presumption(void save()): pit.__Tag@218 == com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle
    //#presumption(void save()): pit.__Tag@218 == com/dmdirc/addons/ui_swing/components/themepanel/ThemeToggle
    //#presumption(void save()): pit.theme@218 != null
    //#test_vector(void save()): pit.enable@218: {0}, {1}
        
        for (Object pit : ((DefaultListModel) themeList.getModel()).toArray()) {
            if (((ThemeToggle) pit).getState()) {
                enabled.add(((ThemeToggle) pit).getTheme().getFileName());
    //#ThemePanel.java:220: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.ui.themes.Theme:getFileName()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void save()
    //#    unanalyzed callee: String com.dmdirc.ui.themes.Theme:getFileName()
            }
        }
        
        IdentityManager.getConfigIdentity().setOption("themes", "enabled", enabled);
    //#ThemePanel.java:224: Warning: method not available - call not analyzed
    //#    call on Identity com.dmdirc.config.IdentityManager:getConfigIdentity()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void save()
    //#    unanalyzed callee: Identity com.dmdirc.config.IdentityManager:getConfigIdentity()
    //#ThemePanel.java:224: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.Identity:setOption(String, String, List)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
    //#    method: void save()
    //#    unanalyzed callee: void com.dmdirc.config.Identity:setOption(String, String, List)
    }
    //#ThemePanel.java:225: end of method: void com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.save()
    
}
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/themepanel/ThemePanel$1]
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1__static_init): __Dispatch_Table.doInBackground()Ljava/lang/Object;
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1__static_init): __Dispatch_Table.done()V
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/themepanel/ThemePanel$1] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1__static_init): __Dispatch_Table.doInBackground()Ljava/lang/Object; == &doInBackground
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1__static_init): __Dispatch_Table.done()V == &done
    //#ThemePanel.java:: end of method: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1.com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1__static_init
    //#ThemePanel.java:: end of class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel$1
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/themepanel/ThemePanel]
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.addListeners()V
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.initComponents()V
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.layoutComponents()V
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.populateList()Ljavax/swing/JList;
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.save()V
    //#output(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.valueChanged(Ljavax/swing/event/ListSelectionEvent;)V
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/themepanel/ThemePanel] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V == &actionPerformed
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.addListeners()V == &addListeners
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.initComponents()V == &initComponents
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.layoutComponents()V == &layoutComponents
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.populateList()Ljavax/swing/JList; == &populateList
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.save()V == &save
    //#post(com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init): __Dispatch_Table.valueChanged(Ljavax/swing/event/ListSelectionEvent;)V == &valueChanged
    //#ThemePanel.java:: end of method: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel.com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel__static_init
    //#ThemePanel.java:: end of class: com.dmdirc.addons.ui_swing.components.themepanel.ThemePanel
