Revision 40030

View differences:

branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/exportto/swing/impl/ExporttoSwingDefaultImplLibrary.java
29 29
import org.gvsig.i18n.Messages;
30 30
import org.gvsig.tools.library.AbstractLibrary;
31 31
import org.gvsig.tools.library.LibraryException;
32
import org.gvsig.tools.swing.api.ToolsSwingLibrary;
32 33

  
33 34
/**
34 35
 * Library for default swing implementation initialization and configuration.
......
41 42
    @Override
42 43
    public void doRegistration() {
43 44
        registerAsImplementationOf(ExporttoSwingLibrary.class);
45
        this.require(ToolsSwingLibrary.class);
44 46
    }
45 47

  
46 48
    @Override
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/test/java/org/gvsig/exportto/swing/impl/DefaultExporttoSwingManagerTest.java
22 22
package org.gvsig.exportto.swing.impl;
23 23

  
24 24
import org.gvsig.exportto.swing.ExporttoSwingManager;
25
import org.gvsig.exportto.swing.ExporttoSwingManagerTest;
26 25

  
27 26
/**
28 27
 * {@link ExporttoSwingManager} API compatibility tests for the
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/test/java/org/gvsig/exportto/swing/impl/DefaultExporttoWindowManagerTest.java
22 22
package org.gvsig.exportto.swing.impl;
23 23

  
24 24
import org.gvsig.exportto.swing.ExporttoWindowManager;
25
import org.gvsig.exportto.swing.ExporttoWindowManagerTest;
26 25

  
27 26
/**
28 27
 * {@link ExporttoWindowManager} API compatibility tests for the
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/test/java/org/gvsig/exportto/swing/impl/JExporttoServicePanelTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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.
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
 */
22
package org.gvsig.exportto.swing.impl;
23

  
24
import org.gvsig.exportto.ExporttoManager;
25
import org.gvsig.exportto.ExporttoServiceException;
26
import org.gvsig.exportto.swing.ExporttoSwingLocator;
27
import org.gvsig.exportto.swing.ExporttoSwingManager;
28
import org.gvsig.exportto.swing.JExporttoServicePanel;
29
import org.gvsig.fmap.crs.CRSFactory;
30
import org.gvsig.fmap.dal.DALLocator;
31
import org.gvsig.fmap.dal.DataManager;
32
import org.gvsig.fmap.dal.DataStoreParameters;
33
import org.gvsig.fmap.dal.exception.InitializeException;
34
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
35
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
36
import org.gvsig.fmap.dal.feature.FeatureStore;
37
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
38
import org.gvsig.tools.service.ServiceException;
39

  
40
/**
41
 * API compatibility tests for {@link JExporttoServicePanel} implementations.
42
 * 
43
 * @author gvSIG Team
44
 * @version $Id$
45
 */
46
public abstract class JExporttoServicePanelTest extends
47
    AbstractLibraryAutoInitTestCase {
48

  
49
    protected ExporttoManager manager;
50
    protected ExporttoSwingManager swingManager;
51
    protected DataManager dataManager = null;
52

  
53
    @Override
54
    protected void doSetUp() throws Exception {
55
        swingManager = ExporttoSwingLocator.getSwingManager();
56
        manager = swingManager.getManager();
57
        dataManager = DALLocator.getDataManager();
58
        
59
        IconThemeHelper.registerIcon("export-to", "wizard-export-to", this);
60
    }
61

  
62
    public void testJExporttoServicePanel() throws ServiceException,
63
        ExporttoServiceException, ValidateDataParametersException,
64
        InitializeException, ProviderNotRegisteredException {
65
        assertNotNull(swingManager);
66

  
67
        JExporttoServicePanel panel =
68
            swingManager.createExportto(createMemoryFeatureStore(),
69
                CRSFactory.getCRS("EPSG:4326"));
70
        assertNotNull(panel);
71
    }
72

  
73
    private FeatureStore createMemoryFeatureStore() throws InitializeException,
74
        ProviderNotRegisteredException, ValidateDataParametersException {
75
        DataStoreParameters memoryParameters =
76
            dataManager.createStoreParameters("Memory");
77
        return (FeatureStore) dataManager.openStore("Memory", memoryParameters);
78
    }
79
}
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/test/java/org/gvsig/exportto/swing/impl/DefaultJExporttoServicePanelTest.java
22 22
package org.gvsig.exportto.swing.impl;
23 23

  
24 24
import org.gvsig.exportto.swing.JExporttoServicePanel;
25
import org.gvsig.exportto.swing.JExporttoServicePanelTest;
26 25

  
27 26
/**
28 27
 * {@link JExporttoServicePanel} API compatibility tests for the
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/test/java/org/gvsig/exportto/swing/impl/ExporttoSwingManagerTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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.
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
 */
