Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.lib / src / main / java / org / gvsig / tools / dynobject / DynField_v2.java @ 1860

History | View | Annotate | Download (3.36 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or modify it under
7
 * the terms of the GNU General Public License as published by the Free Software
8
 * Foundation; either version 2 of the License, or (at your option) any later
9
 * version.
10
 *
11
 * This program is distributed in the hope that it will be useful, but WITHOUT
12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
 * details.
15
 *
16
 * You should have received a copy of the GNU General Public License along with
17
 * this program; if not, write to the Free Software Foundation, Inc., 51
18
 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us at info AT
21
 * gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.tools.dynobject;
24

    
25
public interface DynField_v2 extends DynField_LabelAttribute {
26

    
27
    public interface AvailableValuesProvider {
28

    
29
        public DynObjectValueItem[] getValues(DynField field, DynObject dynObject);
30
    }
31

    
32
    public DynField setClassOfValue(DynStruct dynStrct);
33

    
34
    public DynField setClassOfValue(String theClassNameOfValue);
35

    
36
    /**
37
     * When is a Object field returns the name of object's class, otherwise
38
     * returns null
39
     *
40
     * @return
41
     */
42
    public String getClassNameOfValue();
43

    
44
    /**
45
     * When is a DynObject field returns the DynStruct of the DynObject,
46
     * otherwise returns null
47
     *
48
     * @return
49
     */
50
    public DynStruct getDynClassOfValue();
51

    
52
    public DynField setTypeOfItems(int type);
53

    
54
    /**
55
     * When is a Container field returns the type of the elements, otherwise
56
     * returns INVALID
57
     *
58
     * @return
59
     */
60
    public int getTypeOfItems();
61

    
62
    public DynField setClassOfItems(DynStruct dynStrct);
63

    
64
    @Override
65
    public DynField setClassOfItems(Class theClass);
66

    
67
    public DynField setClassOfItems(String theClassNameOfValue);
68

    
69
    /**
70
     * When is a Container of objects field returns the name of class of the
71
     * elements, otherwise returns null
72
     *
73
     * @return
74
     */
75
    public String getClassNameOfItems();
76

    
77
    /**
78
     * When is a Container of DynObjects field returns the DynStruct of the
79
     * elements, otherwise returns null
80
     *
81
     * @return
82
     */
83
    public DynStruct getDynClassOfItems();
84

    
85
    /**
86
     * When is a Container of objects field returns the class of the elements,
87
     * otherwise returns null
88
     *
89
     * @return
90
     */
91
    @Override
92
    public Class getClassOfItems();
93

    
94
    public Tags getTags();
95

    
96
    
97
    public DynField setRelationType(int relationType);
98

    
99
    public int getRelationType();
100

    
101
    
102
    public DynField setAvailableValues(DynMethod computeAvailableValues);
103

    
104
    public DynMethod getAvailableValuesMethod();
105

    
106
    public DynObjectValueItem[] getAvailableValues(DynObject self);
107
    
108
    public boolean isAvailableValuesCalculated();
109

    
110
    
111
    public DynField setCalculateMethod(DynMethod computeValue);
112
    
113
    public DynMethod getCalculateMethod();
114

    
115
    public boolean isCalculated();
116
    
117
    public Object getCalculatedValue(DynObject self);
118
    
119
    
120
    public void copyFrom(DynField other);
121

    
122
    
123
    public DynField setValidateElements(boolean validate);
124
    
125
    public boolean getValidateElements();
126
}