1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
|
11
|
package eu.etaxonomy.taxeditor.ui.forms;
|
12
|
|
13
|
import java.net.URI;
|
14
|
import java.net.URISyntaxException;
|
15
|
|
16
|
/**
|
17
|
* @author n.hoffmann
|
18
|
* @created Dec 20, 2010
|
19
|
* @version 1.0
|
20
|
*/
|
21
|
public class UriWithLabelElement extends TextWithLabelElement {
|
22
|
|
23
|
/**
|
24
|
* @param formFactory
|
25
|
* @param parentElement
|
26
|
* @param labelString
|
27
|
* @param initialText
|
28
|
* @param textHeight
|
29
|
* @param style
|
30
|
*/
|
31
|
protected UriWithLabelElement(CdmFormFactory formFactory,
|
32
|
ICdmFormElement parentElement, String labelString,
|
33
|
URI initialUri, Integer textHeight, int style) {
|
34
|
super(formFactory, parentElement, labelString, null, textHeight, style);
|
35
|
setUri(initialUri);
|
36
|
}
|
37
|
|
38
|
/**
|
39
|
*
|
40
|
*/
|
41
|
public void setUri(URI uri) {
|
42
|
if(uri != null){
|
43
|
super.setText(uri.toString());
|
44
|
}
|
45
|
}
|
46
|
|
47
|
public URI getUri() throws URISyntaxException{
|
48
|
return new URI(super.getText());
|
49
|
}
|
50
|
|
51
|
}
|