//# 0 errors, 96 messages
//#
/*
    //#NowPlayingSubsitutionPanel.java:1:1: class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1
    //#NowPlayingSubsitutionPanel.java:1:1: method: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1__static_init
    //#NowPlayingSubsitutionPanel.java:1:1: class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel
    //#NowPlayingSubsitutionPanel.java:1:1: method: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel__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.nowplaying;

import com.dmdirc.addons.ui_swing.components.substitutions.Substitution;
import com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionLabel;
import com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel;

import java.util.ArrayList;
import java.util.List;

import javax.swing.SwingUtilities;

/**
 * Now playing substitutions panel.
 */
public class NowPlayingSubsitutionPanel extends SubstitutionsPanel<List<String>> {
    //#NowPlayingSubsitutionPanel.java:37: method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.setType(Object)
    //#input(void setType(Object)): __Descendant_Table[com/dmdirc/addons/nowplaying/NowPlayingSubsitutionPanel]
    //#input(void setType(Object)): __Descendant_Table[others]
    //#input(void setType(Object)): __Dispatch_Table.setType(Ljava/util/List;)V
    //#input(void setType(Object)): this
    //#input(void setType(Object)): this.__Tag
    //#input(void setType(Object)): x0
    //#pre[2] (void setType(Object)): this.__Tag == com/dmdirc/addons/nowplaying/NowPlayingSubsitutionPanel
    //#unanalyzed(void setType(Object)): Effects-of-calling:javax.swing.SwingUtilities:invokeLater
    //#NowPlayingSubsitutionPanel.java:37: end of method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.setType(Object)
    //#NowPlayingSubsitutionPanel.java:37: method: List com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.access$002(NowPlayingSubsitutionPanel, List)
    //#input(List access$002(NowPlayingSubsitutionPanel, List)): x0
    //#input(List access$002(NowPlayingSubsitutionPanel, List)): x1
    //#output(List access$002(NowPlayingSubsitutionPanel, List)): return_value
    //#output(List access$002(NowPlayingSubsitutionPanel, List)): x0.substitutions
    //#pre[1] (List access$002(NowPlayingSubsitutionPanel, List)): x0 != null
    //#post(List access$002(NowPlayingSubsitutionPanel, List)): return_value == x1
    //#post(List access$002(NowPlayingSubsitutionPanel, List)): init'ed(return_value)
    //#post(List access$002(NowPlayingSubsitutionPanel, List)): x0.substitutions == return_value
    //#NowPlayingSubsitutionPanel.java:37: end of method: List com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.access$002(NowPlayingSubsitutionPanel, List)
    //#NowPlayingSubsitutionPanel.java:37: method: List com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.access$100(NowPlayingSubsitutionPanel)
    //#input(List access$100(NowPlayingSubsitutionPanel)): x0
    //#input(List access$100(NowPlayingSubsitutionPanel)): x0.substitutions
    //#output(List access$100(NowPlayingSubsitutionPanel)): return_value
    //#pre[1] (List access$100(NowPlayingSubsitutionPanel)): x0 != null
    //#pre[2] (List access$100(NowPlayingSubsitutionPanel)): init'ed(x0.substitutions)
    //#post(List access$100(NowPlayingSubsitutionPanel)): return_value == x0.substitutions
    //#post(List access$100(NowPlayingSubsitutionPanel)): init'ed(return_value)
    //#NowPlayingSubsitutionPanel.java:37: end of method: List com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.access$100(NowPlayingSubsitutionPanel)
    //#NowPlayingSubsitutionPanel.java:37: method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.access$200(NowPlayingSubsitutionPanel)
    //#NowPlayingSubsitutionPanel.java:37: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel:layoutComponents()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel
    //#    method: void access$200(NowPlayingSubsitutionPanel)
    //#    unanalyzed callee: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel:layoutComponents()
    //#input(void access$200(NowPlayingSubsitutionPanel)): x0
    //#pre[1] (void access$200(NowPlayingSubsitutionPanel)): x0 != null
    //#NowPlayingSubsitutionPanel.java:37: end of method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.access$200(NowPlayingSubsitutionPanel)

    /**
     * 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;

    /**
     * Instantiates a new now playing subsitutiuons panel.
     */
    public NowPlayingSubsitutionPanel() {
        super("Substitutions may be used as part of the output format", SubstitutionsPanel.Alignment.HORIZONTAL, null);
    //#NowPlayingSubsitutionPanel.java:50: method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel()
    //#NowPlayingSubsitutionPanel.java:50: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel(String, SubstitutionsPanel$Alignment, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel
    //#    method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel(String, SubstitutionsPanel$Alignment, Object)
    //#input(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel()): com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel$Alignment.HORIZONTAL
    //#input(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel()): this
    //#presumption(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel()): init'ed(com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel$Alignment.HORIZONTAL)
    }
    //#NowPlayingSubsitutionPanel.java:51: end of method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel()

