Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / dynform / src / org / gvsig / tools / dynform / api / JDynFormField.java @ 846

History | View | Annotate | Download (1.08 KB)

1
package org.gvsig.tools.dynform.api;
2

    
3
import javax.swing.JComponent;
4

    
5
import org.gvsig.tools.service.Service;
6
import org.gvsig.tools.swing.api.Component;
7

    
8
public interface JDynFormField extends Component, Service {
9
        
10
        public interface JDynFormFieldListener {
11
                public void fieldEnter(JDynFormField field);
12
                public void fieldExit(JDynFormField field);
13
                public void fieldChanged(JDynFormField field);
14
                public void message(JDynFormField field, String message);
15
        }
16
        
17
        public DynFormFieldDefinition getDefinition();
18
        
19
        public String getName();
20
        
21
        public String getLabel();
22
        
23
        public JComponent getJLabel();
24

    
25
        public boolean hasValidValue();
26
        
27
        public void setValue(Object value);
28
        
29
        public boolean isModified();
30
        
31
        /**
32
         * Get the value of field from the form.
33
         * 
34
         * Throw an exception if the value of form is not valid
35
         * for this field.
36
         * 
37
         * @return value of field 
38
         */
39
        public Object getValue();
40
        
41
        public void addListener(JDynFormFieldListener listener);
42
        
43
        public void removeListener(JDynFormFieldListener listener);
44
        
45
        public void setReadOnly(boolean readonly);
46
        
47
        public boolean isReadOnly();
48
        
49
}