22
package org.gvsig.exportto.swing.impl;
23

  
24
import org.gvsig.exportto.ExporttoLocator;
25
import org.gvsig.exportto.ExporttoManager;
26
import org.gvsig.exportto.swing.ExporttoSwingLocator;
27
import org.gvsig.exportto.swing.ExporttoSwingManager;
28
import org.gvsig.exportto.swing.ExporttoWindowManager;
29
import org.gvsig.exportto.swing.JExporttoServicePanel;
30
import org.gvsig.fmap.crs.CRSFactory;
31
import org.gvsig.fmap.dal.DALLocator;
32
import org.gvsig.fmap.dal.DataManager;
33
import org.gvsig.fmap.dal.DataStoreParameters;
34
import org.gvsig.fmap.dal.exception.InitializeException;
35
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
36
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
37
import org.gvsig.fmap.dal.feature.FeatureStore;
38
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
39
import org.gvsig.tools.service.ServiceException;
40

  
41
/**
42
 * API compatibility tests for {@link ExporttoSwingManager} implementations.
43
 * 
44
 * @author gvSIG Team
45
 * @version $Id$
46
 */
47
public abstract class ExporttoSwingManagerTest extends
48
    AbstractLibraryAutoInitTestCase {
49

  
50
    protected ExporttoManager manager;
51
    protected ExporttoSwingManager swingManager;
52
    protected DataManager dataManager = null;
53

  
54
    @Override
55
    protected void doSetUp() throws Exception {
56
        manager = ExporttoLocator.getManager();
57
        swingManager = ExporttoSwingLocator.getSwingManager();
58
        dataManager = DALLocator.getDataManager();
59
        
60
        IconThemeHelper.registerIcon("export-to", "wizard-export-to", this);
61
    }
62

  
63
    public void testGetManager() {
64
        assertEquals(manager, swingManager.getManager());
65
    }
66

  
67
    public void testCreateWindowManager() {
68
        ExporttoWindowManager windowManager = null;
69
        swingManager.registerWindowManager(windowManager);
70
        assertEquals(swingManager.getWindowManager(), windowManager);
71
    }
72

  
73
    public void testCreationJExporttoServicePanel() throws ServiceException,
74
        ValidateDataParametersException, InitializeException,
75
        ProviderNotRegisteredException {
76

  
77
        JExporttoServicePanel panel1 =
78
            swingManager.createExportto(createMemoryFeatureStore(),
79
                CRSFactory.getCRS("EPSG:4326"));
80

  
81
        assertNotNull(panel1);
82
    }
83

  
84
    private FeatureStore createMemoryFeatureStore() throws InitializeException,
85
        ProviderNotRegisteredException, ValidateDataParametersException {
86
        DataStoreParameters memoryParameters =
87
            dataManager.createStoreParameters("Memory");
88
        return (FeatureStore) dataManager.openStore("Memory", memoryParameters);
89
    }
90

  
91
}
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/test/java/org/gvsig/exportto/swing/impl/ExporttoWindowManagerTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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.
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
 */
22
package org.gvsig.exportto.swing.impl;
23

  
24
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
25

  
26
/**
27
 * API compatibility tests for {@link ExporttoWindowManager} implementations.
28
 * 
29
 * @author gvSIG Team
30
 * @version $Id$
31
 */
32
public abstract class ExporttoWindowManagerTest extends
33
    AbstractLibraryAutoInitTestCase {
34

  
35
    @Override
36
    protected void doSetUp() throws Exception {
37

  
38
    }
39

  
40
    public void testUno() {
41
        // FIXME: fltan por implementar
42
    }
43
}
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.api/src/test/java/org/gvsig/exportto/swing/JExporttoServicePanelTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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.
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
 */
22
package org.gvsig.exportto.swing;
23

  
24
import org.gvsig.exportto.ExporttoManager;
25
import org.gvsig.exportto.ExporttoServiceException;
26
import org.gvsig.fmap.crs.CRSFactory;
27
import org.gvsig.fmap.dal.DALLocator;
28
import org.gvsig.fmap.dal.DataManager;
29
import org.gvsig.fmap.dal.DataStoreParameters;
30
import org.gvsig.fmap.dal.exception.InitializeException;
31
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
32
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
33
import org.gvsig.fmap.dal.feature.FeatureStore;
34
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
35
import org.gvsig.tools.service.ServiceException;
36

  
37
/**
38
 * API compatibility tests for {@link JExporttoServicePanel} implementations.
39
 * 
40
 * @author gvSIG Team
41
 * @version $Id$
42
 */
