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 @ 1881
History | View | Annotate | Download (6.16 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 suffix); |
60 |
public boolean containsJSpinner(DynFormFieldDefinition definition, String suffix); |
61 |
public boolean containsJTextField(DynFormFieldDefinition definition, String suffix); |
62 |
public boolean containsJButton(DynFormFieldDefinition definition, String suffix); |
63 |
|
64 |
public JButton getJButton(DynFormFieldDefinition definition, String suffix); |
65 |
public ScrolledComponent<JTable> getJTable(DynFormFieldDefinition definition, String suffix); |
66 |
public JCheckBox getJCheckBox(DynFormFieldDefinition definition, String suffix); |
67 |
public JLabel getJLabel(DynFormFieldDefinition definition, String suffix); |
68 |
public JComboBox getJComboBox(DynFormFieldDefinition definition, String suffix); |
69 |
public JTextComponent getJTextField(DynFormFieldDefinition definition, String suffix); |
70 |
public JSpinner getJSpinner(DynFormFieldDefinition definition, String suffix); |
71 |
public ScrolledComponent<JTextArea> getJTextArea(DynFormFieldDefinition definition, String suffix); |
72 |
public ScrolledComponent<JList> getJList(DynFormFieldDefinition definition, String suffix); |
73 |
} |
74 |
|
75 |
|
76 |
public static final String TAG_DYNFORM_ABEILLE_FORM = "dynform.abeille.form.resource"; |
77 |
public static final String TAG_DYNFORM_LAYOUTMODE = "dynform.layoutmode"; |
78 |
public static final String TAG_DYNFORM_LAYOUTMODE_VALUE_TABS = "tabs"; |
79 |
public static final String TAG_DYNFORM_LAYOUTMODE_VALUE_PLAIN = "plain"; |
80 |
public static final String TAG_DYNFORM_LAYOUTMODE_VALUE_SEPARATORS = "separators"; |
81 |
|
82 |
public static final String TAG_DYNFORM_AUTOSAVE = "dynform.autosave"; |
83 |
public static final String TAG_DYNFORM_BORDER = "dynform.border"; |
84 |
public static final String TAG_DYNFORM_VIEWMODE = "dynform.viewmode"; |
85 |
public static final String TAG_DYNFORM_HEIGHT = "dynform.height"; |
86 |
public static final String TAG_DYNFORM_WIDTH = "dynform.width"; |
87 |
public static final String TAG_DYNFORM_LABEL_EMPTY = "dynform.label.empty"; |
88 |
public static final String TAG_DYNFORM_ACTION_NEW = "dynform.action.new"; |
89 |
public static final String TAG_DYNFORM_ACTION_UPDATE = "dynform.action.update"; |
90 |
public static final String TAG_DYNFORM_ACTION_DELETE = "dynform.action.delete"; |
91 |
public static final String TAG_DYNFORM_ACTION_SEARCH = "dynform.action.search"; |
92 |
public static final String TAG_DYNFORM_ACTION_CLOSE = "dynform.action.close"; |
93 |
public static final String TAG_DYNFORM_ROWS = "dynform.rows"; |
94 |
public static final String TAG_DYNFORM_USESCROLLBARS = "dynform.useScrollBars"; |
95 |
public static final String TAG_DYNFORM_READONLY = "dynform.readonly"; |
96 |
public static final String TAG_DYNFORM_TRANSLATE_EMPTY_TO_NULL = "dynform.translateEmptyToNull"; |
97 |
|
98 |
public void registerDynFieldFactory(JDynFormFieldFactory factory); |
99 |
|
100 |
public void registerDynFormFactory(JDynFormFactory factory); |
101 |
|
102 |
public void registerDynFormSetFactory(JDynFormSetFactory factory); |
103 |
|
104 |
public JDynFormFactory getJDynFormFactory(DynFormContext context, DynFormDefinition definition) throws NotRegisteredException; |
105 |
|
106 |
public JDynFormSetFactory getJDynFormSetFactory(DynFormContext context, DynFormDefinition definition, Tags contextTags) throws NotRegisteredException; |
107 |
|
108 |
public JDynFormFieldFactory getJDynFormFieldFactory(DynFormFieldDefinition definition) throws NotRegisteredException; |
109 |
|
110 |
public JDynFormFieldFactory getJDynFormFieldFactory(String name); |
111 |
|
112 |
public List<JDynFormFieldFactory> getJDynFormFieldFactories(); |
113 |
|
114 |
public DynFormManager getDynFormManager();
|
115 |
|
116 |
public JZoomDialog createJZoomDialog(String title, String message, String text); |
117 |
|
118 |
public JProblemIndicator createProblemIndicator(JDynFormField field);
|
119 |
|
120 |
public JPopupMenu createTextFieldPopupMenu(String title, JTextComponent component, boolean zoom); |
121 |
|
122 |
public ComponentsFactory createDefaultComponentsFactory();
|
123 |
} |