svn-gvsig-desktop / branches / org.gvsig.desktop-cvsgis1 / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.swing / org.gvsig.fmap.dal.swing.impl / src / main / java / org / gvsig / fmap / dal / swing / impl / DefaultDALSwingLibrary.java @ 45419
History | View | Annotate | Download (6.4 KB)
1 | 42104 | jjdelcerro | /* gvSIG. Desktop Geographic Information System.
|
---|---|---|---|
2 | *
|
||
3 | * Copyright ? 2007-2014 gvSIG Association
|
||
4 | *
|
||
5 | * This program is free software; you can redistribute it and/or
|
||
6 | * modify it under the terms of the GNU General Public License
|
||
7 | * as published by the Free Software Foundation; either version 2
|
||
8 | * of the License, or (at your option) any later version.
|
||
9 | *
|
||
10 | * This program is distributed in the hope that it will be useful,
|
||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
13 | * GNU General Public License for more details.
|
||
14 | *
|
||
15 | * You should have received a copy of the GNU General Public License
|
||
16 | * along with this program; if not, write to the Free Software
|
||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
18 | * MA 02110-1301, USA.
|
||
19 | *
|
||
20 | * For any additional information, do not hesitate to contact us
|
||
21 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
22 | */
|
||
23 | 42112 | jjdelcerro | package org.gvsig.fmap.dal.swing.impl; |
24 | 42104 | jjdelcerro | |
25 | 44531 | omartinez | import org.gvsig.featureform.swing.impl.DefaultJFeaturesForm; |
26 | 44128 | jjdelcerro | import org.gvsig.featureform.swing.impl.dynformfield.ImageByteArray.JDynFormFieldImageByteArrayFactory; |
27 | import org.gvsig.featureform.swing.impl.dynformfield.ImageFile.JDynFormFieldImageFileFactory; |
||
28 | 44253 | jjdelcerro | import org.gvsig.featureform.swing.impl.dynformfield.ImageURL.JDynFormFieldImageURLFactory; |
29 | 44262 | jjdelcerro | import org.gvsig.featureform.swing.impl.dynformfield.features.JDynFormFieldRelatedFeaturesFactory; |
30 | 44128 | jjdelcerro | import org.gvsig.featureform.swing.impl.dynformfield.linkedentity.JDynFormFieldFeatureLinkFactory; |
31 | import org.gvsig.featureform.swing.impl.dynformfield.linkedentities.JDynFormFieldFeaturesTableLinkFactory; |
||
32 | 44253 | jjdelcerro | import org.gvsig.featureform.swing.impl.dynformfield.linkforeingkey.JDynFormFieldForeingKeyFactory; |
33 | import org.gvsig.featureform.swing.impl.dynformfield.selectableforeingkey.JDynFormFieldSelectableForeingKeyFactory; |
||
34 | 42775 | jjdelcerro | import org.gvsig.fmap.dal.impl.DefaultEditingNotificationManager; |
35 | 42112 | jjdelcerro | import org.gvsig.fmap.dal.swing.DALSwingLibrary; |
36 | import org.gvsig.fmap.dal.swing.DALSwingLocator; |
||
37 | 43208 | jjdelcerro | import org.gvsig.fmap.dal.swing.dataStoreParameters.DataStoreParametersPanelManager; |
38 | 45154 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.actions.ShowFormForOpenStoreParametersAction; |
39 | 43208 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.dataStoreParameters.DataStoreDynObjectParametersPanelFactory; |
40 | import org.gvsig.fmap.dal.swing.impl.dataStoreParameters.DefaultDataStoreParametersPanelManager; |
||
41 | 42776 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.dynobjectutils.CreateComboModelFromTable; |
42 | 43983 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.expressionevaluator.FeatureStoreElementFactory; |
43 | 44713 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.featurequery.DefaultFeatureQueryCalculatedColumnsPanel; |
44 | import org.gvsig.fmap.dal.swing.impl.featurequery.DefaultFeatureQueryGroupByPanel; |
||
45 | 44533 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.jdbc.JDBCConnectionPickerController; |
46 | 44712 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.featurequery.DefaultFeatureQueryOrderPanel; |
47 | 44713 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureAttributePanel; |
48 | import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureAttributeSelectionPanel; |
||
49 | import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureAttributesSelectionPanel; |
||
50 | import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureTypePanel; |
||
51 | 44259 | jjdelcerro | import org.gvsig.fmap.dal.swing.impl.searchpanel.DefaultSearchPanel; |
52 | 44829 | omartinez | import org.gvsig.fmap.dal.swing.impl.searchpanel.DefaultSearchParameters; |
53 | 42776 | jjdelcerro | import org.gvsig.tools.ToolsLocator; |
54 | import org.gvsig.tools.dynobject.DynObjectManager; |
||
55 | 42104 | jjdelcerro | import org.gvsig.tools.library.AbstractLibrary; |
56 | import org.gvsig.tools.library.LibraryException; |
||
57 | 43983 | jjdelcerro | import org.slf4j.Logger; |
58 | import org.slf4j.LoggerFactory; |
||
59 | 42104 | jjdelcerro | |
60 | |||
61 | /**
|
||
62 | * @author fdiaz
|
||
63 | *
|
||
64 | */
|
||
65 | 45133 | jjdelcerro | @SuppressWarnings("UseSpecificCatch") |
66 | 42112 | jjdelcerro | public class DefaultDALSwingLibrary extends AbstractLibrary{ |
67 | 42104 | jjdelcerro | |
68 | 43983 | jjdelcerro | private static final Logger LOGGER = LoggerFactory.getLogger(DefaultDALSwingLibrary.class); |
69 | 42104 | jjdelcerro | |
70 | 42775 | jjdelcerro | @Override
|
71 | 42104 | jjdelcerro | public void doRegistration() { |
72 | 42112 | jjdelcerro | registerAsImplementationOf(DALSwingLibrary.class); |
73 | 42104 | jjdelcerro | } |
74 | |||
75 | |||
76 | 42775 | jjdelcerro | @Override
|
77 | 42104 | jjdelcerro | protected void doInitialize() throws LibraryException { |
78 | 42112 | jjdelcerro | DALSwingLocator.registerSwingManager(DefaultDataSwingManager.class); |
79 | 42775 | jjdelcerro | DALSwingLocator.registerEditingNotificationManager(DefaultEditingNotificationManager.class); |
80 | 43208 | jjdelcerro | |
81 | DALSwingLocator.registerDataStoreParametersPanelManager(DefaultDataStoreParametersPanelManager.class); |
||
82 | 42104 | jjdelcerro | } |
83 | |||
84 | |||
85 | 42775 | jjdelcerro | @Override
|
86 | 42104 | jjdelcerro | protected void doPostInitialize() throws LibraryException { |
87 | 43983 | jjdelcerro | try {
|
88 | 44253 | jjdelcerro | JDynFormFieldFeatureLinkFactory.selfRegister(); |
89 | JDynFormFieldFeaturesTableLinkFactory.selfRegister(); |
||
90 | 44259 | jjdelcerro | |
91 | 44253 | jjdelcerro | JDynFormFieldImageByteArrayFactory.selfRegister(); |
92 | JDynFormFieldImageFileFactory.selfRegister(); |
||
93 | JDynFormFieldImageURLFactory.selfRegister(); |
||
94 | JDynFormFieldForeingKeyFactory.selfRegister(); |
||
95 | JDynFormFieldSelectableForeingKeyFactory.selfRegister(); |
||
96 | 44262 | jjdelcerro | JDynFormFieldRelatedFeaturesFactory.selfRegister(); |
97 | 44259 | jjdelcerro | |
98 | 44713 | jjdelcerro | DefaultFeatureAttributePanel.selfRegister(); |
99 | DefaultFeatureAttributeSelectionPanel.selfRegister(); |
||
100 | DefaultFeatureAttributesSelectionPanel.selfRegister(); |
||
101 | DefaultFeatureTypePanel.selfRegister(); |
||
102 | |||
103 | DefaultFeatureQueryCalculatedColumnsPanel.selfRegister(); |
||
104 | DefaultFeatureQueryGroupByPanel.selfRegister(); |
||
105 | 44712 | jjdelcerro | DefaultFeatureQueryOrderPanel.selfRegister(); |
106 | 44713 | jjdelcerro | |
107 | 44259 | jjdelcerro | DefaultSearchPanel.selfRegister(); |
108 | 44713 | jjdelcerro | |
109 | 44533 | jjdelcerro | JDBCConnectionPickerController.selfRegister(); |
110 | 44531 | omartinez | DefaultJFeaturesForm.selfRegister(); |
111 | 44829 | omartinez | DefaultSearchParameters.registerPersistence(); |
112 | 44253 | jjdelcerro | |
113 | 43983 | jjdelcerro | DynObjectManager dynObjectmanager = ToolsLocator.getDynObjectManager(); |
114 | dynObjectmanager.registerDynMethod(new CreateComboModelFromTable("DAL.createComboModelFromTable", "XXXXXXXXXXXXXXXXXXXX.")); |
||
115 | 44829 | omartinez | |
116 | 43983 | jjdelcerro | DataStoreParametersPanelManager dataStoreParametersPanelManager = DALSwingLocator.getDataStoreParametersPanelManager(); |
117 | dataStoreParametersPanelManager.registerFactory(new DataStoreDynObjectParametersPanelFactory());
|
||
118 | 45133 | jjdelcerro | |
119 | DefaultEditingNotificationManager.selfRegister(); |
||
120 | 45154 | jjdelcerro | |
121 | ShowFormForOpenStoreParametersAction.selfRegister(); |
||
122 | 45133 | jjdelcerro | |
123 | 43983 | jjdelcerro | } catch(Exception ex) { |
124 | LOGGER.warn("Can't register DAL components in DynForms",ex);
|
||
125 | 42775 | jjdelcerro | } |
126 | 43983 | jjdelcerro | try {
|
127 | FeatureStoreElementFactory.selfRegister(); |
||
128 | } catch(Exception ex) { |
||
129 | LOGGER.warn("Can't register DAL components in ExpressionEvaluator",ex);
|
||
130 | } |
||
131 | 42104 | jjdelcerro | } |
132 | |||
133 | } |