Statistics
| Revision:

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 @ 9521

History | View | Annotate | Download (5.3 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
        OnlineWorkingcopyPickerControllerImpl.selfRegister();
61

    
62
        UserIdentificationGuestFactory.selfRegister();
63
        UserIdentificationOnlineFactory.selfRegister();
64
        
65
        OnlineJChangesImpl_selfRegister();
66
        OnlineJInitWorkingcopyImpl.selfRegister();
67
        
68
        ToolsSwingUtils.registerIcons(
69
                OnlineSwingLibraryImpl.class, 
70
                "/org/gvsig/online/swing/impl/images",
71
                ICON_PROVIDER_NAME,
72
                new String[]{ ICON_GROUP_NAME, "online-common-init-workspace", "online-common"},
73
                new String[]{ ICON_GROUP_NAME, "online-common-download", "online-common"}
74
        );         
75
//        ToolsSwingUtils.registerSubgroupIconScreenshot(
76
//                this.getClass(), 
77
//                "online", 
78
//                "online-common", 
79
//                "/org/gvsig/online/swing/impl/screenshots/online-addlayer.png"
80
//        );
81
    }
82
    
83
    public static void OnlineJChangesImpl_selfRegister() {
84
        
85
        ToolsSwingUtils.registerIcons(
86
                OnlineSwingLibraryImpl.class, 
87
                "/org/gvsig/online/swing/impl/images",
88
                ICON_PROVIDER_NAME,
89
                new String[]{ ICON_GROUP_NAME, "online-upload-all", "online-changes"},
90
                new String[]{ ICON_GROUP_NAME, "online-revert", "online-changes"},
91
                new String[]{ ICON_GROUP_NAME, "online-show-local-changes", "online-changes"},
92
                new String[]{ ICON_GROUP_NAME, "online-download-overwrite", "online-changes"},
93
                
94
                new String[]{ ICON_GROUP_NAME, "online-remotechanges-clear", "online-changes"},
95
                new String[]{ ICON_GROUP_NAME, "online-remotechanges-download", "online-changes"},
96
                new String[]{ ICON_GROUP_NAME, "online-remotechanges-reload", "online-changes"},
97
                new String[]{ ICON_GROUP_NAME, "online-highlight-context", "online-changes"},
98
                
99
                new String[]{ ICON_GROUP_NAME, "online-update-all", "online-changes"},
100
                new String[]{ ICON_GROUP_NAME, "online-merge", "online-changes"},
101
                new String[]{ ICON_GROUP_NAME, "online-show-remote-changes", "online-changes"},
102
                new String[]{ ICON_GROUP_NAME, "online-center-context", "online-changes"},
103
                new String[]{ ICON_GROUP_NAME, "online-zoom-context", "online-changes"},
104
                new String[]{ ICON_GROUP_NAME, "online-clean-highlighted", "online-changes"}
105

    
106
        );         
107
//        ToolsSwingUtils.registerSubgroupIconScreenshot(
108
//                OnlineSwingLibraryImpl.class, 
109
//                "online", 
110
//                "online-changes", 
111
//                "/org/gvsig/online/swing/impl/screenshots/online-changes-local.png"
112
//        );
113
//        ToolsSwingUtils.registerSubgroupIconScreenshot(
114
//                OnlineSwingLibraryImpl.class, 
115
//                "online", 
116
//                "online-changes", 
117
//                "/org/gvsig/online/swing/impl/screenshots/online-changes-remote.png"
118
//        );
119
        
120
    }
121
}