Project

General

Profile

Download (2.4 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.events.ModifyEvent;
19
import org.eclipse.swt.events.ModifyListener;
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
	/**
38
	 * @param formFactory
39
	 * @param parentElement
40
	 * @param labelString
41
	 * @param initialText
42
	 * @param textHeight
43
	 * @param style
44
	 */
45
	protected UriWithLabelElementFacadeImpl(CdmFormFactory formFactory,
46
			ICdmFormElement parentElement, String labelString,
47
			URI initialUri, Integer textHeight, int style) {
48
		super(formFactory, parentElement, labelString, initialUri, textHeight, style);
49
	}
50

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

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

    
81
	public void addModifyListenersInternal(Text text, Object[] listeners)
82
	{
83
		TextWithLabelElementFacadeImpl.addModifyListeners(text, listeners);
84
	}
85

    
86
	public boolean traverseInternal(int traversal) throws OperationNotSupportedException
87
	{
88
		throw new OperationNotSupportedException("Text.traverse(int) not supported !");
89
	}
90
	
91
}
(4-4/4)