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 / JDynFormSet.java @ 1886

History | View | Annotate | Download (4.01 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.dynobject.DynObjectSet;
33
import org.gvsig.tools.swing.api.Component;
34

    
35
public interface JDynFormSet  extends Component {
36

    
37
        public interface JDynFormSetListener {
38
                public void formMessage(String message);
39
                public void formClose();
40
                public void formMovedTo(int currentPosition) throws AbortActionException;
41

    
42
                public void formBeforeSave(JDynFormSet dynformSet) throws AbortActionException;
43
                public void formBeforeNew(JDynFormSet dynformSet) throws AbortActionException;
44
                public void formBeforeCancelNew(JDynFormSet dynformSet) throws AbortActionException;
45
                public void formBeforeDelete(JDynFormSet dynformSet) throws AbortActionException;
46
                public void formBeforeSearch(JDynFormSet dynformSet) throws AbortActionException;
47

    
48
                public void formAfterSave(JDynFormSet dynformSet) throws AbortActionException;
49
                public void formAfterNew(JDynFormSet dynformSet) throws AbortActionException;
50
                public void formAfterCancelNew(JDynFormSet dynformSet) throws AbortActionException;
51
                public void formAfterDelete(JDynFormSet dynformSet) throws AbortActionException;
52
                public void formAfterSearch(JDynFormSet dynformSet) throws AbortActionException;
53
        }
54

    
55
        public void setLayoutMode(int layoutMode);
56
        public int getLayoutMode();
57

    
58
        public boolean hasValidValues();
59
        public boolean hasValidValues(List<String> fieldsName);
60

    
61
        public void setValues(DynObjectSet values);
62
        public void setValues(List values);
63

    
64
        public List getValues();
65

    
66
        public void message();
67
        public void message(String msg);
68

    
69
        public void setReadOnly(boolean readOnly);
70
        public boolean isReadOnly();
71

    
72
        public void addListener(JDynFormSetListener listener);
73
        public void removeListener(JDynFormSetListener listener);
74

    
75
        public boolean isAutosave();
76
        public void setAutosave(boolean autosave);
77

    
78
        public boolean allowUpdate();
79
        public boolean allowDelete();
80
        public boolean allowNew();
81
        public boolean allowSearch();
82
        public boolean allowClose();
83

    
84
        public void setAllowUpdate(boolean allowUpdate);
85
        public void setAllowDelete(boolean allowDelete);
86
        public void setAllowNew(boolean allowNew);
87
        public void setAllowSearch(boolean allowSearch);
88
        public void setAllowClose(boolean allowClose);
89

    
90
        public void setFormSize(int width, int height);
91

    
92
        public DynObject get(int position);
93
        public int getCurrentIndex();
94
        public int countValues();
95
        public void setCurrentIndex(int index);
96
        public boolean isInNewState();
97

    
98
        public void addAction(Action action);
99
        public void setActionVisible(String action, boolean visible);
100
        public void setActionEnabled(String action, boolean enabled);
101
        public boolean isActionVisible(String action);
102
        public boolean isActionEnabled(String action);
103
        
104
        public void addActionToPopupMenu(DataType tipo, String name, Action action);
105
        public void addSeparatorToPopupMenu(DataType tipo);
106

    
107
        public void setUseScrollBars(boolean usesScrolls);
108
        public boolean getUseScrollBars();
109

    
110
        public void getFormValues(DynObject values);
111

    
112

    
113
}