Revision 1124 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/ToolsSwingDefaultImplLibrary.java

View differences:

ToolsSwingDefaultImplLibrary.java
3 3
 *
4 4
 * Copyright (C) 2007-2013 gvSIG Association.
5 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 2
9
 * of the License, or (at your option) any later version.
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 2 of the License, or (at your option) any later
9
 * version.
10 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.
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 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.
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.
20 19
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
20
 * For any additional information, do not hesitate to contact us at info AT
21
 * gvsig.com, or visit our website www.gvsig.com.
23 22
 */
24 23
package org.gvsig.tools.swing.impl;
25 24

  
......
31 30
import org.gvsig.tools.swing.api.ToolsSwingLibrary;
32 31
import org.gvsig.tools.swing.api.ToolsSwingLocator;
33 32
import org.gvsig.tools.swing.impl.component.DefaultComponentSwingManager;
34
import org.gvsig.tools.swing.impl.dynobject.DefaultDynObjectSwingManager;
35
import org.gvsig.tools.swing.impl.dynobject.DefaultDynObjectSwingServiceManager;
36
import org.gvsig.tools.swing.impl.dynobject.DefaultJDynObjectComponentFactory;
37
import org.gvsig.tools.swing.impl.dynobject.dynfield.JDynObjectDynfieldComponentFactory;
38
import org.gvsig.tools.swing.impl.dynobject.dynfield.JNDynFieldComponentFactory;
39 33
import org.gvsig.tools.swing.impl.icontheme.DefaultIconThemeManager;
40 34
import org.gvsig.tools.swing.impl.task.DefaultTaskStatusSwingManager;
41 35
import org.gvsig.tools.swing.impl.usability.DefaultUsabilitySwingManager;
......
44 38

  
45 39
/**
46 40
 * {@link Library} for the default tools swing implementation.
47
 * 
41
 *
48 42
 * @author gvSIG team
49 43
 */
50 44
public class ToolsSwingDefaultImplLibrary extends AbstractLibrary {
51 45

  
52
	@Override
53
	public void doRegistration() {
54
		super.doRegistration();
55
		registerAsImplementationOf(ToolsSwingLibrary.class);
56
	}
46
    @Override
47
    public void doRegistration() {
48
        super.doRegistration();
49
        registerAsImplementationOf(ToolsSwingLibrary.class);
50
    }
57 51

  
58
	@Override
59
	protected void doInitialize() throws LibraryException {
60
		ToolsSwingLocator
61
				.registerDynObjectSwingManager(DefaultDynObjectSwingManager.class);
62
		ToolsSwingLocator
63
				.registerUsabilitySwingManager(DefaultUsabilitySwingManager.class);
64
		ToolsSwingLocator
65
				.registerTaskStatusSwingManager(DefaultTaskStatusSwingManager.class);
66
		ToolsSwingLocator
67
				.registerWindowManager(DefaultWindowManager.class);
68
		ToolsSwingServiceLocator
69
				.registerDynObjectServiceManager(DefaultDynObjectSwingServiceManager.class);
52
    @Override
53
    protected void doInitialize() throws LibraryException {
54
        ToolsSwingLocator
55
                .registerUsabilitySwingManager(DefaultUsabilitySwingManager.class);
56
        ToolsSwingLocator
57
                .registerTaskStatusSwingManager(DefaultTaskStatusSwingManager.class);
58
        ToolsSwingLocator
59
                .registerWindowManager(DefaultWindowManager.class);
70 60
        ToolsSwingLocator.registerIconThemeManager(DefaultIconThemeManager.class);
71
        
61

  
72 62
        ToolsSwingLocator.registerComponentSwingManager(
73
            DefaultComponentSwingManager.class);
63
                DefaultComponentSwingManager.class);
74 64

  
75
	}
65
    }
76 66

  
77
	@Override
78
	protected void doPostInitialize() throws LibraryException {
79
		ServiceManager dsManager = ToolsSwingServiceLocator.getServiceManager();
67
    @Override
68
    protected void doPostInitialize() throws LibraryException {
80 69

  
81
		dsManager.addServiceFactory(new DefaultJDynObjectComponentFactory());
82
		dsManager.addServiceFactory(new JNDynFieldComponentFactory(
83
				DataTypes.LIST));
84
		dsManager.addServiceFactory(new JDynObjectDynfieldComponentFactory());
85
	}
70
    }
86 71
}

Also available in: Unified diff