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 @ 976

History | View | Annotate | Download (2.45 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
        
40
        public static final int USE_PLAIN = 0;
41
        public static final int USE_TABS = 1;
42
        public static final int USE_SEPARATORS = 2;
43
        
44
        public void setLayoutMode(int layoutMode);
45
        public int getLayoutMode();
46
        
47
        public int getFormWidth();
48
        public int getFormHeight();
49
        public void setFormSize(int width, int height);
50
        
51
        public JDynFormField getField(String fieldName);
52
        
53
        public DynFormDefinition getDefinition();
54
        
55
        public void setValues(DynObject values);
56
        public void getValues(DynObject values);
57
        
58
        public Object getValue(String fieldName);
59
        public void setValue(String fieldName, Object value);
60
        
61
        public boolean haveValidValues();
62
        public boolean haveValidValues(List<String> fieldsName);
63
        
64
        public void message();
65
        
66
        public void message(String msg);
67

    
68
        public void setReadOnly(boolean readOnly);
69
        public boolean isReadOnly();
70
        
71
        public void setShowMessageStatus(boolean showMessageStatus);
72
        
73
        public boolean isShowMessageStatus();
74

    
75
        public boolean isModified();
76
        
77
        public void addListener(JDynFormListener listener);
78
        public void removeListener(JDynFormListener listener);
79
        
80
        public void addActionToPopupMenu(DataType tipo, String name, Action action);
81
        public void addSeparatorToPopupMenu(DataType tipo);
82
}