Revision 15687

View differences:

trunk/extensions/ext3Dgui/config/config.xml
21 21
			active="true"
22 22
			priority="31">
23 23
			 
24
			<menu text="Vista/navegacion/Default_Navigation" action-command="DEFAULT_SELECT" icon="images/DefaultManipulator.png"/>
25
			<menu text="Vista/navegacion/Pan_Navigation" action-command="PAN_SELECT" icon="images/RollManipulator.png"/>
26
			<menu text="Vista/navegacion/Zoom_Navigation" action-command="ZOOM_SELECT" icon="images/zoom.png"/>
27
			<menu text="Vista/navegacion/Azimut_Navigation" action-command="AZIMUT_SELECT" icon="images/AzimutManipulator.png"/>
28
			<menu text="Vista/navegacion/Active_north" action-command="ACTIVE" icon="images/NorthDes.png"/>
24
			<menu text="Vista/navegacion/Default_Navigation" action-command="DEFAULT_SELECT" icon="default-manipulator-icon"/>
25
			<menu text="Vista/navegacion/Pan_Navigation" action-command="PAN_SELECT" icon="roll-manipulator-icon"/>
26
			<menu text="Vista/navegacion/Zoom_Navigation" action-command="ZOOM_SELECT" icon="zoom-manipulator-icon"/>
27
			<menu text="Vista/navegacion/Azimut_Navigation" action-command="AZIMUT_SELECT" icon="azimut-manipulator-icon"/>
28
			<menu text="Vista/navegacion/Active_north" action-command="ACTIVE" icon="north-disable-icon"/>
29 29
			<!-- <menu text="Vista/modos/Wire_Frame" action-command="WIRE_FRAME" icon="images/WireFrame.png"/> -->
30 30
			<tool-bar name="NavigationMenu3D" position="3">
31
				<selectable-tool group="navigation" is-default="true" icon="images/DefaultManipulator.png" action-command="DEFAULT_SELECT"  tooltip="Default_Navigation" position="1"  />
32
				<selectable-tool group="navigation" icon="images/RollManipulator.png" action-command="PAN_SELECT"  tooltip="Pan_Navigation" position="2"/>
33
				<selectable-tool group="navigation" icon="images/ZoomManipulator.png" action-command="ZOOM_SELECT"  tooltip="Zoom_Navigation" position="3"/>
34
				<selectable-tool group="navigation" icon="images/AzimutManipulator.png" action-command="AZIMUT_SELECT"  tooltip="Azimut_Navigation" position="4"/>
35
				<action-tool icon="images/NorthDes.png" name="NORTH" action-command="ACTIVE"  tooltip="Active_north" position="5"/>
31
				<selectable-tool group="navigation" is-default="true" icon="default-manipulator-icon" action-command="DEFAULT_SELECT"  tooltip="Default_Navigation" position="1"  />
32
				<selectable-tool group="navigation" icon="roll-manipulator-icon" action-command="PAN_SELECT"  tooltip="Pan_Navigation" position="2"/>
33
				<selectable-tool group="navigation" icon="zoom-manipulator-icon" action-command="ZOOM_SELECT"  tooltip="Zoom_Navigation" position="3"/>
34
				<selectable-tool group="navigation" icon="azimut-manipulator-icon" action-command="AZIMUT_SELECT"  tooltip="Azimut_Navigation" position="4"/>
35
				<action-tool icon="north-disable-icon" name="NORTH" action-command="ACTIVE"  tooltip="Active_north" position="5"/>
36 36
				<!-- <action-tool icon="images/WireFrame.png" action-command="WIRE_FRAME"  tooltip="Wire_Frame" position="6"/> -->
37
				<action-tool icon="images/Global.png" action-command="RESET_VIEW"  tooltip="Reset_View" position="7"/>
37
				<action-tool icon="global-zoom-icon" action-command="RESET_VIEW"  tooltip="Reset_View" position="7"/>
38 38
			</tool-bar>
39 39
		</extension>
40 40
		
......
43 43
			active="true"
44 44
			priority="51">
45 45
			
46
			<menu text="Vista/navegacion/Zoom_Select" action-command="ZOOM_SELECT" icon="images/ZoomSeleccion.png"/>
47
			<menu text="Capa/Transparency" name="TRANSPARENCY" action-command="TRANSPARENCY" icon="images/Alpha.png"/>
46
			<menu text="Vista/navegacion/Zoom_Select" action-command="ZOOM_SELECT" icon="zoom-selection-icon"/>
47
			<menu text="Capa/Transparency" name="TRANSPARENCY" action-command="TRANSPARENCY" icon="transparency-icon"/>
