Revision 1405 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dynobject/DynField_v2.java

View differences:

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

  
26 25
public interface DynField_v2 extends DynField_LabelAttribute {
27 26

  
28 27
    public interface AvailableValuesProvider {
28

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

  
......
34 34
    public DynField setClassOfValue(String theClassNameOfValue);
35 35

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

  
43 44
    /**
44
     * When is a DynObject field returns the DynStruct of the DynObject, otherwise returns null
45
     * When is a DynObject field returns the DynStruct of the DynObject,
46
     * otherwise returns null
45 47
     *
46 48
     * @return
47 49
     */
......
50 52
    public DynField setTypeOfItems(int type);
51 53

  
52 54
    /**
53
     * When is a Container field returns the type of the elements, otherwise returns INVALID
55
     * When is a Container field returns the type of the elements, otherwise
56
     * returns INVALID
54 57
     *
55 58
     * @return
56 59
     */
......
58 61

  
59 62
    public DynField setClassOfItems(DynStruct dynStrct);
60 63

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

  
63 67
    public DynField setClassOfItems(String theClassNameOfValue);
64 68

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

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

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

  
86 94
    public Tags getTags();
87 95

  
96
    
88 97
    public DynField setRelationType(int relationType);
89 98

  
90 99
    public int getRelationType();
91 100

  
92
    public void setAvailableValuesProvider(AvailableValuesProvider provider);
101
    
102
    public DynField setAvailableValues(DynMethod computeAvailableValues);
93 103

  
94
    public DynObjectValueItem[] getAvailableValues(DynObject dynObject);
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();
95 126
}

Also available in: Unified diff