Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  *  Copyright (c) 2011 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the GNU Lesser Public License v2.1
  *  which accompanies this distribution, and is available at
  *  http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  *
  *  Contributors:
  *      Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany - RMI Client, FileChooser and WebDAV
 */
package de.ipk_gatersleben.bit.bi.edal.rmi.client.gui.editor;
The PersonInfoEditor is a wrapper class for PersonDialog, we can use it with a couple of lines of code:

   PersonInfoEditor personInfoEditor = new PersonInfoEditor();
   personInfoEditor.setValue(person); 
   personInfoEditor.showOpenDialog();
  

Author(s):
Jinbo Chen
Version:
1.0
public class PersonInfoEditor extends AbstractMetaDataEditor{
	private Persons _persons;
	private String _title;
set the Persons value. set the Persons value.
	public void setValue(UntypedData persons) {
		if(persons!=null)
		{
			this. = (Persons)persons;
		}
	}
pop up a PersonDialog Dialog
	public int showOpenDialog() {
		PersonsDialog dlg = new PersonsDialog(this.,this.);
		int returnVal = dlg.showOpenDialog();
		if (returnVal == .) {
			this. = dlg.getPerson();
		}
		return returnVal;
	}
Returns the Persons typed in by user.

Returns:
the Persons typed in by user.
	{
		return this.;
	}
	public void setTitle(String title) {
		 = title;
	}
New to GrepCode? Check out our FAQ X