Project

General

Profile

Download (2.34 KB) Statistics
| Branch: | Tag: | Revision:
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.singlesource.ui.forms;
12

    
13
import java.net.URI;
14
import java.net.URISyntaxException;
15

    
16
import javax.naming.OperationNotSupportedException;
17

    
18
import org.eclipse.swt.SWT;
19
import org.eclipse.swt.widgets.Listener;
20
import org.eclipse.swt.widgets.Text;
21

    
22
import eu.etaxonomy.cdm.common.CdmUtils;
23
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
24
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
25

    
26
/**
27
 * @author n.hoffmann
28
 * @created Dec 20, 2010
29
 * @version 1.0
30
 */
31
public class UriWithLabelElementFacadeImpl extends UriWithLabelElementFacade {
32

    
33
	public UriWithLabelElementFacadeImpl(){
34
	}
35

    
36
	/**
37
	 * @param formFactory
38
	 * @param parentElement
39
	 * @param labelString
40
	 * @param initialText
41
	 * @param textHeight
42
	 * @param style
43
	 */
44
	protected UriWithLabelElementFacadeImpl(CdmFormFactory formFactory,
45
			ICdmFormElement parentElement, String labelString,
46
			URI initialUri, Integer textHeight, int style) {
47
		super(formFactory, parentElement, labelString, initialUri, textHeight, style);
48
	}
49

    
50
	protected Object getInstanceInternal (CdmFormFactory formFactory,
51
			ICdmFormElement parentElement, String labelString,
52
			URI initialUri, Integer textHeight, int style) {
53
		return new UriWithLabelElementFacadeImpl(formFactory, parentElement, labelString, initialUri, textHeight, style);
54
	}
55
	
56
	/**
57
	 * 
58
	 */
59
	public void setUri(URI uri) {
60
		if(uri != null){
61
			super.setText(uri.toString());
62
		}
63
	}
64
	
65
	public URI getUri() throws URISyntaxException{
66
		return new URI(super.getText());
67
	}
68

    
69
	protected Object getInstanceInternal(CdmFormFactory formFactory,ICdmFormElement parentElement, String labelString,
70
			String initialText, Integer textHeight, int style)
71
	{
72
		return null;
73
	}
74
	
75
	public Object[] removeModifyListenersInternal(Text text)
76
	{
77
		return TextWithLabelElementFacadeImpl.removeModifyListeners(text);
78
	}
79

    
80
	public void addModifyListenersInternal(Text text, Object[] listeners)
81
	{
82
		TextWithLabelElementFacadeImpl.addModifyListeners(text, listeners);
83
	}
84
	
85
	public boolean traverseInternal(int traversal) throws OperationNotSupportedException
86
	{
87
		return this.text.traverse(traversal);
88
	}
89
	
90
}
(4-4/4)