/*
 * Copyright (C) 2005 - 2007 JasperSoft Corporation.  All rights reserved. 
 * http://www.jaspersoft.com.
 *
 * Unless you have purchased a commercial license agreement from JasperSoft,
 * the following license terms apply:
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 *
 * This program is distributed WITHOUT ANY WARRANTY; and without the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
 * or write to:
 *
 * Free Software Foundation, Inc.,
 * 59 Temple Place - Suite 330,
 * Boston, MA  USA  02111-1307
 *
 *
 *
 *
 * SheetTester.java
 * 
 * Created on 14 febbraio 2005, 15.55
 *
 */

package it.businesslogic.ireport.gui.sheet;

/**
 *
 * @author  Administrator
 */
public class SheetTester extends javax.swing.JDialog {
    
    /** Creates new form SheetTester */
    public SheetTester(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        //System.out.println("ok");
        CategorySheetPanel cp = new CategorySheetPanel();
        cp.addSheetProperty("Group 1", new SheetProperty("p1","Property 1",SheetProperty.NUMBER) );
        cp.addSheetProperty("Group 1", new SheetProperty("p2","Property 2",SheetProperty.STRING) );
        cp.addSheetProperty("Group 1", new SheetProperty("p2","Property 3",SheetProperty.STRING) );
        SheetProperty sp = new SheetProperty("p11","Property Color",SheetProperty.COLOR);
        sp.setValue( new java.awt.Color(10,200,10));
        cp.addSheetProperty("Group 2", sp );
        SheetProperty nsp = new  SheetProperty("plotOrientation","Plot orientation",SheetProperty.COMBOBOX_NK,"2");
        nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(1,"Horizontal"));
        nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(2,"Vertical"));
        
        nsp = new  SheetProperty("plotOrientation","Plot orientation",SheetProperty.COMBOBOX,"2");
        nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(1,"Horizontal"));
        nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(2,"Vertical"));
        
        cp.addSheetProperty("Group 2", nsp );
        cp.addSheetProperty("Group 2", new  SheetProperty("legend","Show legend", SheetProperty.BOOLEAN ,"false"));
        cp.addSheetProperty("Group 2", new SheetProperty("p22","Property 2.2",SheetProperty.STRING) ); 
        
        this.jPanel1.add( cp );
        
        
    }
    
    /** 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.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        jPanel1 = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        jPanel1.setLayout(new java.awt.BorderLayout());

        getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);

        pack();
    }//GEN-END:initComponents
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new SheetTester(new javax.swing.JFrame(), true).setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
    
}
