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 @ 2039
History | View | Annotate | Download (4.86 KB)
1 | 954 | jbadia | /**
|
---|---|---|---|
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 | 933 | jjdelcerro | package org.gvsig.tools.dynform; |
25 | |||
26 | import java.util.List; |
||
27 | |||
28 | 967 | jbadia | import javax.swing.Action; |
29 | 1891 | jjdelcerro | import javax.swing.JComponent; |
30 | 967 | jbadia | |
31 | import org.gvsig.tools.dataTypes.DataType; |
||
32 | 933 | jjdelcerro | import org.gvsig.tools.dynobject.DynObject; |
33 | import org.gvsig.tools.dynobject.DynObjectSet; |
||
34 | import org.gvsig.tools.swing.api.Component; |
||
35 | |||
36 | public interface JDynFormSet extends Component { |
||
37 | |||
38 | 2039 | jjdelcerro | public static final String ACTION_FIRST = "first"; |
39 | public static final String ACTION_PREVIOUS = "previous"; |
||
40 | public static final String ACTION_NEXT = "next"; |
||
41 | public static final String ACTION_LAST = "last"; |
||
42 | public static final String ACTION_SAVE = "save"; |
||
43 | public static final String ACTION_NEW = "new"; |
||
44 | public static final String ACTION_CANCEL_NEW = "cancel-new"; |
||
45 | public static final String ACTION_DELETE = "delete"; |
||
46 | public static final String ACTION_SEARCH = "search"; |
||
47 | public static final String ACTION_CLOSE = "close"; |
||
48 | public static final String ACTION_SET_CURRENT_RECORD = "set-current-record"; |
||
49 | 2023 | jjdelcerro | |
50 | 933 | jjdelcerro | public interface JDynFormSetListener { |
51 | public void formMessage(String message); |
||
52 | public void formClose(); |
||
53 | 1182 | fdiaz | public void formMovedTo(int currentPosition) throws AbortActionException; |
54 | |||
55 | 1098 | jbadia | public void formBeforeSave(JDynFormSet dynformSet) throws AbortActionException; |
56 | public void formBeforeNew(JDynFormSet dynformSet) throws AbortActionException; |
||
57 | 1405 | jjdelcerro | public void formBeforeCancelNew(JDynFormSet dynformSet) throws AbortActionException; |
58 | 1098 | jbadia | public void formBeforeDelete(JDynFormSet dynformSet) throws AbortActionException; |
59 | public void formBeforeSearch(JDynFormSet dynformSet) throws AbortActionException; |
||
60 | 933 | jjdelcerro | |
61 | 1182 | fdiaz | public void formAfterSave(JDynFormSet dynformSet) throws AbortActionException; |
62 | public void formAfterNew(JDynFormSet dynformSet) throws AbortActionException; |
||
63 | 1405 | jjdelcerro | public void formAfterCancelNew(JDynFormSet dynformSet) throws AbortActionException; |
64 | 1182 | fdiaz | public void formAfterDelete(JDynFormSet dynformSet) throws AbortActionException; |
65 | public void formAfterSearch(JDynFormSet dynformSet) throws AbortActionException; |
||
66 | 933 | jjdelcerro | } |
67 | 1182 | fdiaz | |
68 | 933 | jjdelcerro | public void setLayoutMode(int layoutMode); |
69 | public int getLayoutMode(); |
||
70 | 1182 | fdiaz | |
71 | 1145 | jjdelcerro | public boolean hasValidValues(); |
72 | public boolean hasValidValues(List<String> fieldsName); |
||
73 | 1182 | fdiaz | |
74 | 1881 | jjdelcerro | public void setValues(DynObjectSet values); |
75 | public void setValues(List values); |
||
76 | 1182 | fdiaz | |
77 | 1145 | jjdelcerro | public List getValues(); |
78 | 1182 | fdiaz | |
79 | 933 | jjdelcerro | public void message(); |
80 | public void message(String msg); |
||
81 | |||
82 | public void setReadOnly(boolean readOnly); |
||
83 | public boolean isReadOnly(); |
||
84 | 1182 | fdiaz | |
85 | 933 | jjdelcerro | public void addListener(JDynFormSetListener listener); |
86 | public void removeListener(JDynFormSetListener listener); |
||
87 | 1182 | fdiaz | |
88 | 933 | jjdelcerro | public boolean isAutosave(); |
89 | public void setAutosave(boolean autosave); |
||
90 | 1182 | fdiaz | |
91 | 933 | jjdelcerro | public boolean allowUpdate(); |
92 | public boolean allowDelete(); |
||
93 | public boolean allowNew(); |
||
94 | public boolean allowSearch(); |
||
95 | 1098 | jbadia | public boolean allowClose(); |
96 | 933 | jjdelcerro | |
97 | public void setAllowUpdate(boolean allowUpdate); |
||
98 | public void setAllowDelete(boolean allowDelete); |
||
99 | public void setAllowNew(boolean allowNew); |
||
100 | public void setAllowSearch(boolean allowSearch); |
||
101 | 1098 | jbadia | public void setAllowClose(boolean allowClose); |
102 | 1182 | fdiaz | |
103 | 933 | jjdelcerro | public void setFormSize(int width, int height); |
104 | 1182 | fdiaz | |
105 | 933 | jjdelcerro | public DynObject get(int position); |
106 | public int getCurrentIndex(); |
||
107 | public int countValues(); |
||
108 | public void setCurrentIndex(int index); |
||
109 | 1405 | jjdelcerro | public boolean isInNewState(); |
110 | 1182 | fdiaz | |
111 | 1286 | jjdelcerro | public void addAction(Action action); |
112 | 1862 | jjdelcerro | public void setActionVisible(String action, boolean visible); |
113 | public void setActionEnabled(String action, boolean enabled); |
||
114 | public boolean isActionVisible(String action); |
||
115 | public boolean isActionEnabled(String action); |
||
116 | 1891 | jjdelcerro | public JComponent getActionButton(String action); |
117 | 2039 | jjdelcerro | public void fireEvent(String action, Object value); |
118 | 1862 | jjdelcerro | |
119 | 967 | jbadia | public void addActionToPopupMenu(DataType tipo, String name, Action action); |
120 | public void addSeparatorToPopupMenu(DataType tipo); |
||
121 | 1182 | fdiaz | |
122 | 1031 | jbadia | public void setUseScrollBars(boolean usesScrolls); |
123 | public boolean getUseScrollBars(); |
||
124 | 1182 | fdiaz | |
125 | public void getFormValues(DynObject values); |
||
126 | |||
127 | 2023 | jjdelcerro | public JDynForm getForm();
|
128 | 1182 | fdiaz | |
129 | 2023 | jjdelcerro | |
130 | 933 | jjdelcerro | } |