svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.exportto / org.gvsig.exportto.swing / org.gvsig.exportto.swing.impl / src / main / java / org / gvsig / export / swing / impl / ExportSwingLibraryImpl.java @ 44397
History | View | Annotate | Download (2.54 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40559 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | 40435 | jjdelcerro | *
|
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 | 40559 | jjdelcerro | * as published by the Free Software Foundation; either version 3
|
9 | 40435 | jjdelcerro | * 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 | 40559 | jjdelcerro | * For any additional information, do not hesitate to contact us
|
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | 40435 | jjdelcerro | */
|
24 | 43925 | jjdelcerro | package org.gvsig.export.swing.impl; |
25 | 40435 | jjdelcerro | |
26 | 44397 | jjdelcerro | import java.net.URL; |
27 | 43925 | jjdelcerro | import org.gvsig.export.swing.ExportSwingLibrary; |
28 | import org.gvsig.export.swing.ExportSwingLocator; |
||
29 | 40435 | jjdelcerro | import org.gvsig.tools.library.AbstractLibrary; |
30 | import org.gvsig.tools.library.LibraryException; |
||
31 | 44397 | jjdelcerro | import org.gvsig.tools.swing.api.ToolsSwingLocator; |
32 | import org.gvsig.tools.swing.icontheme.IconTheme; |
||
33 | 40435 | jjdelcerro | |
34 | /**
|
||
35 | * Library for Swing API initialization and configuration.
|
||
36 | *
|
||
37 | * @author gvSIG team
|
||
38 | * @version $Id$
|
||
39 | */
|
||
40 | 43925 | jjdelcerro | public class ExportSwingLibraryImpl extends AbstractLibrary { |
41 | 40435 | jjdelcerro | |
42 | @Override
|
||
43 | public void doRegistration() { |
||
44 | 43925 | jjdelcerro | registerAsImplementationOf(ExportSwingLibrary.class); |
45 | 40435 | jjdelcerro | } |
46 | |||
47 | @Override
|
||
48 | protected void doInitialize() throws LibraryException { |
||
49 | 43925 | jjdelcerro | ExportSwingLocator.registerExportPanelsManager(DefaultExportPanelsManager.class); |
50 | ExportSwingLocator.registerSwingManager(DefaultExportSwingManager.class); |
||
51 | 40435 | jjdelcerro | } |
52 | |||
53 | @Override
|
||
54 | protected void doPostInitialize() throws LibraryException { |
||
55 | 44397 | jjdelcerro | String[][] iconNames = new String[][] { |
56 | new String[] { "action", "common-filter" }, |
||
57 | new String[] { "action", "common-sortdown" }, |
||
58 | new String[] { "action", "common-sortup" }, |
||
59 | new String[] { "action", "common-check-on" }, |
||
60 | new String[] { "action", "common-check-off" } |
||
61 | }; |
||
62 | IconTheme theme = ToolsSwingLocator.getIconThemeManager().getCurrent(); |
||
63 | for (String[] icon : iconNames) { |
||
64 | URL url = this.getClass().getResource("/images/export-to/"+icon[1]+".png"); |
||
65 | theme.registerDefault("Export", icon[0], icon[1], null, url); |
||
66 | } |
||
67 | |||
68 | 40435 | jjdelcerro | } |
69 | |||
70 | } |