Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.swing / org.gvsig.tools.swing.api / src / main / java / org / gvsig / tools / swing / api / dynobject / dynfield / JDynFieldComponent.java @ 477

History | View | Annotate | Download (3.86 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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.
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.
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.
20
 * 
21
 */
22
/*
23
 * AUTHORS (In addition to CIT):
24
 * 2010 Institute of New Imaging Technologies (INIT): 
25
 *   http://www.init.uji.es
26
 * Geographic Information research group: 
27
 *   http://www.geoinfo.uji.es
28
 * Universitat Jaume I, Spain
29
 */
30
package org.gvsig.tools.swing.api.dynobject.dynfield;
31

    
32
import org.gvsig.tools.dynobject.DynField;
33
import org.gvsig.tools.swing.api.ComponentService;
34
import org.gvsig.tools.swing.api.dynobject.ValueChangedListener;
35

    
36
/**
37
 * Object created by {@link JDynFieldComponentFactory} via its
38
 * createJDynFieldComponent()
39
 * function.
40
 * 
41
 * JDynFieldComponent is the Java graphic representation of a DynField's value.
42
 * It has, apart from all the {@link ValueField} functionalities, a function
43
 * inherited
44
 * from the {@link ComponentService} interface to obtain the Java Component.
45
 * 
46
 * @author 2010 - <a href="cordinyana@gvsig.org">C?sar Ordi?ana</a> - gvSIG Team
47
 * @author 2010 - <a href="mailto:reinhold@uji.es">Cristian Mart?n&nbsp;</a> -
48
 *         gvSIG Team
49
 * @version $Id$
50
 * 
51
 */
52
public interface JDynFieldComponent extends ValueField, JDynComponent,
53
    ComponentService {
54

    
55
    /**
56
     * DynObject parameters used for DynObjectServices for the exchange
57
     * of information.
58
     */
59
    public static class PARAMETERS {
60

    
61
        public static String DYNFIELD = "dynfield";
62
        public static String PARENT = "parent";
63
        public static String WRITABLE = "writable";
64
    }
65

    
66
    /**
67
     * Returns the {@link DynField} to be rendered.
68
     * 
69
     * @return the DynField
70
     */
71
    public DynField getDynField();
72

    
73
    /**
74
     * Returns the {@link DynObject} to be rendered.
75
     * 
76
     * @return the DynObject
77
     */
78
    // public DynObject getDynObject();
79

    
80
    /**
81
     * Gets the {@link DynField}'s value at this particular moment, if any.
82
     * 
83
     * 
84
     * @return
85
     *         the current {@link DynField}'s value, <b>null</b> otherwise.
86
     */
87
    public Object getInitialValue();
88

    
89
    /**
90
     * Returns if the {@link DynField} is set to be compulsory or not.
91
     * 
92
     * @return
93
     *         <b>true </b> the field is compulsory. <br>
94
     *         <b>false </b> the field is optional.
95
     */
96
    public boolean isMandatory();
97

    
98
    /**
99
     * Specifies if this JDynFieldComponent is to be enabled or not.
100
     * 
101
     * @param isEnabled
102
     * <br>
103
     *            &nbsp;&nbsp;&nbsp;&nbsp;<b>true </b> the component is enabled.<br>
104
     *            &nbsp;&nbsp;&nbsp;&nbsp;<b>false </b> the component is
105
     *            disabled.
106
     */
107
    public void setEnabled(boolean isEnabled);
108

    
109
    /**
110
     * Walks through the list of {@link ValueChangedListener} objects and
111
     * calls the <b>handleValueChanged</b> function by specifying this
112
     * JDynFieldComponent object
113
     * as the one that has been changed.
114
     * 
115
     * @see ValueChangedListener#handleValueChanged(JDynFieldComponent)
116
     */
117
    public void fireValueChangedEvent();
118

    
119
}