48 48
			<tool-bar name="MenuZoom3D" position="4">
49
				<action-tool icon="images/ZoomSeleccion.png" action-command="ZOOM_SELECT"  tooltip="Zoom_Select" position="2"/>
50
				<action-tool icon="images/Alpha.png" name="TRANSPARENCY" action-command="TRANSPARENCY"  tooltip="Transparency" position="1"/>
49
				<action-tool icon="zoom-selection-icon" action-command="ZOOM_SELECT"  tooltip="Zoom_Select" position="2"/>
50
				<action-tool icon="transparency-icon" name="TRANSPARENCY" action-command="TRANSPARENCY"  tooltip="Transparency" position="1"/>
51 51
			</tool-bar>
52 52
		</extension>
53 53
		
......
56 56
			active="true"
57 57
			priority="40">
58 58
			
59
			<menu text="Vista/navegacion/Encuadre" action-command="ENCUADRE" icon="images/encuadre.png"/>
59
			<menu text="Vista/navegacion/Encuadre" action-command="ENCUADRE" icon="encuadrator-icon"/>
60 60
			<!-- <menu text="Vista/navegacion/Insertar Punto" action-command="POINT3D" icon="images/InsertPoint.png"/> -->
61 61
			<tool-bar name="Menu3D" position="5" >
62
				<action-tool icon="images/encuadre.png" action-command="ENCUADRE" tooltip="gestion_encuadre" position="1"/>
62
				<action-tool icon="encuadrator-icon" action-command="ENCUADRE" tooltip="gestion_encuadre" position="1"/>
63 63
				<!-- <action-tool icon="images/InsertPoint.png" action-command="POINT3D" tooltip="insercion_de_puntos_3D" position="2"/> -->
64 64
			</tool-bar>
65 65
		</extension>
trunk/extensions/ext3Dgui/src/com/iver/ai2/gvsig3dgui/layer/MenuZoom3D.java
77 77
	}
78 78

  
79 79
	public void initialize() {
80
		
81
		// Register new icons
82
		// zoom to selection
83
		PluginServices.getIconTheme().registerDefault(
84
				"zoom-selection-icon",
85
				this.getClass().getClassLoader().getResource(
86
				"images/ZoomSeleccion.png"));
87
		// transparency
88
		PluginServices.getIconTheme().registerDefault(
89
				"transparency-icon",
90
				this.getClass().getClassLoader().getResource(
91
				"images/Alpha.png"));
92
		
93
		
80 94
		this.setActiva(true);
81 95
	}
