Project

General

Profile

Download (1.7 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2017 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.vaadin.component;
10

    
11
import com.vaadin.data.Property;
12
import com.vaadin.ui.TextField;
13

    
14
import eu.etaxonomy.cdm.vaadin.util.converter.JodaTimePartialConverter;
15

    
16
/**
17
 * The PartialDateField is just a simple TextField by now but will evolve to
18
 * a more user friendly widget with either selectors for year, month, day
19
 * or it will use calendar widget like the DateField which allows selecting only
20
 * the year or year + month.
21
 *
22
 * @author a.kohlbecker
23
 * @since Apr 7, 2017
24
 *
25
 */
26
public class PartialDateField extends TextField {
27

    
28
    /**
29
     *
30
     */
31
    public PartialDateField() {
32
        super();
33
        setConverter(new JodaTimePartialConverter());
34
    }
35

    
36
    /**
37
     * @param dataSource
38
     */
39
    public PartialDateField(Property dataSource) {
40
        super(dataSource);
41
        setConverter(new JodaTimePartialConverter());
42
    }
43

    
44
    /**
45
     * @param caption
46
     * @param dataSource
47
     */
48
    public PartialDateField(String caption, Property dataSource) {
49
        super(caption, dataSource);
50
        setConverter(new JodaTimePartialConverter());
51
    }
52

    
53
    /**
54
     * @param caption
55
     * @param value
56
     */
57
    public PartialDateField(String caption, String value) {
58
        super(caption, value);
59
        setConverter(new JodaTimePartialConverter());
60
    }
61

    
62
    /**
63
     * @param caption
64
     */
65
    public PartialDateField(String caption) {
66
        super(caption);
67
        setConverter(new JodaTimePartialConverter());
68
    }
69

    
70

    
71

    
72
}
(4-4/6)