//# 0 errors, 26 messages
//#
/*
    //#WindowStatusPanel.java:1:1: class: com.dmdirc.addons.windowstatus.WindowStatusPanel
    //#WindowStatusPanel.java:1:1: method: com.dmdirc.addons.windowstatus.WindowStatusPanel.com.dmdirc.addons.windowstatus.WindowStatusPanel__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.windowstatus;

import com.dmdirc.ui.interfaces.StatusBarComponent;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;

import net.miginfocom.swing.MigLayout;

public class WindowStatusPanel extends JPanel implements StatusBarComponent {

    /**
     * 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 = 3333052848780326565L;
    /** The label we use to show window status. */
    private final JLabel label = new JLabel("???");

    public WindowStatusPanel() {
        super();
    //#WindowStatusPanel.java:44: method: void com.dmdirc.addons.windowstatus.WindowStatusPanel.com.dmdirc.addons.windowstatus.WindowStatusPanel()
    //#input(void com.dmdirc.addons.windowstatus.WindowStatusPanel()): this
    //#output(void com.dmdirc.addons.windowstatus.WindowStatusPanel()): new JLabel(WindowStatusPanel#1) num objects
    //#output(void com.dmdirc.addons.windowstatus.WindowStatusPanel()): this.label
    //#new obj(void com.dmdirc.addons.windowstatus.WindowStatusPanel()): new JLabel(WindowStatusPanel#1)
    //#post(void com.dmdirc.addons.windowstatus.WindowStatusPanel()): this.label == &new JLabel(WindowStatusPanel#1)
    //#post(void com.dmdirc.addons.windowstatus.WindowStatusPanel()): new JLabel(WindowStatusPanel#1) num objects == 1

        setBorder(BorderFactory.createEtchedBorder());
    //#WindowStatusPanel.java:46: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.windowstatus.WindowStatusPanel:setBorder(Border)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.windowstatus.WindowStatusPanel
    //#    method: void com.dmdirc.addons.windowstatus.WindowStatusPanel()
    //#    unanalyzed callee: void com.dmdirc.addons.windowstatus.WindowStatusPanel:setBorder(Border)
        setLayout(new MigLayout("ins 0 rel 0 rel, aligny center"));
    //#WindowStatusPanel.java:47: Warning: method not available - call not analyzed
    //#    call on void net.miginfocom.swing.MigLayout(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.windowstatus.WindowStatusPanel
    //#    method: void com.dmdirc.addons.windowstatus.WindowStatusPanel()
    //#    unanalyzed callee: void net.miginfocom.swing.MigLayout(String)
    //#WindowStatusPanel.java:47: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.windowstatus.WindowStatusPanel:setLayout(LayoutManager)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.windowstatus.WindowStatusPanel
    //#    method: void com.dmdirc.addons.windowstatus.WindowStatusPanel()
    //#    unanalyzed callee: void com.dmdirc.addons.windowstatus.WindowStatusPanel:setLayout(LayoutManager)
        add(label);
    //#WindowStatusPanel.java:48: Warning: method not available - call not analyzed
    //#    call on Component com.dmdirc.addons.windowstatus.WindowStatusPanel:add(Component)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.windowstatus.WindowStatusPanel
    //#    method: void com.dmdirc.addons.windowstatus.WindowStatusPanel()
    //#    unanalyzed callee: Component com.dmdirc.addons.windowstatus.WindowStatusPanel:add(Component)
    }
    //#WindowStatusPanel.java:49: end of method: void com.dmdirc.addons.windowstatus.WindowStatusPanel.com.dmdirc.addons.windowstatus.WindowStatusPanel()
    
    /**
     * Sets the text for this label.
     * 
     * @param text New text
     */
    public void setText(final String text) {
        label.setText(text);
    //#WindowStatusPanel.java:57: method: void com.dmdirc.addons.windowstatus.WindowStatusPanel.setText(String)
    //#input(void setText(String)): text
    //#input(void setText(String)): this
    //#input(void setText(String)): this.label
    //#pre[3] (void setText(String)): this.label != null
    }
    //#WindowStatusPanel.java:58: end of method: void com.dmdirc.addons.windowstatus.WindowStatusPanel.setText(String)
}    //#output(com.dmdirc.addons.windowstatus.WindowStatusPanel__static_init): __Descendant_Table[com/dmdirc/addons/windowstatus/WindowStatusPanel]
    //#output(com.dmdirc.addons.windowstatus.WindowStatusPanel__static_init): __Dispatch_Table.setText(Ljava/lang/String;)V
    //#post(com.dmdirc.addons.windowstatus.WindowStatusPanel__static_init): __Descendant_Table[com/dmdirc/addons/windowstatus/WindowStatusPanel] == &__Dispatch_Table
    //#post(com.dmdirc.addons.windowstatus.WindowStatusPanel__static_init): __Dispatch_Table.setText(Ljava/lang/String;)V == &setText
    //#WindowStatusPanel.java:: end of method: com.dmdirc.addons.windowstatus.WindowStatusPanel.com.dmdirc.addons.windowstatus.WindowStatusPanel__static_init
    //#WindowStatusPanel.java:: end of class: com.dmdirc.addons.windowstatus.WindowStatusPanel