82 96

  
trunk/extensions/ext3Dgui/src/com/iver/ai2/gvsig3dgui/navigation/NavigationMenu3D.java
20 20
import com.iver.andami.plugins.Extension;
21 21
import com.iver.andami.ui.mdiFrame.JMenuItem;
22 22
import com.iver.andami.ui.mdiFrame.JToolBarButton;
23
import com.iver.andami.ui.mdiFrame.NewStatusBar;
23 24
import com.iver.cit.gvsig.fmap.layers.FLayers;
24 25
import com.iver.cit.gvsig.project.documents.view.gui.FPanelLocConfig;
25 26

  
......
30 31

  
31 32
public class NavigationMenu3D extends Extension {
32 33

  
33

  
34 34
	private boolean activa = true;
35 35

  
36 36
	private NavigationMode navMode;
......
55 55
	private Cursor panCursor;
56 56

  
57 57
	private Cursor azimCursor;
58
	
58

  
59 59
	private String buttonPath;
60
	
61
	
62
	
60

  
63 61
	public void execute(String actionCommand) {
64 62
		// System.out.println("EXECUTE");
65 63

  
......
137 135
			resetCursor = false;
138 136
			if (vista3D.getPlanet().getCoordinateSystemType() != Planet.CoordinateSystemType.PROJECTED) {
139 137

  
140
				CustomTerrainManipulator ctm = ((PlanetViewer)vista3D.getCanvas3d()
141
						.getOSGViewer()).getCustomTerrainManipulator();
138
				CustomTerrainManipulator ctm = ((PlanetViewer) vista3D
139
						.getCanvas3d().getOSGViewer())
140
						.getCustomTerrainManipulator();
142 141

  
143 142
				JToolBarButton b = (JToolBarButton) PluginServices
144 143
						.getMainFrame().getComponentByName("NORTH");
......
182 181
			m_panelLoc.setPreferredSize(m_panelLoc.getSize());
183 182
		}
184 183

  
185
		
186
		//OJOOOOOOOOO CON ESTO Q ESTA COMENTADO PARA Q COMPILE HAY Q MIRAR COMO ARREGLARLO
184
		// OJOOOOOOOOO CON ESTO Q ESTA COMENTADO PARA Q COMPILE HAY Q MIRAR COMO
185
		// ARREGLARLO
187 186
		if (resetCursor)
188 187
			vista3D.getMapControl().setCurrentMapTool(null);
189 188
	}
190 189

  
191 190
	public void initialize() {
191

  
192
		// Register new icons
193
		// Default manipulator
194
		PluginServices.getIconTheme().registerDefault(
195
				"default-manipulator-icon",
196
				this.getClass().getClassLoader().getResource(
197
				"images/DefaultManipulator.png"));
198
		// Roll manipulator
199
		PluginServices.getIconTheme().registerDefault(
200
				"roll-manipulator-icon",
201
				this.getClass().getClassLoader().getResource(
202
				"images/RollManipulator.png"));
203
		// Zoom manipulator
204
		PluginServices.getIconTheme()
205
		.registerDefault(
206
				"zoom-manipulator-icon",
207
				this.getClass().getClassLoader().getResource(
208
				"images/zoom.png"));
209
		// Azimut manipulator
210
		PluginServices.getIconTheme().registerDefault(
211
				"azimut-manipulator-icon",
212
				this.getClass().getClassLoader().getResource(
213
				"images/AzimutManipulator.png"));
214
		// North disable
215
		PluginServices.getIconTheme().registerDefault(
216
				"north-disable-icon",
217
				this.getClass().getClassLoader().getResource(
218
				"images/NorthDes.png"));
219
		// North disable
220
		PluginServices.getIconTheme().registerDefault(
221
				"global-zoom-icon",
222
				this.getClass().getClassLoader().getResource(
223
				"images/Global.png"));
224
		
225
		
192 226
		this.setActiva(true);
193
		
194
		String oldPath = ResourcesFactory.getExtPath();// Save the path. 
195
		ResourcesFactory.setExtPath("/gvSIG/extensiones/com.iver.ai2.gvsig3dgui/images/");//my new path
227

  
228
		String oldPath = ResourcesFactory.getExtPath();// Save the path.
229
		ResourcesFactory
230
				.setExtPath("/gvSIG/extensiones/com.iver.ai2.gvsig3dgui/images/");// my
231
		// new
232
		// path
196 233
		buttonPath = ResourcesFactory.getResourcesPath();
197
		ResourcesFactory.setExtPath(oldPath);// Restore the old path. 
234
		ResourcesFactory.setExtPath(oldPath);// Restore the old path.
198 235
		System.out.println(oldPath);
199 236
		System.out.println(buttonPath);
200 237

  
201
		Image cursorImage = new ImageIcon(buttonPath+"NavigationCursor.gif").getImage();
202
		
238

  
239
		Image cursorImage = new ImageIcon(buttonPath + "NavigationCursor.gif")
240
				.getImage();
241

  
203 242
		navCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImage,
204 243
				new Point(16, 16), "");
205
		cursorImage = new ImageIcon(buttonPath+"/ZoomCursor.gif").getImage();
244
		cursorImage = new ImageIcon(buttonPath + "/ZoomCursor.gif").getImage();
206 245
		zoomCursor = Toolkit.getDefaultToolkit().createCustomCursor(
207 246
				cursorImage, new Point(16, 16), "");
208
		cursorImage = new ImageIcon(buttonPath+"/PanCursor.gif").getImage();
247
		cursorImage = new ImageIcon(buttonPath + "/PanCursor.gif").getImage();
209 248
		panCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImage,
210 249
				new Point(16, 16), "");
211
		cursorImage = new ImageIcon(buttonPath+"/AzimuthCursor.gif").getImage();
250
		cursorImage = new ImageIcon(buttonPath + "/AzimuthCursor.gif")
251
				.getImage();
212 252
		azimCursor = Toolkit.getDefaultToolkit().createCustomCursor(
213 253
				cursorImage, new Point(16, 16), "");
214 254

  
......
217 257
				.getMDIManager().getActiveWindow();
218 258

  
219 259
		// Getting Main menu bar
220
//		JMenuBar jMenuBar = PluginServices.getMainFrame().getJMenuBar();
260
		// JMenuBar jMenuBar = PluginServices.getMainFrame().getJMenuBar();
221 261

  
222 262
		PluginServices aux = PluginServices
223 263
				.getPluginServices("com.iver.cit.gvsig");
......
226 266
		menuPath[0] = new String("Vista");