    /**
     * Instantiates a new now playing subsitutiuons panel.
     * 
     * @param subs list of substitutions.
     */
    public NowPlayingSubsitutionPanel(final List<String> subs) {
        super("Substitutions may be used as part of the output format", SubstitutionsPanel.Alignment.HORIZONTAL, subs);
    //#NowPlayingSubsitutionPanel.java:59: method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel(List)
    //#NowPlayingSubsitutionPanel.java:59: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel(String, SubstitutionsPanel$Alignment, Object)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel
    //#    method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel(List)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel(String, SubstitutionsPanel$Alignment, Object)
    //#input(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel(List)): com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel$Alignment.HORIZONTAL
    //#input(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel(List)): subs
    //#input(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel(List)): this
    //#presumption(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel(List)): init'ed(com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionsPanel$Alignment.HORIZONTAL)
    }
    //#NowPlayingSubsitutionPanel.java:60: end of method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel(List)

    /** {@inheritDoc} */
    @Override
    public void setType(final List<String> type) {
        SwingUtilities.invokeLater(new Runnable() {
    //#NowPlayingSubsitutionPanel.java:65: method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)
    //#input(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): Param_1
    //#input(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): Param_2
    //#input(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): this
    //#output(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): this.this$0
    //#output(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): this.val$type
    //#post(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): this.this$0 == Param_1
    //#post(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): init'ed(this.this$0)
    //#post(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): this.val$type == Param_2
    //#post(void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)): init'ed(this.val$type)
    //#NowPlayingSubsitutionPanel.java:65: end of method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1(NowPlayingSubsitutionPanel, List)
    //#NowPlayingSubsitutionPanel.java:65: method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.setType(List)
    //#input(void setType(List)): this
    //#input(void setType(List)): type

            /** {@inheritDoc} */
            @Override
            public void run() {
                substitutions = new ArrayList<SubstitutionLabel>();
    //#NowPlayingSubsitutionPanel.java:70: method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1.run()
    //#input(void run()): this
    //#input(void run()): this.this$0
    //#input(void run()): this.val$type
    //#output(void run()): new ArrayList(run#1) num objects
    //#output(void run()): this.this$0.substitutions
    //#new obj(void run()): new ArrayList(run#1)
    //#pre[2] (void run()): this.this$0 != null
    //#post(void run()): this.this$0.substitutions == &new ArrayList(run#1)
    //#post(void run()): new ArrayList(run#1) num objects == 1
    //#unanalyzed(void run()): Effects-of-calling:com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel:layoutComponents
    //#test_vector(void run()): this.val$type: Addr_Set{null}, Inverse{null}
    //#test_vector(void run()): java.util.Iterator:hasNext(...)@73: {0}, {1}

                if (type != null) {
                    for (String sub : type) {
                        substitutions.add(new SubstitutionLabel(new Substitution(sub,
    //#NowPlayingSubsitutionPanel.java:74: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1
    //#    method: void run()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)
    //#NowPlayingSubsitutionPanel.java:74: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionLabel(Substitution)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1
    //#    method: void run()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.substitutions.SubstitutionLabel(Substitution)
                                sub)));
                    }
                }

                layoutComponents();
            }
    //#NowPlayingSubsitutionPanel.java:80: end of method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1.run()
        });
    }
    //#NowPlayingSubsitutionPanel.java:82: end of method: void com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.setType(List)
}
    //#output(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1__static_init): __Descendant_Table[com/dmdirc/addons/nowplaying/NowPlayingSubsitutionPanel$1]
    //#output(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1__static_init): __Dispatch_Table.run()V
    //#post(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1__static_init): __Descendant_Table[com/dmdirc/addons/nowplaying/NowPlayingSubsitutionPanel$1] == &__Dispatch_Table
    //#post(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1__static_init): __Dispatch_Table.run()V == &run
    //#NowPlayingSubsitutionPanel.java:: end of method: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1__static_init
    //#NowPlayingSubsitutionPanel.java:: end of class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel$1
    //#output(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel__static_init): __Descendant_Table[com/dmdirc/addons/nowplaying/NowPlayingSubsitutionPanel]
    //#output(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel__static_init): __Dispatch_Table.setType(Ljava/lang/Object;)V
    //#output(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel__static_init): __Dispatch_Table.setType(Ljava/util/List;)V
    //#post(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel__static_init): __Descendant_Table[com/dmdirc/addons/nowplaying/NowPlayingSubsitutionPanel] == &__Dispatch_Table
    //#post(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel__static_init): __Dispatch_Table.setType(Ljava/lang/Object;)V == &setType
    //#post(com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel__static_init): __Dispatch_Table.setType(Ljava/util/List;)V == &setType
    //#NowPlayingSubsitutionPanel.java:: end of method: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel.com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel__static_init
    //#NowPlayingSubsitutionPanel.java:: end of class: com.dmdirc.addons.nowplaying.NowPlayingSubsitutionPanel
