gvsig-projects-pool / org.gvsig.online / trunk / org.gvsig.online / org.gvsig.online.swing / org.gvsig.online.swing.impl / src / main / java / org / gvsig / online / swing / impl / OnlineSwingLibraryImpl.java @ 9515
History | View | Annotate | Download (5.21 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.online.swing.impl; |
25 |
|
26 |
import org.gvsig.online.lib.api.OnlineLibrary; |
27 |
import org.gvsig.online.swing.api.OnlineSwingLibrary; |
28 |
import org.gvsig.online.swing.api.OnlineSwingLocator; |
29 |
import static org.gvsig.online.swing.impl.OnlineSwingManagerImpl.ICON_GROUP_NAME; |
30 |
import static org.gvsig.online.swing.impl.OnlineSwingManagerImpl.ICON_PROVIDER_NAME; |
31 |
import org.gvsig.online.swing.impl.authentication.none.UserIdentificationGuest; |
32 |
import org.gvsig.online.swing.impl.authentication.none.UserIdentificationGuestFactory; |
33 |
import org.gvsig.online.swing.impl.authentication.online.UserIdentificationOnlineFactory; |
34 |
import org.gvsig.online.swing.impl.initworkspace.OnlineJInitWorkingcopyImpl; |
35 |
import org.gvsig.tools.library.AbstractLibrary; |
36 |
import org.gvsig.tools.library.LibraryException; |
37 |
import org.gvsig.tools.swing.api.ToolsSwingUtils; |
38 |
|
39 |
/**
|
40 |
*
|
41 |
* @author jjdelcerro
|
42 |
*/
|
43 |
public class OnlineSwingLibraryImpl extends AbstractLibrary { |
44 |
|
45 |
@Override
|
46 |
public void doRegistration() { |
47 |
super.doRegistration();
|
48 |
registerAsImplementationOf(OnlineSwingLibrary.class); |
49 |
this.require(OnlineLibrary.class);
|
50 |
} |
51 |
|
52 |
@Override
|
53 |
protected void doInitialize() throws LibraryException { |
54 |
OnlineSwingLocator.registerDefaultOnlineSwingManager(OnlineSwingManagerImpl.class); |
55 |
|
56 |
} |
57 |
|
58 |
@Override
|
59 |
protected void doPostInitialize() throws LibraryException { |
60 |
UserIdentificationGuestFactory.selfRegister(); |
61 |
UserIdentificationOnlineFactory.selfRegister(); |
62 |
|
63 |
OnlineJChangesImpl_selfRegister(); |
64 |
OnlineJInitWorkingcopyImpl.selfRegister(); |
65 |
|
66 |
ToolsSwingUtils.registerIcons( |
67 |
OnlineSwingLibraryImpl.class, |
68 |
"/org/gvsig/online/swing/impl/images",
|
69 |
ICON_PROVIDER_NAME, |
70 |
new String[]{ ICON_GROUP_NAME, "online-common-init-workspace", "online-common"}, |
71 |
new String[]{ ICON_GROUP_NAME, "online-common-download", "online-common"} |
72 |
); |
73 |
// ToolsSwingUtils.registerSubgroupIconScreenshot(
|
74 |
// this.getClass(),
|
75 |
// "online",
|
76 |
// "online-common",
|
77 |
// "/org/gvsig/online/swing/impl/screenshots/online-addlayer.png"
|
78 |
// );
|
79 |
} |
80 |
|
81 |
public static void OnlineJChangesImpl_selfRegister() { |
82 |
|
83 |
ToolsSwingUtils.registerIcons( |
84 |
OnlineSwingLibraryImpl.class, |
85 |
"/org/gvsig/online/swing/impl/images",
|
86 |
ICON_PROVIDER_NAME, |
87 |
new String[]{ ICON_GROUP_NAME, "online-upload-all", "online-changes"}, |
88 |
new String[]{ ICON_GROUP_NAME, "online-revert", "online-changes"}, |
89 |
new String[]{ ICON_GROUP_NAME, "online-show-local-changes", "online-changes"}, |
90 |
new String[]{ ICON_GROUP_NAME, "online-download-overwrite", "online-changes"}, |
91 |
|
92 |
new String[]{ ICON_GROUP_NAME, "online-remotechanges-clear", "online-changes"}, |
93 |
new String[]{ ICON_GROUP_NAME, "online-remotechanges-download", "online-changes"}, |
94 |
new String[]{ ICON_GROUP_NAME, "online-remotechanges-reload", "online-changes"}, |
95 |
new String[]{ ICON_GROUP_NAME, "online-highlight-context", "online-changes"}, |
96 |
|
97 |
new String[]{ ICON_GROUP_NAME, "online-update-all", "online-changes"}, |
98 |
new String[]{ ICON_GROUP_NAME, "online-merge", "online-changes"}, |
99 |
new String[]{ ICON_GROUP_NAME, "online-show-remote-changes", "online-changes"}, |
100 |
new String[]{ ICON_GROUP_NAME, "online-center-context", "online-changes"}, |
101 |
new String[]{ ICON_GROUP_NAME, "online-zoom-context", "online-changes"}, |
102 |
new String[]{ ICON_GROUP_NAME, "online-clean-highlighted", "online-changes"} |
103 |
|
104 |
); |
105 |
ToolsSwingUtils.registerSubgroupIconScreenshot( |
106 |
OnlineSwingLibraryImpl.class, |
107 |
"online",
|
108 |
"online-changes",
|
109 |
"/org/gvsig/online/swing/impl/screenshots/online-changes-local.png"
|
110 |
); |
111 |
ToolsSwingUtils.registerSubgroupIconScreenshot( |
112 |
OnlineSwingLibraryImpl.class, |
113 |
"online",
|
114 |
"online-changes",
|
115 |
"/org/gvsig/online/swing/impl/screenshots/online-changes-remote.png"
|
116 |
); |
117 |
|
118 |
} |
119 |
} |