// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) space 
// Source File Name:   Header.java

package lt.ktu.gmj.propertySheet;

import java.awt.*;
import javax.swing.*;

// Referenced classes of package lt.ktu.gmj.propertySheet:
//            Property, PropertyEditor

public class Header
    implements Property, PropertyEditor
{

    public JComponent label()
    {
        JLabel jlabel = new JLabel(label, 0);
        jlabel.setForeground(Color.white);
        jlabel.setBackground(Color.gray);
        jlabel.setOpaque(true);
        return (JComponent)jlabel;
    }

    public PropertyEditor editor()
    {
        return (PropertyEditor)this;
    }

    public void refreshed()
    {
    }

    public JComponent component()
    {
        JPanel jpanel = new JPanel();
        jpanel.setLayout(new GridLayout(1, labels.length));
        for (int i = 0; i < labels.length; i++)
        {
            JLabel jlabel = new JLabel(labels[i], 0);
            jlabel.setForeground(Color.white);
            jlabel.setBackground(Color.gray);
            jlabel.setOpaque(true);
            jpanel.add(jlabel, i);
        }

        return (JComponent)jpanel;
    }

    public Header(String s, String s1)
    {
        label = s;
        labels = new String[1];
        labels[0] = s1;
    }

    public Header(String s, String as[])
    {
        label = s;
        labels = as;
    }

    private String label;
    private String labels[];
}
