/*
 * @(#)UIDefaultsInspector.java 1.0  2004-12-29
 *
 * Copyright (c) 2001 Werner Randelshofer, Immensee, Switzerland.
 * All rights reserved.
 *
 * You may not use, copy or modify this file, except in compliance with the
 * license agreement you entered into with Werner Randelshofer.
 * For details see accompanying license terms.
 */

package ch.randelshofer.debug;

//import ch.randelshofer.gui.table.*;
import java.awt.*;
import javax.swing.*;

/**
 * Displays the current desktop properties of java.awt.Toolkit.
 *
 * @author  Werner Randelshofer
 * @version 1.0 2004-12-29 Created.
 */
public class DesktopPropertiesInspector extends javax.swing.JPanel {
    
    /** Creates new form UIDefaultsInspector */
    public DesktopPropertiesInspector() {
        initComponents();
        
        table.setModel(new DesktopPropertiesTableModel());
        UIDefaultsCellRenderer r = new UIDefaultsCellRenderer();
        r.setFont(new Font("Dialog", Font.PLAIN, 22));
        table.getColumnModel().getColumn(0).setCellRenderer(r);
        table.getColumnModel().getColumn(1).setCellRenderer(r);
    }
    
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
        JFrame f = new JFrame("Desktop Properties Inspector");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(new DesktopPropertiesInspector());
        f.setSize(400, 300);
        f.setVisible(true);
        }});
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        scrollPane = new javax.swing.JScrollPane();
        table = new javax.swing.JTable();

        setLayout(new java.awt.BorderLayout());

        scrollPane.setFont(new java.awt.Font("Dialog", 0, 11));

        table.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        scrollPane.setViewportView(table);

        add(scrollPane, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents
        
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane scrollPane;
    private javax.swing.JTable table;
    // End of variables declaration//GEN-END:variables
    
}
