Project

General

Profile

Download (2.24 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.widgets.Text;
19

    
20
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
21

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

    
29
	public UriWithLabelElementFacadeImpl(){
30
	}
31

    
32

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

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

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

    
77
	public void addModifyListenersInternal(Text text, Object[] listeners)
78
	{
79
		TextWithLabelElementFacadeImpl.addModifyListeners(text, listeners);
80
	}
81

    
82
	public boolean traverseInternal(int traversal) throws OperationNotSupportedException
83
	{
84
		throw new OperationNotSupportedException("Text.traverse(int) not supported !");
85
	}
86
	
87
}
(4-4/4)