gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.dynform / org.gvsig.tools.dynform.spi / src / main / java / org / gvsig / tools / dynform / spi / DynFormSPIManager.java @ 2031
History | View | Annotate | Download (7.17 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 modify it under
|
7 |
* the terms of the GNU General Public License as published by the Free Software
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later
|
9 |
* version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
14 |
* details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License along with
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
19 |
*
|
20 |
* For any additional information, do not hesitate to contact us at info AT
|
21 |
* gvsig.com, or visit our website www.gvsig.com.
|
22 |
*/
|
23 |
package org.gvsig.tools.dynform.spi; |
24 |
|
25 |
import java.util.List; |
26 |
import javax.swing.JButton; |
27 |
import javax.swing.JCheckBox; |
28 |
import javax.swing.JComboBox; |
29 |
import javax.swing.JLabel; |
30 |
import javax.swing.JList; |
31 |
import org.gvsig.tools.dynform.spi.dynformfield.JDynFormFieldFactory; |
32 |
import org.gvsig.tools.dynform.spi.dynform.JDynFormFactory; |
33 |
import org.gvsig.tools.dynform.spi.dynformset.JDynFormSetFactory; |
34 |
import javax.swing.JPopupMenu; |
35 |
import javax.swing.JScrollPane; |
36 |
import javax.swing.JSpinner; |
37 |
import javax.swing.JTable; |
38 |
import javax.swing.JTextArea; |
39 |
import javax.swing.text.JTextComponent; |
40 |
import org.gvsig.tools.dynform.DynFormDefinition; |
41 |
|
42 |
import org.gvsig.tools.dynform.DynFormFieldDefinition; |
43 |
import org.gvsig.tools.dynform.DynFormManager; |
44 |
import org.gvsig.tools.dynform.JDynForm.DynFormContext; |
45 |
import org.gvsig.tools.dynform.JDynFormField; |
46 |
import org.gvsig.tools.dynform.spi.dynformfield.JProblemIndicator; |
47 |
import org.gvsig.tools.dynform.spi.dynformfield.JZoomDialog; |
48 |
import org.gvsig.tools.dynobject.Tags; |
49 |
import org.gvsig.tools.service.spi.NotRegisteredException; |
50 |
|
51 |
public interface DynFormSPIManager { |
52 |
|
53 |
public interface ComponentsFactory { |
54 |
public interface ScrolledComponent<T> { |
55 |
public JScrollPane getScrollPane(); |
56 |
public T getComponent();
|
57 |
} |
58 |
public boolean containsComponents(DynFormFieldDefinition definition); |
59 |
public boolean containsJComboBox(DynFormFieldDefinition definition, String prefix); |
60 |
public boolean containsJLabel(DynFormFieldDefinition definition, String prefix); |
61 |
public boolean containsJSpinner(DynFormFieldDefinition definition, String prefix); |
62 |
public boolean containsJTextField(DynFormFieldDefinition definition, String prefix); |
63 |
public boolean containsJButton(DynFormFieldDefinition definition, String prefix); |
64 |
|
65 |
public JButton getJButton(DynFormFieldDefinition definition, String prefix); |
66 |
public ScrolledComponent<JTable> getJTable(DynFormFieldDefinition definition, String prefix); |
67 |
public JCheckBox getJCheckBox(DynFormFieldDefinition definition, String prefix); |
68 |
public JLabel getJLabel(DynFormFieldDefinition definition, String prefix); |
69 |
public JComboBox getJComboBox(DynFormFieldDefinition definition, String prefix); |
70 |
public JTextComponent getJTextField(DynFormFieldDefinition definition, String prefix); |
71 |
public JSpinner getJSpinner(DynFormFieldDefinition definition, String prefix); |
72 |
public ScrolledComponent<JTextArea> getJTextArea(DynFormFieldDefinition definition, String prefix); |
73 |
public ScrolledComponent<JList> getJList(DynFormFieldDefinition definition, String prefix); |
74 |
} |
75 |
|
76 |
public static final String USERCODE_FORM_ONLOAD = "form_onLoad"; |
77 |
public static final String USERCODE_FORM_ONSETVALUES = "form_onSetvalues"; |
78 |
public static final String USERCODE_FORM_ONFIELDENTER = "form_onFieldEnter"; |
79 |
public static final String USERCODE_FORM_ONFIELDEXIT = "form_onFieldExit"; |
80 |
public static final String USERCODE_FORM_ONFIELDCHANGED = "form_onFieldChanged"; |
81 |
public static final String USERCODE_FORM_VALIDATE = "form_validate"; |
82 |
public static final String USERCODE_FORM_CLEAR = "form_clear"; |
83 |
public static final String USERCODE_FORM_ISREADONLY = "form_isReadOnly"; |
84 |
public static final String USERCODE_FORM_ISMODIFIED = "form_isModified"; |
85 |
|
86 |
public static final String TAG_DYNFORM_ABEILLE_FORM = "dynform.abeille.form.resource"; |
87 |
public static final String TAG_DYNFORM_LAYOUTMODE = "dynform.layoutmode"; |
88 |
public static final String TAG_DYNFORM_LAYOUTMODE_VALUE_TABS = "tabs"; |
89 |
public static final String TAG_DYNFORM_LAYOUTMODE_VALUE_PLAIN = "plain"; |
90 |
public static final String TAG_DYNFORM_LAYOUTMODE_VALUE_SEPARATORS = "separators"; |
91 |
|
92 |
public static final String TAG_DYNFORM_AUTOSAVE = "dynform.autosave"; |
93 |
public static final String TAG_DYNFORM_BORDER = "dynform.border"; |
94 |
public static final String TAG_DYNFORM_VIEWMODE = "dynform.viewmode"; |
95 |
public static final String TAG_DYNFORM_HEIGHT = "dynform.height"; |
96 |
public static final String TAG_DYNFORM_WIDTH = "dynform.width"; |
97 |
public static final String TAG_DYNFORM_LABEL_EMPTY = "dynform.label.empty"; |
98 |
public static final String TAG_DYNFORM_ACTION_NEW = "dynform.action.new"; |
99 |
public static final String TAG_DYNFORM_ACTION_UPDATE = "dynform.action.update"; |
100 |
public static final String TAG_DYNFORM_ACTION_DELETE = "dynform.action.delete"; |
101 |
public static final String TAG_DYNFORM_ACTION_SEARCH = "dynform.action.search"; |
102 |
public static final String TAG_DYNFORM_ACTION_CLOSE = "dynform.action.close"; |
103 |
public static final String TAG_DYNFORM_ROWS = "dynform.rows"; |
104 |
public static final String TAG_DYNFORM_USESCROLLBARS = "dynform.useScrollBars"; |
105 |
public static final String TAG_DYNFORM_READONLY = "dynform.readonly"; |
106 |
public static final String TAG_DYNFORM_TRANSLATE_EMPTY_TO_NULL = "dynform.translateEmptyToNull"; |
107 |
public static final String TAG_DYNFORM_SEPARATOR = "dynform.separator"; |
108 |
public static final String TAG_DYNFORM_DROPDOWN = "dynform.dropdown"; |
109 |
public static final String TAG_DYNFORM_RESIZEWEIGHT = "dynform.resizeWeight"; |
110 |
|
111 |
public void registerDynFieldFactory(JDynFormFieldFactory factory); |
112 |
|
113 |
public void registerDynFormFactory(JDynFormFactory factory); |
114 |
|
115 |
public void registerDynFormSetFactory(JDynFormSetFactory factory); |
116 |
|
117 |
public JDynFormFactory getJDynFormFactory(DynFormContext context, DynFormDefinition definition) throws NotRegisteredException; |
118 |
|
119 |
public JDynFormSetFactory getJDynFormSetFactory(DynFormContext context, DynFormDefinition definition, Tags contextTags) throws NotRegisteredException; |
120 |
|
121 |
public JDynFormFieldFactory getJDynFormFieldFactory(DynFormContext context, DynFormFieldDefinition definition) throws NotRegisteredException; |
122 |
|
123 |
public JDynFormFieldFactory getJDynFormFieldFactory(String name); |
124 |
|
125 |
public List<JDynFormFieldFactory> getJDynFormFieldFactories(); |
126 |
|
127 |
public DynFormManager getDynFormManager();
|
128 |
|
129 |
public JZoomDialog createJZoomDialog(String title, String message, String text); |
130 |
|
131 |
public JProblemIndicator createProblemIndicator(JDynFormField field);
|
132 |
|
133 |
public JPopupMenu createTextFieldPopupMenu(String title, JTextComponent component, boolean zoom); |
134 |
|
135 |
public ComponentsFactory createDefaultComponentsFactory();
|
136 |
} |