KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > gui > sheet > SheetTester


1 /*
2  * Copyright (C) 2005 - 2006 JasperSoft Corporation. All rights reserved.
3  * http://www.jaspersoft.com.
4  *
5  * Unless you have purchased a commercial license agreement from JasperSoft,
6  * the following license terms apply:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as published by
10  * the Free Software Foundation.
11  *
12  * This program is distributed WITHOUT ANY WARRANTY; and without the
13  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
18  * or write to:
19  *
20  * Free Software Foundation, Inc.,
21  * 59 Temple Place - Suite 330,
22  * Boston, MA USA 02111-1307
23  *
24  *
25  *
26  *
27  * SheetTester.java
28  *
29  * Created on 14 febbraio 2005, 15.55
30  *
31  */

32
33 package it.businesslogic.ireport.gui.sheet;
34
35 /**
36  *
37  * @author Administrator
38  */

39 public class SheetTester extends javax.swing.JDialog JavaDoc {
40     
41     /** Creates new form SheetTester */
42     public SheetTester(java.awt.Frame JavaDoc parent, boolean modal) {
43         super(parent, modal);
44         initComponents();
45         //System.out.println("ok");
46
CategorySheetPanel cp = new CategorySheetPanel();
47         cp.addSheetProperty("Group 1", new SheetProperty("p1","Property 1",SheetProperty.NUMBER) );
48         cp.addSheetProperty("Group 1", new SheetProperty("p2","Property 2",SheetProperty.STRING) );
49         cp.addSheetProperty("Group 1", new SheetProperty("p2","Property 3",SheetProperty.STRING) );
50         SheetProperty sp = new SheetProperty("p11","Property Color",SheetProperty.COLOR);
51         sp.setValue( new java.awt.Color JavaDoc(10,200,10));
52         cp.addSheetProperty("Group 2", sp );
53         SheetProperty nsp = new SheetProperty("plotOrientation","Plot orientation",SheetProperty.COMBOBOX_NK,"2");
54         nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(1,"Horizontal"));
55         nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(2,"Vertical"));
56         
57         nsp = new SheetProperty("plotOrientation","Plot orientation",SheetProperty.COMBOBOX,"2");
58         nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(1,"Horizontal"));
59         nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(2,"Vertical"));
60         
61         cp.addSheetProperty("Group 2", nsp );
62         cp.addSheetProperty("Group 2", new SheetProperty("legend","Show legend", SheetProperty.BOOLEAN ,"false"));
63         cp.addSheetProperty("Group 2", new SheetProperty("p22","Property 2.2",SheetProperty.STRING) );
64         
65         this.jPanel1.add( cp );
66         
67         
68     }
69     
70     /** This method is called from within the constructor to
71      * initialize the form.
72      * WARNING: Do NOT modify this code. The content of this method is
73      * always regenerated by the Form Editor.
74      */

75     private void initComponents() {//GEN-BEGIN:initComponents
76
jPanel1 = new javax.swing.JPanel JavaDoc();
77
78         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
79         jPanel1.setLayout(new java.awt.BorderLayout JavaDoc());
80
81         getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
82
83         pack();
84     }//GEN-END:initComponents
85

86     /**
87      * @param args the command line arguments
88      */

89     public static void main(String JavaDoc args[]) {
90         java.awt.EventQueue.invokeLater(new Runnable JavaDoc() {
91             public void run() {
92                 new SheetTester(new javax.swing.JFrame JavaDoc(), true).setVisible(true);
93             }
94         });
95     }
96     
97     // Variables declaration - do not modify//GEN-BEGIN:variables
98
private javax.swing.JPanel JavaDoc jPanel1;
99     // End of variables declaration//GEN-END:variables
100

101 }
102
Popular Tags