Revision 5988 org.gvsig.raster.multifile/trunk/org.gvsig.raster.multifile/org.gvsig.raster.multifile.app.multifileclient/src/main/java/org/gvsig/raster/multifile/app/MultifileClientExtension.java

View differences:

MultifileClientExtension.java
2 2
*
3 3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4 4
* of the Valencian Government (CIT)
5
* 
5
*
6 6
* This program is free software; you can redistribute it and/or
7 7
* modify it under the terms of the GNU General Public License
8 8
* as published by the Free Software Foundation; either version 2
9 9
* of the License, or (at your option) any later version.
10
* 
10
*
11 11
* This program is distributed in the hope that it will be useful,
12 12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13 13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 14
* GNU General Public License for more details.
15
* 
15
*
16 16
* You should have received a copy of the GNU General Public License
17 17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 19
* MA  02110-1301, USA.
20
* 
20
*
21 21
*/
22 22
package org.gvsig.raster.multifile.app;
23 23

  
......
49 49
	private MainWindow                      layerNamewindow      = null;
50 50
	private MainWindow                      bandSelectorwindow   = null;
51 51
	private MainDialogActions               actions              = null;
52
	
52

  
53 53
	public void initialize() {
54 54
		ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
55 55

  
56 56
		ExtensionPoint point = extensionPoints.get("AplicationPreferences");
57 57
		point = extensionPoints.get("RasterSEPropertiesDialog");
58 58
		point.append("Bandas", "", BandSelectorPanel.class);
59
		
59

  
60 60
		point = extensionPoints.add("GenericToolBarMenu");
61 61
		point.append("Multifile", "", MultiFileCreatorTocMenuEntry.getSingleton());
62 62
		MultiFileCreatorTocMenuEntry.setExtension(this);
63
		
63

  
64 64
		if (!Messages.hasLocales()) {
65 65
			Messages.addLocale(Locale.getDefault());
66 66
		}
......
68 68
		Messages.addResourceFamily("org.gvsig.raster.multifile.app.i18n.text",
69 69
				MultifileClientExtension.class.getClassLoader(),
70 70
				MultifileClientExtension.class.getClass().getName());
71
		
71

  
72 72
		initilizeIcons();
73 73
	}
74 74

  
75 75
	public void execute(String actionCommand) {
76 76
		if (actionCommand.compareTo("MultifileCreator") == 0) {
77
			layerNamewindow = new MainWindow((JComponent)getNewLayerPanel(), 
77
			layerNamewindow = new MainWindow((JComponent)getNewLayerPanel(),
78 78
					Messages.getText("select_output_file"), 300, 150, this);
79 79
			PluginServices.getMDIManager().addCentredWindow(layerNamewindow);
80 80
    	}
81 81
	}
82
	
82

  
83 83
	private void initilizeIcons() {
84 84
		IconThemeHelper.registerIcon(null, "multifile-icon", this);
85 85
    }
......
92 92
		return true;
93 93
	}
94 94

  
95
	/**
96
	 * @return CreateNewLayerPanel
97
	 */
95 98
	public CreateNewLayerPanel getNewLayerPanel() {
96 99
		if(newLayerPanel == null) {
97 100
			newLayerPanel = RasterSwingLocator.getSwingManager().createNewLayerPanel();
......
110 113
			bandSelectorwindow = new MainWindow(panel, Messages.getText("add_files"), 500, 400, this, true);
111 114
			PluginServices.getMDIManager().addCentredWindow(bandSelectorwindow);
112 115
		}
113
		
116

  
114 117
		//Button of load layer in the main dialog
115 118
		if(e.getSource() == bandSelectorwindow.getButtonsPanel().getButton(IButtonsPanel.BUTTON_USR1)) {
116 119
			actions.loadLayer();
117 120
		}
118
		
121

  
119 122
		//Button of create one file with al files
120 123
		if(e.getSource() == bandSelectorwindow.getButtonsPanel().getButton(IButtonsPanel.BUTTON_USR2)) {
121 124
			actions.buildOneLayer();
122 125
		}
123
		
126

  
124 127
	}
125 128
}

Also available in: Unified diff