01: /*
02: * Copyright 2006-2007 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt.
07: *
08: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
09: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
10: * the license for the specific language governing your rights and limitations.
11: *
12: * Additional Contributor(s): Martin Schmid gridvision engineering GmbH
13: */
14: package org.pentaho.reportdesigner.crm.report.tests;
15:
16: import org.jetbrains.annotations.NotNull;
17:
18: import javax.swing.*;
19: import javax.swing.table.DefaultTableModel;
20: import javax.swing.table.TableModel;
21:
22: /**
23: * User: Martin
24: * Date: 27.06.2006
25: * Time: 17:41:34
26: */
27: @SuppressWarnings({"ALL"})
28: public class TestTableModelFactory {
29: private String param1;
30:
31: public TestTableModelFactory() {
32: }
33:
34: public TestTableModelFactory(String param1) {
35: System.out
36: .println("TestTableModelFactory.TestTableModelFactory");
37: System.out.println("param1 = " + param1);
38: this .param1 = param1;
39: }
40:
41: public TableModel createSubReportTable(String param1) {
42: System.out
43: .println("TestTableModelFactory.createSubReportTable");
44: System.out.println("param1 = " + param1);
45: return new DefaultTableModel(new Object[][] {
46: { param1, "1.2" }, { param1, "2.2" } }, new Object[] {
47: "c1", "c2" });
48: }
49:
50: public TableModel createTable0() {
51: return new DefaultTableModel(new Object[][] { { "1.1", "1.2" },
52: { "2.1", "2.2" } }, new Object[] { "c1", "c2" });
53: }
54:
55: public TableModel createTable(@NotNull
56: String param1, @NotNull
57: String param2) {
58: System.out.println("TestTableModelFactory.createTable");
59: return new DefaultTableModel(new Object[][] { { "1.1", "1.2" },
60: { "2.1", "2.2" } }, new Object[] { "c1", "c2" });
61: }
62:
63: public TableModel createTable2(@NotNull
64: String param1, @NotNull
65: String param2) {
66: return new DefaultTableModel(new Object[][] { { "1.1", "1.2" },
67: { "2.1", "2.2" } }, new Object[] { "c1", "c2" });
68: }
69:
70: public TableModel createTable3(@NotNull
71: String param1, @NotNull
72: String param2, @NotNull
73: String param3) {
74: return new DefaultTableModel(new Object[][] { { "1.1", "1.2" },
75: { "2.1", "2.2" } }, new Object[] { "c1", "c2" });
76: }
77:
78: public TableModel createTable4(@NotNull
79: String param1) {
80: throw new RuntimeException("evil");
81: }
82:
83: public DefaultTableModel createTable5(@NotNull
84: String param1) {
85: throw new RuntimeException("evil");
86: }
87:
88: public JButton createTable6() {
89: return null;
90: }
91: }
|