Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) 2014 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 Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)
  * which accompanies this distribution, and is available at http://creativecommons.org/licenses/by-nd/4.0/
  *
  * 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 IdentifierEditor wrappers class TextDialog as a MetadataEditor Dialog to edit Identifier datatype. we can use it with a couple of lines of code:

 IdentifierEditor identifierEditor = new IdentifierEditor();
 identifierEditor.showOpenDialog();
 

Author(s):
Jinbo Chen
Version:
1.0
public class IdentifierEditor extends AbstractMetaDataEditor {
	private String _text;
	private String _title;

pop up a IdentifierEditor Dialog
	public int showOpenDialog() {
		TextDialog dlg = new TextDialog(this.,this.);
		int returnVal = dlg.showOpenDialog();
		if (returnVal == .) {
			this. = dlg.getText();
		}
		return returnVal;
	}

set the Identifier value. set the Identifier value.
	public void setValue(UntypedData data) {
		if (data != null) {
			this. = data.toString();
		}
	}

Returns the Identifier inputted by user.

Returns:
the Identifier inputted by user.
	public UntypedData getValue() {
		return new Identifier();
	}
	public void setTitle(String title) {
		 = title;
	}
New to GrepCode? Check out our FAQ X