43
public abstract class JExporttoServicePanelTest extends
44
    AbstractLibraryAutoInitTestCase {
45

  
46
    protected ExporttoManager manager;
47
    protected ExporttoSwingManager swingManager;
48
    protected DataManager dataManager = null;
49

  
50
    @Override
51
    protected void doSetUp() throws Exception {
52
        swingManager = ExporttoSwingLocator.getSwingManager();
53
        manager = swingManager.getManager();
54
        dataManager = DALLocator.getDataManager();
55
    }
56

  
57
    public void testJExporttoServicePanel() throws ServiceException,
58
        ExporttoServiceException, ValidateDataParametersException,
59
        InitializeException, ProviderNotRegisteredException {
60
        assertNotNull(swingManager);
61

  
62
        JExporttoServicePanel panel =
63
            swingManager.createExportto(createMemoryFeatureStore(),
64
                CRSFactory.getCRS("EPSG:4326"));
65
        assertNotNull(panel);
66
    }
67

  
68
    private FeatureStore createMemoryFeatureStore() throws InitializeException,
69
        ProviderNotRegisteredException, ValidateDataParametersException {
70
        DataStoreParameters memoryParameters =
71
            dataManager.createStoreParameters("Memory");
72
        return (FeatureStore) dataManager.openStore("Memory", memoryParameters);
73
    }
74
}
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.api/src/test/java/org/gvsig/exportto/swing/ExporttoSwingManagerTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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.
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
 */
22
package org.gvsig.exportto.swing;
23

  
24
import org.gvsig.exportto.ExporttoLocator;
25
import org.gvsig.exportto.ExporttoManager;
26
import org.gvsig.fmap.crs.CRSFactory;
27
import org.gvsig.fmap.dal.DALLocator;
28
import org.gvsig.fmap.dal.DataManager;
29
import org.gvsig.fmap.dal.DataStoreParameters;
30
import org.gvsig.fmap.dal.exception.InitializeException;
31
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
32
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
33
import org.gvsig.fmap.dal.feature.FeatureStore;
34
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
35
import org.gvsig.tools.service.ServiceException;
36

  
37
/**
38
 * API compatibility tests for {@link ExporttoSwingManager} implementations.
39
 * 
40
 * @author gvSIG Team
41
 * @version $Id$
42
 */
43
public abstract class ExporttoSwingManagerTest extends
44
    AbstractLibraryAutoInitTestCase {
45

  
46
    protected ExporttoManager manager;
47
    protected ExporttoSwingManager swingManager;
48
    protected DataManager dataManager = null;
49

  
50
    @Override
51
    protected void doSetUp() throws Exception {
52
        manager = ExporttoLocator.getManager();
53
        swingManager = ExporttoSwingLocator.getSwingManager();
54
        dataManager = DALLocator.getDataManager();
55
    }
56

  
57
    public void testGetManager() {
58
        assertEquals(manager, swingManager.getManager());
59
    }
60

  
61
    public void testCreateWindowManager() {
62
        ExporttoWindowManager windowManager = null;
63
        swingManager.registerWindowManager(windowManager);
64
        assertEquals(swingManager.getWindowManager(), windowManager);
65
    }
66

  
67
    public void testCreationJExporttoServicePanel() throws ServiceException,
68
        ValidateDataParametersException, InitializeException,
69
        ProviderNotRegisteredException {
70

  
71
        JExporttoServicePanel panel1 =
72
            swingManager.createExportto(createMemoryFeatureStore(),
73
                CRSFactory.getCRS("EPSG:4326"));
74

  
75
        assertNotNull(panel1);
76
    }
77

  
78
    private FeatureStore createMemoryFeatureStore() throws InitializeException,
79
        ProviderNotRegisteredException, ValidateDataParametersException {
80
        DataStoreParameters memoryParameters =
81
            dataManager.createStoreParameters("Memory");
82
        return (FeatureStore) dataManager.openStore("Memory", memoryParameters);
83
    }
84

  
85
}
branches/v2_0_0_prep/libraries/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.api/src/test/java/org/gvsig/exportto/swing/ExporttoWindowManagerTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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.
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
 */
22
package org.gvsig.exportto.swing;
23

  
24
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
25

  
26
/**
27
 * API compatibility tests for {@link ExporttoWindowManager} implementations.
28
 * 
29
 * @author gvSIG Team
30
 * @version $Id$
31
 */
32
public abstract class ExporttoWindowManagerTest extends
33
    AbstractLibraryAutoInitTestCase {
34

  
35
    @Override
36
    protected void doSetUp() throws Exception {
37

  
38
    }
39

  
40
    public void testUno() {
41
        // FIXME: fltan por implementar
42
    }
43
}

Also available in: Unified diff