- moved ICdmFormElement to campanula.compatibility
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / UriWithLabelElement.java
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.element;
12
13 import java.net.URI;
14 import java.net.URISyntaxException;
15
16 import eu.etaxonomy.taxeditor.ui.section.campanula.compatibility.ICdmFormElement;
17
18
19 /**
20 * @author n.hoffmann
21 * @created Dec 20, 2010
22 * @version 1.0
23 */
24 public class UriWithLabelElement extends TextWithLabelElement {
25
26 /**
27 * @param formFactory
28 * @param parentElement
29 * @param labelString
30 * @param initialText
31 * @param textHeight
32 * @param style
33 */
34 protected UriWithLabelElement(CdmFormFactory formFactory,
35 ICdmFormElement parentElement, String labelString,
36 URI initialUri, Integer textHeight, int style) {
37 super(formFactory, parentElement, labelString, null, textHeight, style);
38 setUri(initialUri);
39 }
40
41 /**
42 *
43 */
44 public void setUri(URI uri) {
45 if(uri != null){
46 super.setText(uri.toString());
47 }
48 }
49
50 public URI getUri() throws URISyntaxException{
51 return new URI(super.getText());
52 }
53
54 }