Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.dynform / org.gvsig.tools.dynform.api / src / main / java / org / gvsig / tools / dynform / JDynForm.java @ 1093

History | View | Annotate | Download (2.87 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
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.tools.dynform;
25

    
26
import java.util.List;
27

    
28
import javax.swing.Action;
29

    
30
import org.gvsig.tools.dataTypes.DataType;
31
import org.gvsig.tools.dynobject.DynObject;
32
import org.gvsig.tools.swing.api.Component;
33

    
34
public interface JDynForm extends Component {
35

    
36
        public interface JDynFormListener {
37
                public void message(String message);
38
                /**
39
                 * This event is fired when a field of the form is changed by the user.
40
                 * 
41
                 * Now this is not yet implemented.
42
                 * 
43
                 * @param field 
44
                 */
45
                public void fieldChanged(JDynFormField field);
46
        }
47
        
48
        public static final int USE_PLAIN = 0;
49
        public static final int USE_TABS = 1;
50
        public static final int USE_SEPARATORS = 2;
51
        public static final int USE_TREE = 3;
52
        
53
        public void setLayoutMode(int layoutMode);
54
        public int getLayoutMode();
55
        
56
        public int getFormWidth();
57
        public int getFormHeight();
58
        public void setFormSize(int width, int height);
59
        
60
        public JDynFormField getField(String fieldName);
61
        
62
        public DynFormDefinition getDefinition();
63
        
64
        public void setValues(DynObject values);
65
        public void getValues(DynObject values);
66
        
67
        public Object getValue(String fieldName);
68
        public void setValue(String fieldName, Object value);
69
        
70
        public boolean haveValidValues();
71
        public boolean haveValidValues(List<String> fieldsName);
72
        
73
        public void message();
74
        
75
        public void message(String msg);
76

    
77
        public void setReadOnly(boolean readOnly);
78
        public boolean isReadOnly();
79
        
80
        public void setShowMessageStatus(boolean showMessageStatus);
81
        
82
        public boolean isShowMessageStatus();
83
        
84
        public void setUseScrollBars(boolean usesScrolls);
85
        public boolean getUseScrollBars();
86
        
87
        public boolean isModified();
88
        
89
        public void addListener(JDynFormListener listener);
90
        public void removeListener(JDynFormListener listener);
91
        
92
        public void addActionToPopupMenu(DataType tipo, String name, Action action);
93
        public void addSeparatorToPopupMenu(DataType tipo);
94
}