Revision 9619
org.gvsig.online/tags/org.gvsig.online-1.0.1/org.gvsig.online.app/org.gvsig.online.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Mon Jun 10 15:17:49 CEST 2024 |
|
2 |
buildNumber=2 |
org.gvsig.online/tags/org.gvsig.online-1.0.1/org.gvsig.online.app/org.gvsig.online.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 gvSIG |
|
2 |
Association. This program is free software; you can redistribute it and/or modify |
|
3 |
it under the terms of the GNU General Public License as published by the Free Software |
|
4 |
Foundation; either version 3 of the License, or (at your option) any later version. |
|
5 |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
|
6 |
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
7 |
PURPOSE. See the GNU General Public License for more details. You should have received |
|
8 |
a copy of the GNU General Public License along with this program; if not, write to |
|
9 |
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
|
10 |
USA. For any additional information, do not hesitate to contact us at info AT gvsig.com, |
|
11 |
or visit our website www.gvsig.com. --> |
|
12 |
<assembly> |
|
13 |
<id>gvsig-plugin-package</id> |
|
14 |
<formats> |
|
15 |
<format>zip</format> |
|
16 |
</formats> |
|
17 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
18 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
19 |
<files> |
|
20 |
<file> |
|
21 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
22 |
<outputDirectory>lib</outputDirectory> |
|
23 |
</file> |
|
24 |
<file> |
|
25 |
<source>target/package.info</source> |
|
26 |
</file> |
|
27 |
</files> |
|
28 |
|
|
29 |
<fileSets> |
|
30 |
<fileSet> |
|
31 |
<directory>src/main/resources-plugin</directory> |
|
32 |
<outputDirectory>.</outputDirectory> |
|
33 |
</fileSet> |
|
34 |
</fileSets> |
|
35 |
|
|
36 |
|
|
37 |
<dependencySets> |
|
38 |
<dependencySet> |
|
39 |
<useProjectArtifact>false</useProjectArtifact> |
|
40 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
41 |
<outputDirectory>lib</outputDirectory> |
|
42 |
<includes> |
|
43 |
<include>org.gvsig:org.gvsig.online.lib.api</include> |
|
44 |
<include>org.gvsig:org.gvsig.online.lib.impl</include> |
|
45 |
<include>org.gvsig:org.gvsig.online.swing.api</include> |
|
46 |
<include>org.gvsig:org.gvsig.online.swing.impl</include> |
|
47 |
|
|
48 |
<include>org.gvsig:org.gvsig.online.swing.scribejava</include> |
|
49 |
<include>com.github.scribejava:scribejava-apis</include> |
|
50 |
<include>com.github.scribejava:scribejava-core</include> |
|
51 |
<include>com.github.scribejava:scribejava-java8</include> |
|
52 |
<include>com.fasterxml.jackson.core:jackson-databind</include> |
|
53 |
<include>com.fasterxml.jackson.core:jackson-annotations</include> |
|
54 |
<include>com.fasterxml.jackson.core:jackson-core</include> |
|
55 |
|
|
56 |
|
|
57 |
</includes> |
|
58 |
</dependencySet> |
|
59 |
</dependencySets> |
|
60 |
|
|
61 |
</assembly> |
|
62 |
|
org.gvsig.online/tags/org.gvsig.online-1.0.1/org.gvsig.online.app/org.gvsig.online.app.mainplugin/src/main/java/org/gvsig/online/app/mainplugin/OnlineExtension.java | ||
---|---|---|
1 |
/* |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. |
|
18 |
* |
|
19 |
* For any additional information, do not hesitate to contact us |
|
20 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
21 |
*/ |
|
22 |
package org.gvsig.online.app.mainplugin; |
|
23 |
|
|
24 |
import java.awt.Dimension; |
|
25 |
import java.awt.GridBagConstraints; |
|
26 |
import java.sql.Timestamp; |
|
27 |
import java.util.ArrayList; |
|
28 |
import java.util.Collections; |
|
29 |
import java.util.EventListener; |
|
30 |
import java.util.List; |
|
31 |
import java.util.Map; |
|
32 |
import javax.swing.JOptionPane; |
|
33 |
import org.apache.commons.collections.CollectionUtils; |
|
34 |
import org.apache.commons.lang3.StringUtils; |
|
35 |
import org.gvsig.andami.PluginsLocator; |
|
36 |
import org.gvsig.andami.plugins.Extension; |
|
37 |
import org.gvsig.andami.preferences.IPreference; |
|
38 |
import org.gvsig.andami.preferences.IPreferenceExtension; |
|
39 |
import org.gvsig.app.ApplicationLocator; |
|
40 |
import org.gvsig.app.ApplicationManager; |
|
41 |
import org.gvsig.app.extension.AddLayer; |
|
42 |
import org.gvsig.app.project.ProjectManager.ProjectEvent; |
|
43 |
import static org.gvsig.app.project.ProjectNotification.AFTER_LOAD_FROM_FILE; |
|
44 |
import static org.gvsig.app.project.ProjectNotification.BEFORE_SAVE_TO_FILE; |
|
45 |
import org.gvsig.app.project.documents.view.ViewDocument; |
|
46 |
import org.gvsig.app.project.documents.view.ViewManager; |
|
47 |
import org.gvsig.fmap.dal.EditingNotificationManager; |
|
48 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
49 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
|
50 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
51 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
|
52 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
53 |
import org.gvsig.fmap.mapcontext.layers.vectorial.VectorLayer; |
|
54 |
import org.gvsig.online.app.mainplugin.OnlineDialogsHelper.OnlineDialogInfo; |
|
55 |
import org.gvsig.online.app.mainplugin.addlayer.WizardOnlineTabular; |
|
56 |
import org.gvsig.online.app.mainplugin.addlayer.WizardOnlineVectorial; |
|
57 |
import org.gvsig.online.app.mainplugin.preferencespages.OnlinePage; |
|
58 |
import org.gvsig.online.lib.api.OnlineLocator; |
|
59 |
import org.gvsig.online.lib.api.OnlineManager; |
|
60 |
import org.gvsig.online.lib.api.workingcopy.OnlineWorkingcopy; |
|
61 |
import org.gvsig.online.lib.api.workingcopy.OnlineWorkingcopyDescriptor; |
|
62 |
import org.gvsig.online.swing.api.OnlineJDownload; |
|
63 |
import org.gvsig.online.swing.api.OnlineJInitWorkingcopy; |
|
64 |
import org.gvsig.online.swing.api.OnlineSwingLocator; |
|
65 |
import org.gvsig.online.swing.api.OnlineSwingManager; |
|
66 |
import org.gvsig.tools.ToolsLocator; |
|
67 |
import org.gvsig.tools.arguments.Arguments; |
|
68 |
import org.gvsig.tools.dispose.DisposeUtils; |
|
69 |
import org.gvsig.tools.dynobject.DynObject; |
|
70 |
import org.gvsig.tools.i18n.I18nManager; |
|
71 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
72 |
import org.gvsig.tools.swing.api.ToolsSwingUtils; |
|
73 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
|
74 |
|
|
75 |
|
|
76 |
/** |
|
77 |
* |
|
78 |
* @author gvSIG Team |
|
79 |
*/ |
|
80 |
public class OnlineExtension |
|
81 |
extends Extension |
|
82 |
implements IPreferenceExtension |
|
83 |
{ |
|
84 |
|
|
85 |
private OnlineDialogsHelper dialogsHelper; |
|
86 |
|
|
87 |
@Override |
|
88 |
public void initialize() { |
|
89 |
ToolsSwingUtils.registerIcons( |
|
90 |
this.getClass(), |
|
91 |
"/images/action", |
|
92 |
"online", |
|
93 |
// new String[] { "action", "tools-vcsgis-init-server","vcsgis" }, |
|
94 |
new String[] { "action", "tools-online-init-workspace","online" }, |
|
95 |
// new String[] { "action", "tools-vcsgis-add-to-workspace","vcsgis" }, |
|
96 |
// new String[] { "action", "tools-vcsgis-export","vcsgis" }, |
|
97 |
new String[] { "action", "tools-online-download","online" }, |
|
98 |
new String[] { "action", "tools-online-showchanges","online" } |
|
99 |
// new String[] { "action", "tools-vcsgis-register-workspace","vcsgis" }, |
|
100 |
// new String[] { "action", "tools-vcsgis-show-revisions","vcsgis" }, |
|
101 |
// new String[] { "action", "tools-vcsgis-checkout-datamodel","vcsgis" }, |
|
102 |
// new String[] { "action", "tools-vcsgis-download-workingcopy","vcsgis" } |
|
103 |
); |
|
104 |
ToolsSwingUtils.registerSubgroupIconDescription("action", "online", "Acciones asociadas al complemento de Online.\nSe encuentran en el menu 'Heramientas/Online'"); |
|
105 |
|
|
106 |
|
|
107 |
this.dialogsHelper = new OnlineDialogsHelper(); |
|
108 |
// ToolsLocator.getDisposableManager().setStackLimit(200); |
|
109 |
} |
|
110 |
|
|
111 |
@Override |
|
112 |
public void postInitialize() { |
|
113 |
super.postInitialize(); |
|
114 |
|
|
115 |
ToolsSwingUtils.registerIcons( |
|
116 |
this.getClass(), |
|
117 |
"/images/preferences", |
|
118 |
"online", |
|
119 |
new String[] { "preferences", "online-preferences","online" } |
|
120 |
); |
|
121 |
|
|
122 |
ApplicationManager application = ApplicationLocator.getApplicationManager(); |
|
123 |
OnlineManager manager = OnlineLocator.getOnlineManager(); |
|
124 |
OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
125 |
swingManager.setDefaultServices(new OnlineSwingServicesImpl()); |
|
126 |
|
|
127 |
DynObject pluginProperties = this.getPlugin().getPluginProperties(); |
|
128 |
Map<String, OnlineWorkingcopyDescriptor> workspaces = (Map) pluginProperties.getDynValue("workspaces"); |
|
129 |
manager.restoreWorkingcopy(workspaces); |
|
130 |
// swingManager.setRepositoryEntityFeatureTypeEditorMode((int)pluginProperties.getDynValue("RepositoryEntityFeatureTypeEditorMode")); |
|
131 |
|
|
132 |
PluginsLocator.getPluginsManager().addShutdownTask( |
|
133 |
"OnlineSave", |
|
134 |
() -> { |
|
135 |
DynObject pluginProps = getPlugin().getPluginProperties(); |
|
136 |
pluginProps.setDynValue("workspaces", manager.getWorkingcopy()); |
|
137 |
// pluginProps.setDynValue("RepositoryEntityFeatureTypeEditorMode", swingManager.getRepositoryEntityFeatureTypeEditorMode()); |
|
138 |
}, |
|
139 |
false, |
|
140 |
100 |
|
141 |
); |
|
142 |
|
|
143 |
ApplicationLocator.getManager().registerAddTableWizard( |
|
144 |
"Online", |
|
145 |
"Online", |
|
146 |
WizardOnlineTabular.class |
|
147 |
); |
|
148 |
AddLayer.addWizard(WizardOnlineVectorial.class); |
|
149 |
|
|
150 |
application.getProjectManager().addProjectListener((EventListener e) -> { |
|
151 |
if( e instanceof ProjectEvent ) { |
|
152 |
ProjectEvent pe = (ProjectEvent)e; |
|
153 |
switch(pe.getId()) { |
|
154 |
case AFTER_LOAD_FROM_FILE: |
|
155 |
OnlineSwingServicesImpl services = (OnlineSwingServicesImpl) OnlineSwingLocator.getOnlineSwingManager().getDefaultServices(); |
|
156 |
services.projectLoaded(pe.getProject()); |
|
157 |
break; |
|
158 |
case BEFORE_SAVE_TO_FILE: |
|
159 |
break; |
|
160 |
} |
|
161 |
} |
|
162 |
}); |
|
163 |
|
|
164 |
EditingNotificationManager editingNotificationManager = DALSwingLocator.getEditingNotificationManager(); |
|
165 |
editingNotificationManager.addObserver(new EditingNotificationObserver()); |
|
166 |
} |
|
167 |
|
|
168 |
@Override |
|
169 |
public void execute(String actionCommand) { |
|
170 |
this.execute(actionCommand, null); |
|
171 |
} |
|
172 |
|
|
173 |
@Override |
|
174 |
public void execute(String actionCommand, Object[] args) { |
|
175 |
Arguments arguments = Arguments.create(args); |
|
176 |
switch (actionCommand) { |
|
177 |
case "tools-online-showchanges": |
|
178 |
this.showChangesDialog((OnlineWorkingcopy) arguments.get("workspace", OnlineWorkingcopy.class, null), |
|
179 |
arguments.getListOf("tablenames", String.class), |
|
180 |
(Timestamp) arguments.get("efectivedate", Timestamp.class, null), |
|
181 |
(String) arguments.get("comment", String.class, null) |
|
182 |
); |
|
183 |
break; |
|
184 |
|
|
185 |
// case "tools-vcsgis-init-server": |
|
186 |
// showInitializaRepositoryDialog(); |
|
187 |
// break; |
|
188 |
case "tools-online-init-workspace": |
|
189 |
showInitWorkspaceDialog(); |
|
190 |
break; |
|
191 |
// case "tools-vcsgis-add-to-workspace": |
|
192 |
// showAddToWorkspaceDialog(); |
|
193 |
// break; |
|
194 |
case "tools-online-download": |
|
195 |
showDownloadDialog((OnlineWorkingcopy) arguments.get("workspace", OnlineWorkingcopy.class, null), |
|
196 |
arguments.getListOf("tablenames", String.class), |
|
197 |
(Boolean) arguments.get("overwrite", Boolean.class, null) |
|
198 |
); |
|
199 |
break; |
|
200 |
case "tools-online-simple-search": |
|
201 |
FeatureStore store = (FeatureStore) arguments.get("store", FeatureStore.class, null); |
|
202 |
if(store == null) { |
|
203 |
store = this.getActiveOnlineStore(); |
|
204 |
showSimpleSearchDialog( |
|
205 |
store, |
|
206 |
arguments |
|
207 |
); |
|
208 |
DisposeUtils.dispose(store); |
|
209 |
} else { |
|
210 |
showSimpleSearchDialog( |
|
211 |
store, |
|
212 |
arguments |
|
213 |
); |
|
214 |
} |
|
215 |
break; |
|
216 |
|
|
217 |
// case "tools-vcsgis-export": |
|
218 |
// showExportDialog(); |
|
219 |
// break; |
|
220 |
// case "tools-vcsgis-register-workspace": |
|
221 |
// showRegistrationWorkspaceDialog(); |
|
222 |
// break; |
|
223 |
// case "tools-vcsgis-show_server-entities": |
|
224 |
// showServerEntitiesDialog(); |
|
225 |
// break; |
|
226 |
// case "tools-vcsgis-show_server-hooks": |
|
227 |
// showServerHooksDialog(); |
|
228 |
// break; |
|
229 |
// case "tools-vcsgis-show-revisions": |
|
230 |
// showHistory(); |
|
231 |
// break; |
|
232 |
// case "tools-vcsgis-import-history": |
|
233 |
// showImportHistoryDialog(); |
|
234 |
// break; |
|
235 |
// case "tools-vcsgis-create-resource-table": |
|
236 |
// showCreateResourceTableDialog(); |
|
237 |
// break; |
|
238 |
// case "tools-vcsgis-logout": |
|
239 |
// showLogoutDialog(); |
|
240 |
// break; |
|
241 |
// case "tools-vcsgis-checkout-datamodel": |
|
242 |
// showCheckoutDataModelDialog( |
|
243 |
// (OnlineWorkspace) arguments.get("workspace", OnlineWorkspace.class, null), |
|
244 |
// (String) arguments.get("model", String.class, null) |
|
245 |
// ); |
|
246 |
// break; |
|
247 |
// case "tools-vcsgis-download-workingcopy": |
|
248 |
// showDownloadWorkingcopyDialog(); |
|
249 |
// break; |
|
250 |
// case "tools-vcsgis-prepare-workingcopy": |
|
251 |
// showPrepareWorkingcopyDialog(); |
|
252 |
// break; |
|
253 |
// case "tools-vcsgis-backup-history": |
|
254 |
// showBackupHistoryDialog(); |
|
255 |
// break; |
|
256 |
// case "tools-vcsgis-restore-history": |
|
257 |
// showRestoreHistoryDialog(); |
|
258 |
// break; |
|
259 |
// case "tools-vcsgis-registrationeditingstores": |
|
260 |
// showRegistrationOfEditingStoresDialog(); |
|
261 |
// break; |
|
262 |
// case "tools-vcsgis-repositoryentityfeaturetypeeditor": |
|
263 |
// showRepositoryEntityFeatureTypeEditorImplDialog(); |
|
264 |
// break; |
|
265 |
// case "tools-vcsgis-setworkingcopyoffline": |
|
266 |
// showSetWorkingCopyOfflineDialog(); |
|
267 |
} |
|
268 |
} |
|
269 |
|
|
270 |
@Override |
|
271 |
public boolean isEnabled() { |
|
272 |
return true; |
|
273 |
} |
|
274 |
|
|
275 |
@Override |
|
276 |
public boolean isEnabled(String action) { |
|
277 |
if (StringUtils.equals(action, "tools-online-simple-search")) { |
|
278 |
FeatureStore store = null; |
|
279 |
try { |
|
280 |
store = getActiveOnlineStore(); |
|
281 |
return store != null; |
|
282 |
} catch (Throwable th) { |
|
283 |
logger.warn("Can't check if is enabled online action '" + action + "'", th); |
|
284 |
return false; |
|
285 |
} finally { |
|
286 |
DisposeUtils.disposeQuietly(store); |
|
287 |
} |
|
288 |
} |
|
289 |
return isEnabled(); |
|
290 |
} |
|
291 |
|
|
292 |
public boolean canQueryByAction() { |
|
293 |
return true; |
|
294 |
} |
|
295 |
|
|
296 |
@Override |
|
297 |
public boolean isVisible() { |
|
298 |
return true; |
|
299 |
} |
|
300 |
|
|
301 |
// private void cleanHighligthed() { |
|
302 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
303 |
// swingManager.getDefaultServices().cleanHighligthed(); |
|
304 |
// } |
|
305 |
// |
|
306 |
|
|
307 |
// private void showAddToWorkspaceDialog() { |
|
308 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
309 |
// |
|
310 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
311 |
// "AddToWorkingCopy", |
|
312 |
// swingManager.createAddToWorkspacePanel(), |
|
313 |
// "_VCS_Add_to_workingcopy", |
|
314 |
// "_VCS_Add_to_workingcopy", |
|
315 |
// "_VCS_Add_to_workingcopy", |
|
316 |
// () -> { |
|
317 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
318 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
319 |
// OnlineJAddToWorkspace addToWorkspacePanel = (OnlineJAddToWorkspace) this.dialogsHelper.getDialog("AddToWorkingCopy").getPanel(); |
|
320 |
// int r = addToWorkspacePanel.add(); |
|
321 |
// if (r != 0) { |
|
322 |
// dialogsManager.messageDialog( |
|
323 |
// addToWorkspacePanel.getLastErrorMessage(), |
|
324 |
// i18n.getTranslation("_VCS_Add_to_workingcopy"), |
|
325 |
// JOptionPane.WARNING_MESSAGE |
|
326 |
// ); |
|
327 |
// } |
|
328 |
// } |
|
329 |
// ); |
|
330 |
// Dimension screensize = ApplicationLocator.getApplicationManager().getUIManager().getInternalSize(); |
|
331 |
// Dimension panelsize = dialog.getPanel().asJComponent().getPreferredSize(); |
|
332 |
// ToolsSwingUtils.ensureHeightWitdh( |
|
333 |
// dialog.getPanel().asJComponent(), |
|
334 |
// Math.max(3*(screensize.height/4), panelsize.height), |
|
335 |
// Math.max(2*(screensize.width/4), panelsize.width), |
|
336 |
// 7*(screensize.height/8), |
|
337 |
// 3*(screensize.width/4) |
|
338 |
// ); |
|
339 |
// dialog.show( |
|
340 |
// Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
341 |
// ); |
|
342 |
// } |
|
343 |
// |
|
344 |
// private void showImportHistoryDialog() { |
|
345 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
346 |
// |
|
347 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
348 |
// "ImportHistory", |
|
349 |
// swingManager.createImportHistoryPanel(), |
|
350 |
// "_VCS_Import_history", |
|
351 |
// "_VCS_Import_history", |
|
352 |
// "_VCS_Import_history", |
|
353 |
// () -> { |
|
354 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
355 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
356 |
// OnlineJImportHistory importHistoryPanel = (OnlineJImportHistory) this.dialogsHelper.getDialog("ImportHistory").getPanel(); |
|
357 |
// int r = importHistoryPanel.importHistory(); |
|
358 |
// if (r != 0) { |
|
359 |
//// FeatureStore featureStore = importHistoryPanel.getFeatureStore(); |
|
360 |
//// String targetName = importHistoryPanel.getTabletName(); |
|
361 |
// OnlineWorkspace workspace = importHistoryPanel.getWorkspace(); |
|
362 |
// String errmsg = workspace.getErrorMessage(r); |
|
363 |
// if( errmsg==null ) { |
|
364 |
// errmsg = ""; |
|
365 |
// } |
|
366 |
// dialogsManager.messageDialog( |
|
367 |
// i18n.getTranslation("_Cant_import_history") |
|
368 |
// + "\n" |
|
369 |
// + errmsg |
|
370 |
// + "\n" |
|
371 |
// + i18n.getTranslation("_see_error_log_for_more_information") |
|
372 |
// + "\n" |
|
373 |
// + "("+ Objects.toString(importHistoryPanel.getLastLogFile()) + ")" |
|
374 |
// , |
|
375 |
// i18n.getTranslation("_VCS_Import_history"), |
|
376 |
// JOptionPane.WARNING_MESSAGE |
|
377 |
// ); |
|
378 |
// } |
|
379 |
// } |
|
380 |
// ); |
|
381 |
// dialog.show( |
|
382 |
// Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
383 |
// ); |
|
384 |
// } |
|
385 |
|
|
386 |
private void showInitWorkspaceDialog() { |
|
387 |
OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
388 |
|
|
389 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
390 |
OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog("InitializeWorkingCopy", |
|
391 |
swingManager.createInitWorkspacePanel(), |
|
392 |
i18n.getTranslation("_Online_Initialize_workingcopy"), |
|
393 |
i18n.getTranslation("_Initialize_workingcopy"), |
|
394 |
i18n.getTranslation("_Initialize_workingcopy"), |
|
395 |
() -> { |
|
396 |
ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
397 |
OnlineJInitWorkingcopy panelInitWorkspace = (OnlineJInitWorkingcopy) this.dialogsHelper.getDialog("InitializeWorkingCopy").getPanel(); |
|
398 |
int r = panelInitWorkspace.actionPerformed(); |
|
399 |
if (r != 0) { |
|
400 |
dialogsManager.messageDialog( |
|
401 |
i18n.getTranslation( |
|
402 |
"_Cant_initialize_workingcopy_{0}", |
|
403 |
new String[]{panelInitWorkspace.getWorkspaceName()} |
|
404 |
), |
|
405 |
i18n.getTranslation("_Online_Initialize_workingcopy"), |
|
406 |
JOptionPane.WARNING_MESSAGE |
|
407 |
); |
|
408 |
} |
|
409 |
} |
|
410 |
); |
|
411 |
dialog.setAutoclose(true); |
|
412 |
dialog.show( |
|
413 |
Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
414 |
); |
|
415 |
} |
|
416 |
|
|
417 |
// private void showInitializaRepositoryDialog() { |
|
418 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
419 |
// |
|
420 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
421 |
// "InitializeRepository", |
|
422 |
// swingManager.createInitRepositoryPanel(), |
|
423 |
// "_VCS_Initialize_repository", |
|
424 |
// "_VCS_Initialize_repository", |
|
425 |
// "_VCS_Initialize_repository", |
|
426 |
// () -> { |
|
427 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
428 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
429 |
// OnlineJInitServer panel = (OnlineJInitServer) this.dialogsHelper.getDialog("InitializeRepository").getPanel(); |
|
430 |
// int r = panel.initialize(); |
|
431 |
// if (r != 0) { |
|
432 |
// dialogsManager.messageDialog( |
|
433 |
// i18n.getTranslation( |
|
434 |
// "_Cant_initialize_server_{0}", |
|
435 |
// new String[]{panel.getConnectionLabel()} |
|
436 |
// ), |
|
437 |
// i18n.getTranslation("_VCS_Initialize_repository"), |
|
438 |
// JOptionPane.WARNING_MESSAGE |
|
439 |
// ); |
|
440 |
// } |
|
441 |
// } |
|
442 |
// ); |
|
443 |
// dialog.setAutoclose(true); |
|
444 |
// dialog.show( |
|
445 |
// Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
446 |
// ); |
|
447 |
// } |
|
448 |
|
|
449 |
private void showDownloadDialog(OnlineWorkingcopy workspace, List<String> tableNames,Boolean overwrite) { |
|
450 |
OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
451 |
|
|
452 |
OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
453 |
"Download", |
|
454 |
swingManager.createDownloadPanel(workspace,tableNames, overwrite), |
|
455 |
"_Online_Download", |
|
456 |
"_Download", |
|
457 |
"_Download", |
|
458 |
() -> { |
|
459 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
460 |
ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
461 |
OnlineJDownload downloadPanel = (OnlineJDownload) this.dialogsHelper.getDialog("Download").getPanel(); |
|
462 |
int r = downloadPanel.actionPerformed(); |
|
463 |
if (r != 0) { |
|
464 |
List<String> layerNames = downloadPanel.getSelectedLayers(); |
|
465 |
dialogsManager.messageDialog( |
|
466 |
i18n.getTranslation( |
|
467 |
"_Failed_download_of_{0}", |
|
468 |
new String[]{ StringUtils.join(layerNames, " ") } |
|
469 |
), |
|
470 |
i18n.getTranslation("_Online_Download"), |
|
471 |
JOptionPane.WARNING_MESSAGE |
|
472 |
); |
|
473 |
} |
|
474 |
} |
|
475 |
); |
|
476 |
Dimension screensize = ApplicationLocator.getApplicationManager().getUIManager().getInternalSize(); |
|
477 |
Dimension panelsize = dialog.getPanel().asJComponent().getPreferredSize(); |
|
478 |
ToolsSwingUtils.ensureHeightWitdh( |
|
479 |
dialog.getPanel().asJComponent(), |
|
480 |
Math.max(3*(screensize.height/4), panelsize.height), |
|
481 |
Math.max(2*(screensize.width/4), panelsize.width), |
|
482 |
7*(screensize.height/8), |
|
483 |
3*(screensize.width/4) |
|
484 |
); |
|
485 |
dialog.show( |
|
486 |
Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
487 |
); |
|
488 |
} |
|
489 |
|
|
490 |
// private void showExportDialog() { |
|
491 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
492 |
// |
|
493 |
// final OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
494 |
// "Export", |
|
495 |
// swingManager.createExportPanel(), |
|
496 |
// "_VCS_Export", |
|
497 |
// "_Export_to_a_local_table_a_table_of_the_repository", |
|
498 |
// "_VCS_Export", |
|
499 |
// () -> { |
|
500 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
501 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
502 |
// OnlineJExport exportPanel = (OnlineJExport) this.dialogsHelper.getDialog("Export").getPanel(); |
|
503 |
// int r = exportPanel.export(); |
|
504 |
// if (r != 0) { |
|
505 |
// OnlineEntity entity = exportPanel.getTable(); |
|
506 |
// dialogsManager.messageDialog( |
|
507 |
// i18n.getTranslation( |
|
508 |
// "_Failed_export_of_{0}", |
|
509 |
// new String[]{entity.toString()} |
|
510 |
// ), |
|
511 |
// i18n.getTranslation("_Online_Export"), |
|
512 |
// JOptionPane.WARNING_MESSAGE |
|
513 |
// ); |
|
514 |
// } |
|
515 |
// } |
|
516 |
// ); |
|
517 |
// dialog.show(); |
|
518 |
// } |
|
519 |
|
|
520 |
private void showChangesDialog(OnlineWorkingcopy workspace, List<String> tableNames, Timestamp efectivedate, String comment) { |
|
521 |
OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
522 |
|
|
523 |
final OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
524 |
"Changes", |
|
525 |
swingManager.createChangesPanel(workspace,tableNames, efectivedate, comment), |
|
526 |
"_Online_Changes" |
|
527 |
); |
|
528 |
Dimension screensize = ApplicationLocator.getApplicationManager().getUIManager().getInternalSize(); |
|
529 |
Dimension panelsize = dialog.getPanel().asJComponent().getPreferredSize(); |
|
530 |
ToolsSwingUtils.ensureHeightWitdh( |
|
531 |
dialog.getPanel().asJComponent(), |
|
532 |
Math.max(3*(screensize.height/4), panelsize.height), |
|
533 |
Math.max(2*(screensize.width/4), panelsize.width), |
|
534 |
7*(screensize.height/8), |
|
535 |
3*(screensize.width/4) |
|
536 |
); |
|
537 |
dialog.show( |
|
538 |
Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
539 |
); |
|
540 |
} |
|
541 |
|
|
542 |
// private void showHistory() { |
|
543 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
544 |
// |
|
545 |
// final OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
546 |
// "Revisions", |
|
547 |
// swingManager.createRevisionsPanel(), |
|
548 |
// "_VCS_Revisions" |
|
549 |
// ); |
|
550 |
// dialog.show(); |
|
551 |
// } |
|
552 |
// |
|
553 |
// private void showRegistrationWorkspaceDialog() { |
|
554 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
555 |
// |
|
556 |
// final OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
557 |
// "RegisterWorkingCopies", |
|
558 |
// swingManager.createRegisterWorkspacePanel(), |
|
559 |
// "_VCS_Registration_workingcopies" |
|
560 |
// ); |
|
561 |
// dialog.show(); |
|
562 |
// } |
|
563 |
// |
|
564 |
// |
|
565 |
// private void showRegistrationOfEditingStoresDialog() { |
|
566 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
567 |
// |
|
568 |
// final OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
569 |
// "RegistrationOfEditingStores", |
|
570 |
// swingManager.createRegistrationOfEditingStoresPanel(), |
|
571 |
// "_VCS_Registration_of_editing_stores" |
|
572 |
// ); |
|
573 |
// dialog.show(); |
|
574 |
// } |
|
575 |
// |
|
576 |
// private void showServerEntitiesDialog() { |
|
577 |
// I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
578 |
// WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
579 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
580 |
// |
|
581 |
// final OnlineJShowServerTableForm panel = swingManager.createShowTableServerFormPanel("VCSGIS_ENTITIES"); |
|
582 |
// winManager.showWindow( |
|
583 |
// panel.asJComponent(), |
|
584 |
// i18nManager.getTranslation("_VCS_Server_entities"), |
|
585 |
// WindowManager.MODE.WINDOW |
|
586 |
// ); |
|
587 |
// } |
|
588 |
// |
|
589 |
// private void showServerHooksDialog() { |
|
590 |
// I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
591 |
// WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
592 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
593 |
// |
|
594 |
// final OnlineJShowServerTableForm panel = swingManager.createShowTableServerFormPanel("VCSGIS_HOOKS"); |
|
595 |
// winManager.showWindow( |
|
596 |
// panel.asJComponent(), |
|
597 |
// i18nManager.getTranslation("_VCS_Server_hooks"), |
|
598 |
// WindowManager.MODE.WINDOW |
|
599 |
// ); |
|
600 |
// } |
|
601 |
// |
|
602 |
// private void showCreateResourceTableDialog() { |
|
603 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
604 |
// |
|
605 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
606 |
// "CreateResourceTable", |
|
607 |
// swingManager.createResourceTablePanel(), |
|
608 |
// "_VCS_Create_resource_table", |
|
609 |
// "_Create_resource_table_parameters", |
|
610 |
// "_VCS_Create_resource_table", |
|
611 |
// () -> { |
|
612 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
613 |
// OnlineJCreateResourceTable panel = (OnlineJCreateResourceTable) this.dialogsHelper.getDialog("CreateResourceTable").getPanel(); |
|
614 |
// panel.createResourceTable(); |
|
615 |
// } |
|
616 |
// ); |
|
617 |
// dialog.setAutoclose(true); |
|
618 |
// dialog.show(); |
|
619 |
// } |
|
620 |
// |
|
621 |
// private void showLogoutDialog() { |
|
622 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
623 |
// |
|
624 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
625 |
// "Logout", |
|
626 |
// swingManager.createLogoutPanel(), |
|
627 |
// "_VCS_Logout", |
|
628 |
// "_Logout_the_current_user_from_a_Online_working_copy", |
|
629 |
// "_VCS_Logout", |
|
630 |
// () -> { |
|
631 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
632 |
// OnlineJLogout panel = (OnlineJLogout) this.dialogsHelper.getDialog("Logout").getPanel(); |
|
633 |
// panel.logout(); |
|
634 |
// } |
|
635 |
// ); |
|
636 |
// dialog.setAutoclose(true); |
|
637 |
// dialog.show(); |
|
638 |
// } |
|
639 |
// |
|
640 |
// private void showCheckoutDataModelDialog(OnlineWorkspace workspace, String model) { |
|
641 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
642 |
// |
|
643 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
644 |
// "ConnectDataModel", |
|
645 |
// swingManager.createCheckoutDataModelPanel(workspace, model), |
|
646 |
// "_VCS_Connect_to_datamodel", |
|
647 |
// "_VCS_Connect_to_datamodel", |
|
648 |
// "_VCS_Connect_to_datamodel", |
|
649 |
// () -> { |
|
650 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
651 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
652 |
// OnlineJCheckoutDataModel checkoutDataModelPanel = (OnlineJCheckoutDataModel) this.dialogsHelper.getDialog("ConnectDataModel").getPanel(); |
|
653 |
// int r = checkoutDataModelPanel.connectToModel(); |
|
654 |
// if ( !(r == ERR_OK || r==ERR_USER_CANCELLED) ) { |
|
655 |
// String dataModel = checkoutDataModelPanel.getDataModel(); |
|
656 |
// dialogsManager.messageDialog( |
|
657 |
// i18n.getTranslation( |
|
658 |
// "_Failed_connect_to_{0}", |
|
659 |
// new String[]{dataModel} |
|
660 |
// ), |
|
661 |
// i18n.getTranslation("_VCS_Connect_to_datamodel"), |
|
662 |
// JOptionPane.WARNING_MESSAGE |
|
663 |
// ); |
|
664 |
// } |
|
665 |
// } |
|
666 |
// ); |
|
667 |
// dialog.show( |
|
668 |
// Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
669 |
// ); |
|
670 |
// } |
|
671 |
// |
|
672 |
// private void showDownloadWorkingcopyDialog() { |
|
673 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
674 |
// |
|
675 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog("DownloadWorkingcopy", |
|
676 |
// swingManager.createDownloadWorkingcopyPanel(), |
|
677 |
// "_VCS_Download_workingcopy", |
|
678 |
// "_VCS_Download_workingcopy", |
|
679 |
// "_VCS_Download_workingcopy", |
|
680 |
// () -> { |
|
681 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
682 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
683 |
// OnlineJDownloadWorkingcopy downloadWorkingcopyPanel = (OnlineJDownloadWorkingcopy) this.dialogsHelper.getDialog("DownloadWorkingcopy").getPanel(); |
|
684 |
// int r = downloadWorkingcopyPanel.download(false); |
|
685 |
// if (r != 0) { |
|
686 |
// dialogsManager.messageDialog( |
|
687 |
// i18n.getTranslation( |
|
688 |
// "_Failed_dowloading_working_copy" |
|
689 |
// ), |
|
690 |
// i18n.getTranslation("_VCS_Download_working_copy"), |
|
691 |
// JOptionPane.WARNING_MESSAGE |
|
692 |
// ); |
|
693 |
// } |
|
694 |
// } |
|
695 |
// ); |
|
696 |
// dialog.show( |
|
697 |
// Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
698 |
// ); |
|
699 |
// } |
|
700 |
// |
|
701 |
// private void showPrepareWorkingcopyDialog() { |
|
702 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
703 |
// |
|
704 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog("PrepareWorkingcopy", |
|
705 |
// swingManager.createPrepareWorkingcopyPanel(), |
|
706 |
// "_VCS_Prepare_workingcopy", |
|
707 |
// "_VCS_Prepare_workingcopy", |
|
708 |
// "_VCS_Prepare_workingcopy", |
|
709 |
// () -> { |
|
710 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
711 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
712 |
// OnlineJPrepareWorkingcopy prepareWorkingcopyPanel = (OnlineJPrepareWorkingcopy) this.dialogsHelper.getDialog("PrepareWorkingcopy").getPanel(); |
|
713 |
// int r = prepareWorkingcopyPanel.prepare(); |
|
714 |
// if (r != 0) { |
|
715 |
// dialogsManager.messageDialog( |
|
716 |
// i18n.getTranslation( |
|
717 |
// "_Failed_prepare_working_copy" |
|
718 |
// ), |
|
719 |
// i18n.getTranslation("_VCS_Prepare_working_copy"), |
|
720 |
// JOptionPane.WARNING_MESSAGE |
|
721 |
// ); |
|
722 |
// } |
|
723 |
// } |
|
724 |
// ); |
|
725 |
// dialog.setAutoclose(true); |
|
726 |
// dialog.show( |
|
727 |
// Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
728 |
// ); |
|
729 |
// } |
|
730 |
// |
|
731 |
// private void showBackupHistoryDialog() { |
|
732 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
733 |
// |
|
734 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog("BackupHistory", |
|
735 |
// swingManager.createBackupHistoryPanel(), |
|
736 |
// "_VCS_Backup_history", |
|
737 |
// "_VCS_Backup_history", |
|
738 |
// "_VCS_Backup_history", |
|
739 |
// () -> { |
|
740 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
741 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
742 |
// OnlineJBackupHistory backupHistoryPanel = (OnlineJBackupHistory) this.dialogsHelper.getDialog("BackupHistory").getPanel(); |
|
743 |
// int r = backupHistoryPanel.backupHistory(); |
|
744 |
// if (r != 0) { |
|
745 |
// dialogsManager.messageDialog( |
|
746 |
// i18n.getTranslation( |
|
747 |
// "_Failed_doing_backup_history" |
|
748 |
// ), |
|
749 |
// i18n.getTranslation("_VCS_Backup_history"), |
|
750 |
// JOptionPane.WARNING_MESSAGE |
|
751 |
// ); |
|
752 |
// } |
|
753 |
// } |
|
754 |
// ); |
|
755 |
// dialog.show(); |
|
756 |
// } |
|
757 |
// |
|
758 |
// private void showRestoreHistoryDialog() { |
|
759 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
760 |
// |
|
761 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog("RestoreHistory", |
|
762 |
// swingManager.createRestoreHistoryPanel(), |
|
763 |
// "_VCS_Restore_history", |
|
764 |
// "_VCS_Restore_history", |
|
765 |
// "_VCS_Restore_history", |
|
766 |
// () -> { |
|
767 |
// I18nManager i18n = ToolsLocator.getI18nManager(); |
|
768 |
// ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
769 |
// OnlineJRestoreHistory restoreHistoryPanel = (OnlineJRestoreHistory) this.dialogsHelper.getDialog("RestoreHistory").getPanel(); |
|
770 |
// int r = restoreHistoryPanel.restoreHistory(); |
|
771 |
// if (r != 0) { |
|
772 |
// dialogsManager.messageDialog( |
|
773 |
// i18n.getTranslation( |
|
774 |
// "_Failed_restoring_history" |
|
775 |
// ), |
|
776 |
// i18n.getTranslation("_VCS_Restore_history"), |
|
777 |
// JOptionPane.WARNING_MESSAGE |
|
778 |
// ); |
|
779 |
// } |
|
780 |
// } |
|
781 |
// ); |
|
782 |
// dialog.show( |
|
783 |
// Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
784 |
// ); |
|
785 |
// } |
|
786 |
// |
|
787 |
// private void showRepositoryEntityFeatureTypeEditorImplDialog() { |
|
788 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
789 |
// |
|
790 |
// final OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
791 |
// "RepositoryEntityFeatureTypeEditor", |
|
792 |
// swingManager.createRepositoryEntityFeatureTypeEditor(), |
|
793 |
// "_VCS_Repository_entity_feature_type_editor" |
|
794 |
// ); |
|
795 |
// dialog.show(); |
|
796 |
// } |
|
797 |
// |
|
798 |
// private void showSetWorkingCopyOfflineDialog() { |
|
799 |
// OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
800 |
// |
|
801 |
// OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
802 |
// "SetWorkingCopyOffline", |
|
803 |
// swingManager.createSetWorkingCopyOfflinePanel(), |
|
804 |
// "_VCS_Set_Working_copy_offline", |
|
805 |
// "_VCS_Set_Working_copy_offline", |
|
806 |
// "_VCS_Set_Working_copy_offline", |
|
807 |
// () -> { |
|
808 |
// OnlineJSetWorkingCopyOffline setWorkingCopyOffline = (OnlineJSetWorkingCopyOffline) this.dialogsHelper.getDialog("SetWorkingCopyOffline").getPanel(); |
|
809 |
// setWorkingCopyOffline.setOffline(); |
|
810 |
// } |
|
811 |
// ); |
|
812 |
// dialog.show( |
|
813 |
// Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
814 |
// ); |
|
815 |
// } |
|
816 |
|
|
817 |
@Override |
|
818 |
public IPreference[] getPreferencesPages() { |
|
819 |
List<IPreference> prefs = new ArrayList<>(); |
|
820 |
prefs.add(new OnlinePage()); |
|
821 |
|
|
822 |
return prefs.toArray(new IPreference[prefs.size()]); |
|
823 |
} |
|
824 |
|
|
825 |
private FeatureStore getActiveOnlineStore() { |
|
826 |
ViewDocument view = (ViewDocument) ApplicationLocator.getManager().getActiveDocument(ViewManager.TYPENAME); |
|
827 |
if (view == null) { |
|
828 |
return null; |
|
829 |
} |
|
830 |
FLayers layers = view.getMapContext().getLayers(); |
|
831 |
if (CollectionUtils.isEmpty(layers)) { |
|
832 |
return null; |
|
833 |
} |
|
834 |
FLayer[] activeLayers = layers.getActives(); |
|
835 |
if (activeLayers == null || activeLayers.length != 1) { |
|
836 |
return null; |
|
837 |
} |
|
838 |
OnlineManager onlineManager = OnlineLocator.getOnlineManager(); |
|
839 |
FLayer activeLayer = activeLayers[0]; |
|
840 |
if (activeLayer instanceof VectorLayer) { |
|
841 |
FeatureStore store = ((VectorLayer) activeLayer).getFeatureStore(); |
|
842 |
if (store == null) { |
|
843 |
return null; |
|
844 |
} |
|
845 |
OnlineWorkingcopy wc = null; |
|
846 |
try { |
|
847 |
wc = onlineManager.getWorkingcopy(store); |
|
848 |
if (wc != null) { |
|
849 |
DisposeUtils.bind(store); |
|
850 |
return store; |
|
851 |
} |
|
852 |
} finally { |
|
853 |
DisposeUtils.dispose(wc); |
|
854 |
} |
|
855 |
} |
|
856 |
return null; |
|
857 |
} |
|
858 |
|
|
859 |
private void showSimpleSearchDialog(FeatureStore store, Arguments arguments) { |
|
860 |
OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
861 |
|
|
862 |
final OnlineDialogInfo dialog = this.dialogsHelper.getOrCreateDialog( |
|
863 |
"_Simple_search", |
|
864 |
swingManager.createSimpleSearchPanel(store, arguments), |
|
865 |
"_Online_Simple_search" |
|
866 |
); |
|
867 |
Dimension screensize = ApplicationLocator.getApplicationManager().getUIManager().getInternalSize(); |
|
868 |
Dimension panelsize = dialog.getPanel().asJComponent().getPreferredSize(); |
|
869 |
ToolsSwingUtils.ensureHeightWitdh( |
|
870 |
dialog.getPanel().asJComponent(), |
|
871 |
Math.max(3*(screensize.height/4), panelsize.height), |
|
872 |
Math.max(2*(screensize.width/4), panelsize.width), |
|
873 |
7*(screensize.height/8), |
|
874 |
3*(screensize.width/4) |
|
875 |
); |
|
876 |
dialog.show( |
|
877 |
Collections.singletonMap("align", GridBagConstraints.CENTER) |
|
878 |
); |
|
879 |
} |
|
880 |
|
|
881 |
} |
org.gvsig.online/tags/org.gvsig.online-1.0.1/org.gvsig.online.app/org.gvsig.online.app.mainplugin/src/main/java/org/gvsig/online/app/mainplugin/preferencespages/OnlinePageView.java | ||
---|---|---|
1 |
package org.gvsig.online.app.mainplugin.preferencespages; |
|
2 |
|
|
3 |
import com.jeta.open.i18n.I18NUtils; |
|
4 |
import com.jgoodies.forms.layout.CellConstraints; |
|
5 |
import com.jgoodies.forms.layout.FormLayout; |
|
6 |
import java.awt.BorderLayout; |
|
7 |
import java.awt.ComponentOrientation; |
|
8 |
import java.awt.Container; |
|
9 |
import java.awt.Dimension; |
|
10 |
import javax.swing.Box; |
|
11 |
import javax.swing.ImageIcon; |
|
12 |
import javax.swing.JComboBox; |
|
13 |
import javax.swing.JFrame; |
|
14 |
import javax.swing.JLabel; |
|
15 |
import javax.swing.JPanel; |
|
16 |
import javax.swing.JTabbedPane; |
|
17 |
import org.gvsig.andami.preferences.AbstractPreferencePage; |
|
18 |
|
|
19 |
|
|
20 |
public abstract class OnlinePageView extends AbstractPreferencePage |
|
21 |
{ |
|
22 |
JTabbedPane tabPreferences = new JTabbedPane(); |
|
23 |
JPanel tabPreferences1 = new JPanel(); |
|
24 |
JLabel lblRemoteEntityFeatureTypeEditorMode = new JLabel(); |
|
25 |
JComboBox cboRemoteEntityFeatureTypeEditorMode = new JComboBox(); |
|
26 |
JPanel gridWorkspaces = new JPanel(); |
|
27 |
|
|
28 |
/** |
|
29 |
* Default constructor |
|
30 |
*/ |
|
31 |
public OnlinePageView() |
|
32 |
{ |
|
33 |
initializePanel(); |
|
34 |
} |
|
35 |
|
|
36 |
/** |
|
37 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
38 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
39 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
40 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
41 |
*/ |
|
42 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
43 |
{ |
|
44 |
Dimension filler = new Dimension(10,10); |
|
45 |
|
|
46 |
boolean filled_cell_11 = false; |
|
47 |
CellConstraints cc = new CellConstraints(); |
|
48 |
if ( cols.length > 0 && rows.length > 0 ) |
|
49 |
{ |
|
50 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
51 |
{ |
|
52 |
/** add a rigid area */ |
|
53 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
54 |
filled_cell_11 = true; |
|
55 |
} |
|
56 |
} |
|
57 |
|
|
58 |
for( int index = 0; index < cols.length; index++ ) |
|
59 |
{ |
|
60 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
61 |
{ |
|
62 |
continue; |
|
63 |
} |
|
64 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
65 |
} |
|
66 |
|
|
67 |
for( int index = 0; index < rows.length; index++ ) |
|
68 |
{ |
|
69 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
70 |
{ |
|
71 |
continue; |
|
72 |
} |
|
73 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
74 |
} |
|
75 |
|
|
76 |
} |
|
77 |
|
|
78 |
/** |
|
79 |
* Helper method to load an image file from the CLASSPATH |
|
80 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
81 |
* @return an ImageIcon instance with the specified image file |
|
82 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
83 |
*/ |
|
84 |
public ImageIcon loadImage( String imageName ) |
|
85 |
{ |
|
86 |
try |
|
87 |
{ |
|
88 |
ClassLoader classloader = getClass().getClassLoader(); |
|
89 |
java.net.URL url = classloader.getResource( imageName ); |
|
90 |
if ( url != null ) |
|
91 |
{ |
|
92 |
ImageIcon icon = new ImageIcon( url ); |
|
93 |
return icon; |
|
94 |
} |
|
95 |
} |
|
96 |
catch( Exception e ) |
|
97 |
{ |
|
98 |
e.printStackTrace(); |
|
99 |
} |
|
100 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
101 |
} |
|
102 |
|
|
103 |
/** |
|
104 |
* Method for recalculating the component orientation for |
|
105 |
* right-to-left Locales. |
|
106 |
* @param orientation the component orientation to be applied |
|
107 |
*/ |
|
108 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
109 |
{ |
|
110 |
// Not yet implemented... |
|
111 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
112 |
super.applyComponentOrientation(orientation); |
|
113 |
} |
|
114 |
|
|
115 |
public JPanel createPanel() |
|
116 |
{ |
|
117 |
JPanel jpanel1 = new JPanel(); |
|
118 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
|
119 |
CellConstraints cc = new CellConstraints(); |
|
120 |
jpanel1.setLayout(formlayout1); |
|
121 |
|
|
122 |
tabPreferences.setName("tabPreferences"); |
|
123 |
tabPreferences.addTab("_General",null,createtabPreferences()); |
|
124 |
tabPreferences.addTab("_Working_copies",null,createPanel1()); |
|
125 |
jpanel1.add(tabPreferences,cc.xy(2,2)); |
|
126 |
|
|
127 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 }); |
|
128 |
return jpanel1; |
|
129 |
} |
|
130 |
|
|
131 |
public JPanel createtabPreferences() |
|
132 |
{ |
|
133 |
tabPreferences1.setName("tabPreferences"); |
|
134 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
|
135 |
CellConstraints cc = new CellConstraints(); |
|
136 |
tabPreferences1.setLayout(formlayout1); |
|
137 |
|
|
138 |
lblRemoteEntityFeatureTypeEditorMode.setName("lblRemoteEntityFeatureTypeEditorMode"); |
|
139 |
lblRemoteEntityFeatureTypeEditorMode.setText("_Online_Remote_entity_feature_type_editor_mode"); |
|
140 |
tabPreferences1.add(lblRemoteEntityFeatureTypeEditorMode,cc.xy(2,2)); |
|
141 |
|
|
142 |
cboRemoteEntityFeatureTypeEditorMode.setName("cboRemoteEntityFeatureTypeEditorMode"); |
|
143 |
tabPreferences1.add(cboRemoteEntityFeatureTypeEditorMode,cc.xy(2,4)); |
|
144 |
|
|
145 |
addFillComponents(tabPreferences1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5 }); |
|
146 |
return tabPreferences1; |
|
147 |
} |
|
148 |
|
|
149 |
public JPanel createPanel1() |
|
150 |
{ |
|
151 |
JPanel jpanel1 = new JPanel(); |
|
152 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
|
153 |
CellConstraints cc = new CellConstraints(); |
|
154 |
jpanel1.setLayout(formlayout1); |
|
155 |
|
|
156 |
jpanel1.add(creategridWorkspaces(),cc.xy(2,2)); |
|
157 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 }); |
|
158 |
return jpanel1; |
|
159 |
} |
|
160 |
|
|
161 |
public JPanel creategridWorkspaces() |
|
162 |
{ |
|
163 |
gridWorkspaces.setName("gridWorkspaces"); |
|
164 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)"); |
|
165 |
CellConstraints cc = new CellConstraints(); |
|
166 |
gridWorkspaces.setLayout(formlayout1); |
|
167 |
|
|
168 |
addFillComponents(gridWorkspaces,new int[]{ 1 },new int[]{ 1 }); |
|
169 |
return gridWorkspaces; |
|
170 |
} |
|
171 |
|
|
172 |
/** |
|
173 |
* Initializer |
|
174 |
*/ |
|
175 |
protected void initializePanel() |
|
176 |
{ |
|
177 |
setLayout(new BorderLayout()); |
|
178 |
add(createPanel(), BorderLayout.CENTER); |
|
179 |
} |
|
180 |
|
|
181 |
|
|
182 |
} |
org.gvsig.online/tags/org.gvsig.online-1.0.1/org.gvsig.online.app/org.gvsig.online.app.mainplugin/src/main/java/org/gvsig/online/app/mainplugin/preferencespages/OnlinePage.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.online.app.mainplugin.preferencespages; |
|
7 |
|
|
8 |
import com.jgoodies.forms.layout.CellConstraints; |
|
9 |
import javax.swing.DefaultComboBoxModel; |
|
10 |
import javax.swing.ImageIcon; |
|
11 |
import javax.swing.JPanel; |
|
12 |
import org.gvsig.andami.IconThemeHelper; |
|
13 |
import org.gvsig.andami.preferences.IPreference; |
|
14 |
import org.gvsig.andami.preferences.StoreException; |
|
15 |
import org.gvsig.fmap.dal.swing.featuretype.FeatureTypePanel; |
|
16 |
import org.gvsig.online.lib.api.OnlineLocator; |
|
17 |
import org.gvsig.online.lib.api.OnlineManager; |
|
18 |
import org.gvsig.online.swing.api.OnlineJRegisterWorkspace; |
|
19 |
import org.gvsig.online.swing.api.OnlineSwingLocator; |
|
20 |
import org.gvsig.online.swing.api.OnlineSwingManager; |
|
21 |
import org.gvsig.tools.ToolsLocator; |
|
22 |
import org.gvsig.tools.i18n.I18nManager; |
|
23 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
24 |
import org.gvsig.tools.swing.api.ToolsSwingManager; |
|
25 |
import org.gvsig.tools.util.LabeledValue; |
|
26 |
import org.gvsig.tools.util.LabeledValueImpl; |
|
27 |
//import org.gvsig.vcsgis.swing.OnlineJRegisterWorkspace; |
|
28 |
//import org.gvsig.vcsgis.swing.OnlineSwingLocator; |
|
29 |
//import org.gvsig.vcsgis.swing.OnlineSwingManager; |
|
30 |
|
|
31 |
/** |
|
32 |
* |
|
33 |
* @author jjdelcerro |
|
34 |
*/ |
|
35 |
public class OnlinePage extends OnlinePageView implements IPreference { |
|
36 |
// |
|
37 |
// The class OnlinePage can extend from AbstractPreferencePage, not JPanel, |
|
38 |
// if recreate it from the GUI builder change te class declaration to: |
|
39 |
// public abstract class OnlinePageView extends AbstractPreferencePage |
|
40 |
|
|
41 |
private ImageIcon icon; |
|
42 |
public static String id = OnlinePage.class.getName(); |
|
43 |
|
|
44 |
public OnlinePage() { |
|
45 |
setParentID("org.gvsig.coreplugin.preferences.general.GeneralPage"); |
|
46 |
icon = IconThemeHelper.getImageIcon("vcsgis-preferences"); |
|
47 |
initComponents(); |
|
48 |
} |
|
49 |
|
|
50 |
private void initComponents() { |
|
51 |
OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
52 |
|
|
53 |
this.translateAll(); |
|
54 |
|
|
55 |
OnlineJRegisterWorkspace workspacesPanel = swingManager.createRegisterWorkspacePanel(); |
|
56 |
CellConstraints cc = new CellConstraints(); |
|
57 |
this.gridWorkspaces.add(workspacesPanel.asJComponent(),cc.xy(1,1)); |
|
58 |
DefaultComboBoxModel<LabeledValue<Integer>> model = new DefaultComboBoxModel(); |
|
59 |
model.addElement(new LabeledValueImpl<>("Edit only metadata", FeatureTypePanel.MODE_EDIT_ONLY_METADATA)); |
|
60 |
model.addElement(new LabeledValueImpl<>("Edit all", FeatureTypePanel.MODE_EDIT_ALL)); |
|
61 |
model.addElement(new LabeledValueImpl<>("Show only", FeatureTypePanel.MODE_SHOW_ONLY)); |
|
62 |
|
|
63 |
this.cboRemoteEntityFeatureTypeEditorMode.setModel(model); |
|
64 |
|
|
65 |
} |
|
66 |
|
|
67 |
private void translateAll() { |
|
68 |
ToolsSwingManager manager = ToolsSwingLocator.getToolsSwingManager(); |
|
69 |
|
|
70 |
manager.translate(tabPreferences); |
|
71 |
manager.translate(lblRemoteEntityFeatureTypeEditorMode); |
|
72 |
} |
|
73 |
|
|
74 |
@Override |
|
75 |
public void storeValues() throws StoreException { |
|
76 |
OnlineManager manager = OnlineLocator.getOnlineManager(); |
|
77 |
LabeledValue<Integer> selectedMode = (LabeledValue<Integer>)this.cboRemoteEntityFeatureTypeEditorMode.getSelectedItem(); |
|
78 |
if(selectedMode != null){ |
|
79 |
manager.setRemoteEntityFeatureTypeEditorMode(selectedMode.getValue()); |
|
80 |
} |
|
81 |
} |
|
82 |
|
|
83 |
@Override |
|
84 |
public void setChangesApplied() { |
|
85 |
} |
|
86 |
|
|
87 |
@Override |
|
88 |
public String getID() { |
|
89 |
return id; |
|
90 |
} |
|
91 |
|
|
92 |
@Override |
|
93 |
public String getTitle() { |
|
94 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
95 |
return i18nManager.getTranslation("_Online"); |
|
96 |
} |
|
97 |
|
|
98 |
@Override |
|
99 |
public JPanel getPanel() { |
|
100 |
return this; |
|
101 |
} |
|
102 |
|
|
103 |
@Override |
|
104 |
public void initializeValues() { |
|
105 |
OnlineSwingManager swingManager = OnlineSwingLocator.getOnlineSwingManager(); |
|
106 |
// this.chkEmptyEffectiveDateAllowedInCommitPanel.setSelected(swingManager.getEmptyEffectiveDateAllowed()); |
|
107 |
// this.chkCurrentDateAsEffectiveDateByDefaultInCommitPanel.setSelected(swingManager.getCurrentDateAsEffectiveDateByDefault()); |
|
108 |
// ListElement.setSelected(cboRepositoryEntityFeatureTypeEditorMode, swingManager.getRepositoryEntityFeatureTypeEditorMode()); |
|
109 |
} |
|
110 |
|
|
111 |
@Override |
|
112 |
public void initializeDefaults() { |
|
113 |
} |
|
114 |
|
|
115 |
@Override |
|
116 |
public ImageIcon getIcon() { |
|
117 |
return this.icon; |
|
118 |
} |
|
119 |
|
|
120 |
@Override |
|
121 |
public boolean isValueChanged() { |
|
122 |
return true; |
|
123 |
} |
|
124 |
|
|
125 |
@Override |
|
126 |
public boolean isResizeable() { |
|
127 |
return true; |
|
128 |
} |
|
129 |
} |
org.gvsig.online/tags/org.gvsig.online-1.0.1/org.gvsig.online.app/org.gvsig.online.app.mainplugin/src/main/java/org/gvsig/online/app/mainplugin/preferencespages/OnlinePageView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/fdiaz/projects/gvSIG/org.gvsig.online/org.gvsig.online.app/org.gvsig.online.app.mainplugin/src/main/java/org/gvsig/online/app/mainplugin/preferencespages/OnlinePageView.xml</at> |
|
28 |
<at name="path">org.gvsig.online/org.gvsig.online.app/org.gvsig.online.app.mainplugin/src/main/java/org/gvsig/online/app/mainplugin/preferencespages/OnlinePageView.xml</at> |
|
29 |
<at name="rowspecs">CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE</at> |
|
30 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
|
31 |
<at name="components"> |
|
32 |
<object classname="java.util.LinkedList"> |
|
33 |
<item > |
|
34 |
<at name="value"> |
|
35 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
36 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
37 |
<at name="cellconstraints"> |
|
38 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
39 |
<at name="column">2</at> |
|
40 |
<at name="row">2</at> |
|
41 |
<at name="colspan">1</at> |
|
42 |
<at name="rowspan">1</at> |
|
43 |
<at name="halign">default</at> |
|
44 |
<at name="valign">default</at> |
|
45 |
<at name="insets" object="insets">0,0,0,0</at> |
|
46 |
</object> |
|
47 |
</at> |
|
48 |
<at name="componentclass">com.jeta.forms.gui.form.FormContainerComponent</at> |
|
49 |
</super> |
|
50 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
51 |
<at name="beanclass">javax.swing.JTabbedPane</at> |
|
52 |
<at name="beanproperties"> |
|
53 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
54 |
<at name="classname">javax.swing.JTabbedPane</at> |
|
55 |
<at name="properties"> |
|
56 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
57 |
<at name="border"> |
|
58 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
59 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
60 |
<at name="name">border</at> |
|
61 |
</super> |
|
62 |
<at name="borders"> |
|
63 |
<object classname="java.util.LinkedList"> |
|
64 |
<item > |
|
65 |
<at name="value"> |
|
66 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
67 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
68 |
<at name="name">border</at> |
|
69 |
</super> |
|
70 |
</object> |
|
71 |
</at> |
|
72 |
</item> |
|
73 |
</object> |
|
74 |
</at> |
|
75 |
</object> |
|
76 |
</at> |
|
77 |
<at name="componentCount">2</at> |
|
78 |
<at name="name">tabPreferences</at> |
|
79 |
<at name="tabs"> |
|
80 |
<object classname="com.jeta.forms.store.properties.TabbedPaneProperties"> |
|
81 |
<at name="name">tabs</at> |
|
82 |
<at name="items"> |
|
83 |
<object classname="java.util.LinkedList"> |
|
84 |
<item > |
|
85 |
<at name="value"> |
|
86 |
<object classname="com.jeta.forms.store.properties.TabProperty"> |
|
87 |
<at name="name">tab</at> |
|
88 |
<at name="title">_General</at> |
|
89 |
<at name="icon"> |
|
90 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
91 |
<at name="embedded">false</at> |
|
92 |
<at name="width">0</at> |
|
93 |
<at name="height">0</at> |
|
94 |
</object> |
|
95 |
</at> |
|
96 |
<at name="form"> |
|
97 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
98 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
99 |
<at name="cellconstraints"> |
|
100 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
101 |
<at name="column">1</at> |
|
102 |
<at name="row">1</at> |
|
103 |
<at name="colspan">1</at> |
|
104 |
<at name="rowspan">1</at> |
|
105 |
<at name="halign">default</at> |
|
106 |
<at name="valign">default</at> |
|
107 |
<at name="insets" object="insets">0,0,0,0</at> |
|
108 |
</object> |
|
109 |
</at> |
|
110 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
111 |
</super> |
|
112 |
<at name="id">embedded.718482310</at> |
|
113 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at> |
|
114 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
|
115 |
<at name="components"> |
|
116 |
<object classname="java.util.LinkedList"> |
|
117 |
<item > |
|
118 |
<at name="value"> |
|
119 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
120 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
121 |
<at name="cellconstraints"> |
|
122 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
123 |
<at name="column">2</at> |
|
124 |
<at name="row">2</at> |
|
125 |
<at name="colspan">1</at> |
|
126 |
<at name="rowspan">1</at> |
|
127 |
<at name="halign">default</at> |
|
128 |
<at name="valign">default</at> |
|
129 |
<at name="insets" object="insets">0,0,0,0</at> |
|
130 |
</object> |
|
131 |
</at> |
|
132 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
133 |
</super> |
|
134 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
135 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
136 |
<at name="beanproperties"> |
|
137 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
138 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
139 |
<at name="properties"> |
|
140 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
141 |
<at name="border"> |
|
142 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
143 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
144 |
<at name="name">border</at> |
|
145 |
</super> |
|
146 |
<at name="borders"> |
|
147 |
<object classname="java.util.LinkedList"> |
|
148 |
<item > |
|
149 |
<at name="value"> |
|
150 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
151 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
152 |
<at name="name">border</at> |
|
153 |
</super> |
|
154 |
</object> |
|
155 |
</at> |
|
156 |
</item> |
|
157 |
</object> |
|
158 |
</at> |
|
159 |
</object> |
|
160 |
</at> |
|
161 |
<at name="name">lblRemoteEntityFeatureTypeEditorMode</at> |
|
162 |
<at name="width">615</at> |
|
163 |
<at name="text">_Online_Remote_entity_feature_type_editor_mode</at> |
|
164 |
<at name="fill"> |
|
165 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
166 |
<at name="name">fill</at> |
|
167 |
</object> |
|
168 |
</at> |
|
169 |
<at name="height">14</at> |
|
170 |
</object> |
|
171 |
</at> |
|
172 |
</object> |
|
173 |
</at> |
|
174 |
</object> |
|
175 |
</at> |
|
176 |
</item> |
|
177 |
<item > |
|
178 |
<at name="value"> |
|
179 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
180 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
181 |
<at name="cellconstraints"> |
|
182 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
183 |
<at name="column">2</at> |
|
184 |
<at name="row">4</at> |
|
185 |
<at name="colspan">1</at> |
|
186 |
<at name="rowspan">1</at> |
|
187 |
<at name="halign">default</at> |
|
188 |
<at name="valign">default</at> |
|
189 |
<at name="insets" object="insets">0,0,0,0</at> |
|
190 |
</object> |
|
191 |
</at> |
|
192 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
193 |
</super> |
|
194 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
195 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
196 |
<at name="beanproperties"> |
|
197 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
198 |
<at name="classname">javax.swing.JComboBox</at> |
|
199 |
<at name="properties"> |
|
200 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
201 |
<at name="border"> |
|
202 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
203 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
204 |
<at name="name">border</at> |
|
205 |
</super> |
|
206 |
<at name="borders"> |
|
207 |
<object classname="java.util.LinkedList"> |
|
208 |
<item > |
|
209 |
<at name="value"> |
|
210 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
211 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
212 |
<at name="name">border</at> |
|
213 |
</super> |
|
214 |
</object> |
|
215 |
</at> |
Also available in: Unified diff