Project

General

Profile

Download (2.31 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.ICdmFormElement;
24

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

    
32
	public UriWithLabelElementFacadeImpl(){
33
	}
34

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

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

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

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