View Javadoc
1 /* 2 * ObjectFactory.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.*; 27 28 /*** 29 * 30 * @author administrator 31 */ 32 public abstract class ObjectEditor extends DefaultCellEditor{ 33 34 public static final JTextField field = new JTextField(); 35 36 public ObjectEditor(){ 37 super(field); 38 } 39 40 public abstract Object getNewInstance(String value); 41 42 public Object getCellEditorValue() { 43 return this.getNewInstance(field.getText()); 44 } 45 46 }

This page was automatically generated by Maven