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 @ 1948
History | View | Annotate | Download (3.62 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 |
import org.gvsig.tools.util.PropertiesSupport; |
34 |
import org.gvsig.tools.resourcesstorage.ResourcesStorage; |
35 |
import org.gvsig.tools.script.Script; |
36 |
import org.gvsig.tools.script.ScriptManager; |
37 |
|
38 |
public interface JDynForm extends Component, PropertiesSupport { |
39 |
|
40 |
public interface JDynFormListener { |
41 |
public void message(String message); |
42 |
/**
|
43 |
* This event is fired when a field of the form is changed by the user.
|
44 |
*
|
45 |
* Now this is not yet implemented.
|
46 |
*
|
47 |
* @param field
|
48 |
*/
|
49 |
public void fieldChanged(JDynFormField field); |
50 |
} |
51 |
|
52 |
public interface DynFormContext { |
53 |
public ResourcesStorage getResourcesStorage();
|
54 |
|
55 |
public ScriptManager getScriptManager();
|
56 |
} |
57 |
|
58 |
public static final int USE_PLAIN = 0; |
59 |
public static final int USE_TABS = 1; |
60 |
public static final int USE_SEPARATORS = 2; |
61 |
public static final int USE_TREE = 3; |
62 |
|
63 |
public void setLayoutMode(int layoutMode); |
64 |
public int getLayoutMode(); |
65 |
|
66 |
public int getFormWidth(); |
67 |
public int getFormHeight(); |
68 |
public void setFormSize(int width, int height); |
69 |
|
70 |
public JDynFormField getField(String fieldName); |
71 |
|
72 |
// public Collection<JDynFormField> getShowFields();
|
73 |
|
74 |
public DynFormDefinition getDefinition();
|
75 |
|
76 |
public void setValues(DynObject values); |
77 |
public void getValues(DynObject values); |
78 |
|
79 |
public Object getValue(String fieldName); |
80 |
public void setValue(String fieldName, Object value); |
81 |
|
82 |
public boolean hasValidValues(); |
83 |
public boolean hasValidValues(List<String> fieldsName); |
84 |
|
85 |
public void message(); |
86 |
|
87 |
public void message(String msg); |
88 |
|
89 |
public void setReadOnly(boolean readOnly); |
90 |
public boolean isReadOnly(); |
91 |
|
92 |
public void setShowMessageStatus(boolean showMessageStatus); |
93 |
|
94 |
public boolean isShowMessageStatus(); |
95 |
|
96 |
public void setUseScrollBars(boolean usesScrolls); |
97 |
public boolean getUseScrollBars(); |
98 |
|
99 |
public boolean isModified(); |
100 |
|
101 |
public void addListener(JDynFormListener listener); |
102 |
public void removeListener(JDynFormListener listener); |
103 |
|
104 |
public void addActionToPopupMenu(DataType tipo, String name, Action action); |
105 |
public void addSeparatorToPopupMenu(DataType tipo); |
106 |
|
107 |
public void clear(); |
108 |
|
109 |
public DynFormContext getContext();
|
110 |
|
111 |
public void setContext(DynFormContext context); |
112 |
|
113 |
public Script getScript();
|
114 |
|
115 |
public Object callUserFunction(String function, Object...args) throws Exception; |
116 |
|
117 |
} |