001: /*
002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
003: * http://www.jaspersoft.com.
004: *
005: * Unless you have purchased a commercial license agreement from JasperSoft,
006: * the following license terms apply:
007: *
008: * This program is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU General Public License version 2 as published by
010: * the Free Software Foundation.
011: *
012: * This program is distributed WITHOUT ANY WARRANTY; and without the
013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014: * See the GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018: * or write to:
019: *
020: * Free Software Foundation, Inc.,
021: * 59 Temple Place - Suite 330,
022: * Boston, MA USA 02111-1307
023: *
024: *
025: *
026: *
027: * SheetTester.java
028: *
029: * Created on 14 febbraio 2005, 15.55
030: *
031: */
032:
033: package it.businesslogic.ireport.gui.sheet;
034:
035: /**
036: *
037: * @author Administrator
038: */
039: public class SheetTester extends javax.swing.JDialog {
040:
041: /** Creates new form SheetTester */
042: public SheetTester(java.awt.Frame parent, boolean modal) {
043: super (parent, modal);
044: initComponents();
045: //System.out.println("ok");
046: CategorySheetPanel cp = new CategorySheetPanel();
047: cp.addSheetProperty("Group 1", new SheetProperty("p1",
048: "Property 1", SheetProperty.NUMBER));
049: cp.addSheetProperty("Group 1", new SheetProperty("p2",
050: "Property 2", SheetProperty.STRING));
051: cp.addSheetProperty("Group 1", new SheetProperty("p2",
052: "Property 3", SheetProperty.STRING));
053: SheetProperty sp = new SheetProperty("p11", "Property Color",
054: SheetProperty.COLOR);
055: sp.setValue(new java.awt.Color(10, 200, 10));
056: cp.addSheetProperty("Group 2", sp);
057: SheetProperty nsp = new SheetProperty("plotOrientation",
058: "Plot orientation", SheetProperty.COMBOBOX_NK, "2");
059: nsp.getTags().add(
060: new it.businesslogic.ireport.gui.sheet.Tag(1,
061: "Horizontal"));
062: nsp.getTags().add(
063: new it.businesslogic.ireport.gui.sheet.Tag(2,
064: "Vertical"));
065:
066: nsp = new SheetProperty("plotOrientation", "Plot orientation",
067: SheetProperty.COMBOBOX, "2");
068: nsp.getTags().add(
069: new it.businesslogic.ireport.gui.sheet.Tag(1,
070: "Horizontal"));
071: nsp.getTags().add(
072: new it.businesslogic.ireport.gui.sheet.Tag(2,
073: "Vertical"));
074:
075: cp.addSheetProperty("Group 2", nsp);
076: cp.addSheetProperty("Group 2", new SheetProperty("legend",
077: "Show legend", SheetProperty.BOOLEAN, "false"));
078: cp.addSheetProperty("Group 2", new SheetProperty("p22",
079: "Property 2.2", SheetProperty.STRING));
080:
081: this .jPanel1.add(cp);
082:
083: }
084:
085: /** This method is called from within the constructor to
086: * initialize the form.
087: * WARNING: Do NOT modify this code. The content of this method is
088: * always regenerated by the Form Editor.
089: */
090: private void initComponents() {//GEN-BEGIN:initComponents
091: jPanel1 = new javax.swing.JPanel();
092:
093: setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
094: jPanel1.setLayout(new java.awt.BorderLayout());
095:
096: getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
097:
098: pack();
099: }//GEN-END:initComponents
100:
101: /**
102: * @param args the command line arguments
103: */
104: public static void main(String args[]) {
105: java.awt.EventQueue.invokeLater(new Runnable() {
106: public void run() {
107: new SheetTester(new javax.swing.JFrame(), true)
108: .setVisible(true);
109: }
110: });
111: }
112:
113: // Variables declaration - do not modify//GEN-BEGIN:variables
114: private javax.swing.JPanel jPanel1;
115: // End of variables declaration//GEN-END:variables
116:
117: }
|