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 SubjectsEditor wrappers class SubjectsDialog as a MetadataEditor Dialog to edit Subjects datatype. we can use it with a couple of lines of code:

   SubjectsEditor subjectsEditor = new SubjectsEditor();
   subjectsEditor.showOpenDialog();
  

Author(s):
Jinbo Chen
Version:
1.0
public class SubjectsEditor extends AbstractMetaDataEditor{
	private String _title;
pop up a SubjectsDialog Dialog
	public int showOpenDialog() {
		SubjectsDialog dlg = new SubjectsDialog(this.,this.);
		int returnVal = dlg.showOpenDialog();
		if (returnVal == .) {
			this. = dlg.getSubjects();
		}
		return returnVal;
	}
set the Subjects value. set the Subjects value.
	public void setValue(UntypedData subjects) {
		if(subjects!=null)
		{
			this. = ((Subjects)subjects).getSubjects();
		}
	}
Returns the Subjects typed in by user.

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