227 267
		menuPath[1] = new String("navegacion");
228 268
		menuPath[2] = new String("Active_north");
229
		this.myMenu = (JMenuItem) PluginServices.getMainFrame().getMenuEntry(menuPath);
269
		this.myMenu = (JMenuItem) PluginServices.getMainFrame().getMenuEntry(
270
				menuPath);
230 271

  
231 272
		// Iterate over menu bar to get children menus
232
//		for (int i = 0; i < jMenuBar.getMenuCount(); i++) {
233
//			// Getting children
234
//			JMenu menu = jMenuBar.getMenu(i);
235
//			if (menu.getText().equalsIgnoreCase(aux.getText("Vista"))) {
236
//				// Getting children components
237
//				Component[] subMenus = menu.getMenuComponents();
238
//				// Iterate over children menu bar to get children menus
239
//				for (int t = 0; t < subMenus.length; t++) {
240
//					// Getting all children components
241
//					Component component = subMenus[t];
242
//					// Only get instance of JMenu
243
//					if (component instanceof JMenu) {
244
//						JMenu subMenuItem = (JMenu) component;
245
//						// Is "navegacion" menu
246
//						if (subMenuItem.getText().equalsIgnoreCase(
247
//								aux.getText("navegacion"))) {
248
//							// Search north option
249
//							for (int j = 0; j < subMenuItem.getItemCount(); j++) {
250
//								if (subMenuItem.getItem(j).getText()
251
//										.equalsIgnoreCase(
252
//												PluginServices.getText(this,
253
//														"Active_north"))) {
254
//									myMenu = (JMenuItem) subMenuItem.getItem(j);
255
//								}
256
//							}
257
//						}
258
//					}
259
//				}
260
//			}
261
//		}
273
		// for (int i = 0; i < jMenuBar.getMenuCount(); i++) {
274
		// // Getting children
275
		// JMenu menu = jMenuBar.getMenu(i);
276
		// if (menu.getText().equalsIgnoreCase(aux.getText("Vista"))) {
277
		// // Getting children components
278
		// Component[] subMenus = menu.getMenuComponents();
279
		// // Iterate over children menu bar to get children menus
280
		// for (int t = 0; t < subMenus.length; t++) {
281
		// // Getting all children components
282
		// Component component = subMenus[t];
283
		// // Only get instance of JMenu
284
		// if (component instanceof JMenu) {
285
		// JMenu subMenuItem = (JMenu) component;
286
		// // Is "navegacion" menu
287
		// if (subMenuItem.getText().equalsIgnoreCase(
288
		// aux.getText("navegacion"))) {
289
		// // Search north option
290
		// for (int j = 0; j < subMenuItem.getItemCount(); j++) {
291
		// if (subMenuItem.getItem(j).getText()
292
		// .equalsIgnoreCase(
293
		// PluginServices.getText(this,
294
		// "Active_north"))) {
295
		// myMenu = (JMenuItem) subMenuItem.getItem(j);
296
		// }
297
		// }
298
		// }
299
		// }
300
		// }
301
		// }
302
		// }
262 303

  
263 304
		if (myMenu != null) {
264 305

  
trunk/extensions/ext3Dgui/src/com/iver/ai2/gvsig3dgui/Extension3D.java
2 2

  
3 3
import javax.swing.JPopupMenu;
4 4

  
5
import com.iver.ai2.gvsig3d.resources.ResourcesFactory;
5 6
import com.iver.ai2.gvsig3dgui.tocMenu.TocRefreshLayer;
6 7
import com.iver.ai2.gvsig3dgui.tocMenu.TocTransparencyPanel;
7 8
import com.iver.andami.PluginServices;
......
23 24
		ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance();
24 25
	    extensionPoints.add("View_TocActions",PluginServices.getText(this, "Transparency"),new TocTransparencyPanel());
25 26
	    extensionPoints.add("View_TocActions",PluginServices.getText(this, "Layer_Refresh"),new TocRefreshLayer());
27

  
26 28
	}
27 29

  
28 30
	public boolean isEnabled() {
trunk/extensions/ext3Dgui/src/com/iver/ai2/gvsig3dgui/camera/Menu3D.java
90 90
	}
91 91

  
92 92
	public void initialize() {
93
		// Register new icons
94
		// extent manegement 
95
		PluginServices.getIconTheme().registerDefault(
96
				"encuadrator-icon",
97
				this.getClass().getClassLoader().getResource(
98
				"images/encuadre.png"));
99
		
100
		
101
		
93 102
		this.setActiva(true);
94 103

  
95 104
	}

Also available in: Unified diff