Revision 43152 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/AddLayer.java
AddLayer.java | ||
---|---|---|
29 | 29 |
import java.util.List; |
30 | 30 |
|
31 | 31 |
import javax.swing.JOptionPane; |
32 |
import org.apache.commons.collections.ListUtils; |
|
33 |
import org.apache.commons.lang3.ArrayUtils; |
|
34 | 32 |
|
35 | 33 |
import org.cresques.cts.ICoordTrans; |
36 | 34 |
import org.cresques.cts.IProjection; |
35 |
import org.slf4j.Logger; |
|
36 |
import org.slf4j.LoggerFactory; |
|
37 |
|
|
37 | 38 |
import org.gvsig.andami.IconThemeHelper; |
38 | 39 |
import org.gvsig.andami.PluginServices; |
39 | 40 |
import org.gvsig.andami.plugins.Extension; |
... | ... | |
43 | 44 |
import org.gvsig.app.gui.WizardPanel; |
44 | 45 |
import org.gvsig.app.project.documents.view.ViewDocument; |
45 | 46 |
import org.gvsig.app.project.documents.view.gui.IView; |
46 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.swing.FilesystemExplorerAddLayerWizardPanel; |
|
47 | 47 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.swing.FilesystemExplorerWizardPanel; |
48 | 48 |
import org.gvsig.fmap.mapcontext.MapContext; |
49 | 49 |
import org.gvsig.fmap.mapcontext.ViewPort; |
... | ... | |
52 | 52 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
53 | 53 |
import org.gvsig.fmap.mapcontrol.MapControl; |
54 | 54 |
import org.gvsig.tools.ToolsLocator; |
55 |
import org.gvsig.tools.dataTypes.CoercionException; |
|
56 |
import org.gvsig.tools.dataTypes.DataType; |
|
57 |
import org.gvsig.tools.dataTypes.DataTypesManager; |
|
58 | 55 |
import org.gvsig.tools.dispose.DisposeUtils; |
59 | 56 |
import org.gvsig.tools.i18n.I18nManager; |
60 |
import org.slf4j.Logger; |
|
61 |
import org.slf4j.LoggerFactory; |
|
62 | 57 |
|
63 | 58 |
/** |
64 | 59 |
* Extensi�n que abre un di�logo para seleccionar la capa o capas que se |
... | ... | |
73 | 68 |
|
74 | 69 |
static { |
75 | 70 |
AddLayer.wizardStack = new ArrayList<>(); |
76 |
// Anadimos el panel al wizard de cargar capa.
|
|
77 |
AddLayer.addWizard(FilesystemExplorerAddLayerWizardPanel.class);
|
|
71 |
// Anadimos el panel al wizard de cargar capa. |
|
72 |
AddLayer.addWizard(FilesystemExplorerWizardPanel.class); |
|
78 | 73 |
} |
79 | 74 |
|
80 | 75 |
public static void addWizard(Class<? extends WizardPanel> wpClass) { |
... | ... | |
150 | 145 |
} |
151 | 146 |
|
152 | 147 |
public static class ArrayUtils { |
153 |
|
|
148 |
|
|
154 | 149 |
// FIXME: Use the class in org.gvsig.tools when this is available and remove this. |
155 | 150 |
|
156 | 151 |
/** |
... | ... | |
218 | 213 |
@Override |
219 | 214 |
public void execute(String command, Object[] args) { |
220 | 215 |
List<File> files = ArrayUtils.getListOf(args,0,File.class); |
221 |
|
|
216 |
|
|
222 | 217 |
ApplicationManager application = ApplicationLocator.getManager(); |
223 | 218 |
|
224 | 219 |
IView view = (IView) application.getActiveComponent(ViewDocument.class); |
... | ... | |
254 | 249 |
wp = wpClass.getConstructor() |
255 | 250 |
.newInstance(params); |
256 | 251 |
application.message( |
257 |
i18nManager.getTranslation("Adding tab...") + wp.getTabName(),
|
|
252 |
i18nManager.getTranslation("Adding tab...") + wp.getTabName(), |
|
258 | 253 |
JOptionPane.INFORMATION_MESSAGE |
259 | 254 |
); |
260 | 255 |
wp.setMapCtrl(mapControl); |
Also available in: Unified diff