1 /*
2 * TablePropertyDescriptor.java
3 *
4 * Copyright (C) 2002-2003, Mark Diggory
5 *
6 * This file is part of the Repast Taglibrary Package for use with Jelly.
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 as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. License
21 * information is also available at http://www.gnu.org.
22 */
23
24 package org.mrd.repast.util;
25
26 import javax.swing.table.*;
27 import uchicago.src.reflector.PropertyDescriptor;
28 /***
29 *
30 * @author administrator
31 */
32 public class ArrayPropertyDescriptor extends PropertyDescriptor{
33
34 private ArrayWidget widget;
35
36 /*** Creates a new instance of TablePropertyDescriptor */
37 public ArrayPropertyDescriptor(String name, Object data) {
38 super(name);
39 this.widget = new ArrayWidget(data);
40 this.widget.setMinimumSize(new java.awt.Dimension(150,33));
41 this.widget.setPreferredSize(new java.awt.Dimension(150,33));
42 }
43
44 /*** Creates a new instance of TablePropertyDescriptor */
45 public ArrayPropertyDescriptor(String name, Object data, TableCellEditor editor) {
46 super(name);
47 this.widget = new ArrayWidget(data);
48 this.widget.setMinimumSize(new java.awt.Dimension(150,33));
49 this.widget.setPreferredSize(new java.awt.Dimension(150,33));
50 widget.table.setDefaultEditor(widget.model.getColumnClass(0), editor);
51 }
52
53 public uchicago.src.reflector.PropertyWidget getWidget() {
54 return widget;
55 }
56
57 }
This page was automatically generated by Maven