Revision 344

View differences:

2.0/trunk/org.gvsig.gvsig3d.app/org.gvsig.gvsig3d.app.extension/src/main/java/org/gvsig/gvsig3d/app/gui/styling/SimpleSymbolTab.java
63 63
		add(tabbedPane, BorderLayout.CENTER);
64 64
		
65 65
		JPanel panel = new JPanel();
66
		tabbedPane.addTab("Simple Marker", null, panel, null);
66
		tabbedPane.addTab("Marker", null, panel, null);
67 67
		GridBagLayout gbl_panel = new GridBagLayout();
68 68
		gbl_panel.columnWidths = new int[] { 175 };
69 69
		gbl_panel.rowHeights = new int[] { 180, 70 };
2.0/trunk/org.gvsig.gvsig3d.app/org.gvsig.gvsig3d.app.extension/src/main/java/org/gvsig/gvsig3d/app/gui/styling/PictureSymbolTab.java
30 30

  
31 31
import org.gvsig.gvsig3d.impl.symbology3d.marker.impl.NodeMarker3DSymbol;
32 32
import org.gvsig.gvsig3d.impl.symbology3d.marker.impl.PictureMarker3DSymbol;
33
import org.gvsig.gvsig3d.resources.ResourcesFactory;
33 34
import org.gvsig.gvsig3d.symbology3d.I3DSymbol;
34 35
import org.gvsig.gvsig3d.symbology3d.marker.ISimpleMarker3DSymbol;
35 36
import org.gvsig.osgvp.core.osg.Group;
......
65 66
		setLayout(new BorderLayout(0, 0));
66 67

  
67 68
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
68
		tabbedPane.setPreferredSize(new Dimension(180,300));
69
		tabbedPane.setPreferredSize(new Dimension(180, 300));
69 70
		add(tabbedPane, BorderLayout.CENTER);
70 71

  
71 72
		panel = new JPanel();
72
		tabbedPane.addTab("Picture Marker", null, panel, null);
73
		tabbedPane.addTab("Marker", null, panel, null);
73 74
		GridBagLayout gbl_panel = new GridBagLayout();
74 75
		gbl_panel.columnWidths = new int[] { 175 };
75 76
		gbl_panel.rowHeights = new int[] { 180, 70 };
......
91 92
		icon = new ImageIcon("");
92 93
		background = new JLabel(icon);
93 94
		previewPanel.add(background, BorderLayout.CENTER);
94
		
95

  
95 96
		_picturePanel = new JPanel();
96 97
		previewPanel.add(_picturePanel, BorderLayout.CENTER);
97 98
		_picturePanel.setLayout(new BorderLayout(0, 0));
98
		_picturePanel.add(new JLabel(scale(icon.getImage())), BorderLayout.CENTER);
99
		_picturePanel.add(new JLabel(scale(icon.getImage())),
100
				BorderLayout.CENTER);
99 101

  
100 102
		JPanel propertiesPanel = new JPanel();
101 103
		propertiesPanel.setBorder(new TitledBorder(null, "Properties",
......
138 140
					icon = new ImageIcon(_pictureURL);
139 141
					background = new JLabel(icon);
140 142
					_picturePanel.removeAll();
141
					_picturePanel.add(new JLabel(scale(icon.getImage())),BorderLayout.CENTER);
143
					_picturePanel.add(new JLabel(scale(icon.getImage())),
144
							BorderLayout.CENTER);
142 145
					PictureSymbolTab.this.repaint();
143 146

  
144 147
				} else {
......
150 153
				// _colorPanel.repaint();
151 154
				// symbolPreviewPanel.repaint();
152 155
				// ((SymbolSelector3D) _parent).setSymbol(_symbol);
153
				
156

  
154 157
			}
155 158
		});
156 159
		propertiesPanel.add(btnBrowse);
......
165 168
		sizeSpinner = new JSpinner();
166 169
		sizeSpinner.setModel(new SpinnerNumberModel(32.0, 1.0, 1000.0, 1.0));
167 170
		panel_3.add(sizeSpinner);
168
		
169
		propertiesPanel.setPreferredSize(new Dimension(80,80));
170 171

  
172
		propertiesPanel.setPreferredSize(new Dimension(80, 80));
173

  
171 174
		JPanel panel_4 = new JPanel();
172 175
		tabbedPane.addTab("Collection", null, panel_4, null);
173 176
		GridBagLayout gbl_panel_4 = new GridBagLayout();
174
		gbl_panel_4.columnWidths = new int[] { 220, 220, 0 };
177
		gbl_panel_4.columnWidths = new int[] { 15, 60, 15, 60 };
175 178
		gbl_panel_4.rowHeights = new int[] { 33, 33, 33, 0 };
176
		gbl_panel_4.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
177
		gbl_panel_4.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
179
		gbl_panel_4.columnWeights = new double[] { 0.0, 0.0 };
180
		gbl_panel_4.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0 };
178 181
		panel_4.setLayout(gbl_panel_4);
179 182

  
180 183
		JRadioButton rdbtnNewRadioButton = new JRadioButton("");
......
188 191
		JPanel panel_5 = new JPanel();
189 192
		GridBagConstraints gbc_panel_5 = new GridBagConstraints();
190 193
		gbc_panel_5.fill = GridBagConstraints.BOTH;
191
		gbc_panel_5.insets = new Insets(0, 0, 5, 0);
194
		gbc_panel_5.insets = new Insets(0, 0, 5, 5);
192 195
		gbc_panel_5.gridx = 1;
193 196
		gbc_panel_5.gridy = 0;
197

  
198
		panel_5.setLayout(new BorderLayout(0, 0));
199
		panel_5.add(new JLabel(new ImageIcon(PictureSymbolTab.class
200
				.getResource("/markers/fire.png"))));
194 201
		panel_4.add(panel_5, gbc_panel_5);
195 202

  
196 203
		JRadioButton rdbtnNewRadioButton_1 = new JRadioButton("");
197 204
		GridBagConstraints gbc_rdbtnNewRadioButton_1 = new GridBagConstraints();
198 205
		gbc_rdbtnNewRadioButton_1.fill = GridBagConstraints.BOTH;
199 206
		gbc_rdbtnNewRadioButton_1.insets = new Insets(0, 0, 5, 5);
200
		gbc_rdbtnNewRadioButton_1.gridx = 0;
201
		gbc_rdbtnNewRadioButton_1.gridy = 1;
207
		gbc_rdbtnNewRadioButton_1.gridx = 2;
208
		gbc_rdbtnNewRadioButton_1.gridy = 0;
202 209
		panel_4.add(rdbtnNewRadioButton_1, gbc_rdbtnNewRadioButton_1);
203 210

  
204 211
		JPanel panel_6 = new JPanel();
205 212
		GridBagConstraints gbc_panel_6 = new GridBagConstraints();
206 213
		gbc_panel_6.fill = GridBagConstraints.BOTH;
207 214
		gbc_panel_6.insets = new Insets(0, 0, 5, 0);
208
		gbc_panel_6.gridx = 1;
209
		gbc_panel_6.gridy = 1;
215
		gbc_panel_6.gridx = 3;
216
		gbc_panel_6.gridy = 0;
210 217
		panel_4.add(panel_6, gbc_panel_6);
218
		panel_6.setLayout(new BorderLayout(0, 0));
219
		panel_6.add(new JLabel(new ImageIcon(PictureSymbolTab.class
220
				.getResource("/markers/artgallery.png"))));
211 221

  
212 222
		JRadioButton rdbtnNewRadioButton_2 = new JRadioButton("");
213 223
		GridBagConstraints gbc_rdbtnNewRadioButton_2 = new GridBagConstraints();
214 224
		gbc_rdbtnNewRadioButton_2.fill = GridBagConstraints.BOTH;
215
		gbc_rdbtnNewRadioButton_2.insets = new Insets(0, 0, 0, 5);
225
		gbc_rdbtnNewRadioButton_2.insets = new Insets(0, 0, 5, 5);
216 226
		gbc_rdbtnNewRadioButton_2.gridx = 0;
217
		gbc_rdbtnNewRadioButton_2.gridy = 2;
227
		gbc_rdbtnNewRadioButton_2.gridy = 1;
218 228
		panel_4.add(rdbtnNewRadioButton_2, gbc_rdbtnNewRadioButton_2);
219 229

  
220 230
		JPanel panel_7 = new JPanel();
221 231
		GridBagConstraints gbc_panel_7 = new GridBagConstraints();
232
		gbc_panel_7.insets = new Insets(0, 0, 5, 5);
222 233
		gbc_panel_7.fill = GridBagConstraints.BOTH;
223 234
		gbc_panel_7.gridx = 1;
224
		gbc_panel_7.gridy = 2;
235
		gbc_panel_7.gridy = 1;
225 236
		panel_4.add(panel_7, gbc_panel_7);
237
		panel_7.setLayout(new BorderLayout(0, 0));
238
		panel_7.add(new JLabel(new ImageIcon(PictureSymbolTab.class
239
				.getResource("/markers/taxi.png"))));
226 240

  
227
	}
241
		JRadioButton radioButton = new JRadioButton("");
242
		GridBagConstraints gbc_radioButton = new GridBagConstraints();
243
		gbc_radioButton.insets = new Insets(0, 0, 5, 5);
244
		gbc_radioButton.gridx = 2;
245
		gbc_radioButton.gridy = 1;
246
		panel_4.add(radioButton, gbc_radioButton);
247
     
248
		JPanel panel_8 = new JPanel();
249
		GridBagConstraints gbc_panel_8 = new GridBagConstraints();
250
		gbc_panel_8.insets = new Insets(0, 0, 5, 5);
251
		gbc_panel_8.fill = GridBagConstraints.BOTH;
252
		gbc_panel_8.gridx = 3;
253
		gbc_panel_8.gridy = 1;
254
		panel_4.add(panel_8, gbc_panel_8);
255
		panel_8.setLayout(new BorderLayout(0, 0));
256
		panel_8.add(new JLabel(new ImageIcon(PictureSymbolTab.class
257
				.getResource("/markers/airport_runway.png"))));
228 258

  
259
		JRadioButton radioButton2 = new JRadioButton("");
260
		GridBagConstraints gbc_radioButton2 = new GridBagConstraints();
261
		gbc_radioButton2.insets = new Insets(0, 0, 5, 5);
262
		gbc_radioButton2.gridx = 0;
263
		gbc_radioButton2.gridy = 2;
264
		panel_4.add(radioButton2, gbc_radioButton2);
229 265

  
266
		JPanel panel_9 = new JPanel();
267
		GridBagConstraints gbc_panel_9 = new GridBagConstraints();
268
		gbc_panel_9.insets = new Insets(0, 0, 5, 5);
269
		gbc_panel_9.fill = GridBagConstraints.BOTH;
270
		gbc_panel_9.gridx = 1;
271
		gbc_panel_9.gridy = 2;
272
		panel_4.add(panel_9, gbc_panel_9);
273
		panel_9.setLayout(new BorderLayout(0, 0));
274
		panel_9.add(new JLabel(new ImageIcon(PictureSymbolTab.class
275
				.getResource("/markers/mall.png"))));
230 276

  
277
		JRadioButton radioButton3 = new JRadioButton("");
278
		GridBagConstraints gbc_radioButton3 = new GridBagConstraints();
279
		gbc_radioButton3.insets = new Insets(0, 0, 5, 5);
280
		gbc_radioButton3.gridx = 2;
281
		gbc_radioButton3.gridy = 2;
282
		panel_4.add(radioButton3, gbc_radioButton3);
283

  
284
		JPanel panel_10 = new JPanel();
285
		GridBagConstraints gbc_panel_10 = new GridBagConstraints();
286
		gbc_panel_10.insets = new Insets(0, 0, 5, 5);
287
		gbc_panel_10.fill = GridBagConstraints.BOTH;
288
		gbc_panel_10.gridx = 3;
289
		gbc_panel_10.gridy = 2;
290
		panel_4.add(panel_10, gbc_panel_10);
291
		panel_10.setLayout(new BorderLayout(0, 0));
292
		panel_10.add(new JLabel(new ImageIcon(PictureSymbolTab.class
293
				.getResource("/markers/rodent.png"))));
294

  
295
		JRadioButton radioButton4 = new JRadioButton("");
296
		GridBagConstraints gbc_radioButton4 = new GridBagConstraints();
297
		gbc_radioButton4.insets = new Insets(0, 0, 5, 5);
298
		gbc_radioButton4.gridx = 0;
299
		gbc_radioButton4.gridy = 3;
300
		panel_4.add(radioButton4, gbc_radioButton4);
301

  
302
		JPanel panel_11 = new JPanel();
303
		GridBagConstraints gbc_panel_11 = new GridBagConstraints();
304
		gbc_panel_11.insets = new Insets(0, 0, 5, 5);
305
		gbc_panel_11.fill = GridBagConstraints.BOTH;
306
		gbc_panel_11.gridx = 1;
307
		gbc_panel_11.gridy = 3;
308
		panel_4.add(panel_11, gbc_panel_11);
309
		panel_11.setLayout(new BorderLayout(0, 0));
310
		panel_11.add(new JLabel(new ImageIcon(PictureSymbolTab.class
311
				.getResource("/markers/wrestling-2.png"))));
312

  
313
		JRadioButton radioButton5 = new JRadioButton("");
314
		GridBagConstraints gbc_radioButton5 = new GridBagConstraints();
315
		gbc_radioButton5.insets = new Insets(0, 0, 5, 5);
316
		gbc_radioButton5.gridx = 2;
317
		gbc_radioButton5.gridy = 3;
318
		panel_4.add(radioButton5, gbc_radioButton5);
319

  
320
		JPanel panel_12 = new JPanel();
321
		GridBagConstraints gbc_panel_12 = new GridBagConstraints();
322
		gbc_panel_12.insets = new Insets(0, 0, 5, 5);
323
		gbc_panel_12.fill = GridBagConstraints.BOTH;
324
		gbc_panel_12.gridx = 3;
325
		gbc_panel_12.gridy = 3;
326
		panel_4.add(panel_12, gbc_panel_12);
327
		panel_12.setLayout(new BorderLayout(0, 0));
328
		panel_12.add(new JLabel(new ImageIcon(PictureSymbolTab.class
329
				.getResource("/markers/zoo.png"))));
330

  
331
	}
332

  
231 333
	public I3DSymbol getNewSymbol() {
232 334
		// TODO Auto-generated method stub
233 335
		_symbol = new PictureMarker3DSymbol();
234
		((PictureMarker3DSymbol) _symbol).setPictureFileURL(_pictureURL);
235
		((PictureMarker3DSymbol) _symbol).setSize((Double) sizeSpinner.getValue());
336

  
337
		if (panel.isVisible()) {
338
			((PictureMarker3DSymbol) _symbol).setPictureFileURL(_pictureURL);
339
			((PictureMarker3DSymbol) _symbol).setSize((Double) sizeSpinner
340
					.getValue());
341
		} else {
342

  
343
			((PictureMarker3DSymbol) _symbol).setPictureFileURL(PictureSymbolTab.class
344
					.getResource("/markers/taxi.png").getPath());
345
			((PictureMarker3DSymbol) _symbol).setSize((Double) sizeSpinner
346
					.getValue());
347
			
348
		}
236 349
		return _symbol;
237 350
	}
238 351

  
......
242 355
		icon = new ImageIcon(_pictureURL);
243 356
		background = new JLabel(icon);
244 357
		_picturePanel.removeAll();
245
		_picturePanel.add(new JLabel(scale(icon.getImage())),BorderLayout.CENTER);
358
		_picturePanel.add(new JLabel(scale(icon.getImage())),
359
				BorderLayout.CENTER);
246 360
		background.repaint();
247 361
		panel.repaint();
248
		sizeSpinner.setValue( ((PictureMarker3DSymbol) symbol).getSize());
362
		sizeSpinner.setValue(((PictureMarker3DSymbol) symbol).getSize());
249 363
		// System.out.println("Setting text" + _pictureURL);
250 364
		textField.setText(_pictureURL);
251 365
		// loadFile();
......
277 391
			return "Supported Image Types";
278 392
		}
279 393
	}
280
	
394

  
281 395
	private ImageIcon scale(Image src) {
282 396
		int w = 115;
283 397
		int h = 115;
2.0/trunk/org.gvsig.gvsig3d.app/org.gvsig.gvsig3d.app.extension/src/main/java/org/gvsig/gvsig3d/app/gui/styling/Object3DSymbolTab.java
33 33
import org.gvsig.osgvp.exceptions.node.LoadNodeException;
34 34
import org.gvsig.osgvp.viewer.IViewerContainer;
35 35
import org.gvsig.osgvp.viewer.ViewerFactory;
36
import javax.swing.JComboBox;
37
import javax.swing.DefaultComboBoxModel;
36 38

  
37 39
public class Object3DSymbolTab extends JPanel implements ISymbolSelectorTab {
38 40

  
39 41
	private JTextField textField;
40 42

  
41 43
	private IViewerContainer _canvas3d;
44
	private IViewerContainer _alternateCanvas3d;
42 45

  
43 46
	private ISimpleMarker3DSymbol _symbol;
44 47
	private String _nodeURL = "";
45 48

  
46 49
	private JSpinner sizeSpinner;
47 50

  
51
	private JComboBox _comboBox;
52

  
48 53
	/**
49 54
	 * Create the panel.
50 55
	 */
......
56 61
		add(tabbedPane, BorderLayout.CENTER);
57 62

  
58 63
		JPanel panel = new JPanel();
59
		tabbedPane.addTab("Node Marker", null, panel, null);
64
		tabbedPane.addTab("Marker", null, panel, null);
60 65
		GridBagLayout gbl_panel = new GridBagLayout();
61 66
		gbl_panel.columnWidths = new int[] { 175 };
62 67
		gbl_panel.rowHeights = new int[] { 180, 70 };
......
156 161
		JPanel panel_4 = new JPanel();
157 162
		tabbedPane.addTab("Collection", null, panel_4, null);
158 163
		GridBagLayout gbl_panel_4 = new GridBagLayout();
159
		gbl_panel_4.columnWidths = new int[] { 220, 220, 0 };
160
		gbl_panel_4.rowHeights = new int[] { 33, 33, 33, 0 };
161
		gbl_panel_4.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
162
		gbl_panel_4.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
164
		gbl_panel_4.columnWidths = new int[] { 175 };
165
		gbl_panel_4.rowHeights = new int[] { 250, 45 };
166
		gbl_panel_4.columnWeights = new double[] { 1.0 };
167
		gbl_panel_4.rowWeights = new double[] { 1.0, 0.0};
163 168
		panel_4.setLayout(gbl_panel_4);
169
		
170
		JPanel panel_1 = new JPanel();
171
		panel_1.setBorder(new TitledBorder(null, "Preview", TitledBorder.LEADING, TitledBorder.TOP, null, null));
172
		GridBagConstraints gbc_panel_1 = new GridBagConstraints();
173
		gbc_panel_1.insets = new Insets(0, 0, 5, 0);
174
		gbc_panel_1.fill = GridBagConstraints.BOTH;
175
		gbc_panel_1.gridx = 0;
176
		gbc_panel_1.gridy = 0;
177
		panel_4.add(panel_1, gbc_panel_1);
178
		panel_1.setLayout(new BorderLayout(0, 0));
179
		
180
		panel_1.add(getAlternateOsgPanel());
181
		
182
		_comboBox = new JComboBox();
183
		_comboBox.addActionListener(new ActionListener() {
184
			public void actionPerformed(ActionEvent arg0) {
185
				
186
				switch(_comboBox.getSelectedIndex()){
187
				
188
				case 0:
189
					_nodeURL=Object3DSymbolTab.class.getResource("/particle/fire.osgb").getPath();
190
					break;
191
				case 1:
192
					_nodeURL=Object3DSymbolTab.class.getResource("/particle/radial.osgb").getPath();
193
					break;
194
				case 2:
195
					_nodeURL=Object3DSymbolTab.class.getResource("/particle/space.osgb").getPath();
196
					break;
197
				case 3:
198
					_nodeURL=Object3DSymbolTab.class.getResource("/particle/trisistema.osgb").getPath();
199
					break;
200
					
201
				default: 
202
					break;			
203
				
204
				}	
205
				
206
				try {
207
					Node node = osgDB.readNodeFile(_nodeURL);
208
					_alternateCanvas3d.getOSGViewer().setSceneData(node);
209
				} catch (LoadNodeException e) {
210
					// TODO Auto-generated catch block
211
					e.printStackTrace();
212
				} catch (FileNotFoundException e) {
213
					// TODO Auto-generated catch block
214
					e.printStackTrace();
215
				}
216
				
217
			}
218
		});
219
		_comboBox.setModel(new DefaultComboBoxModel(new String[] {"Fire", "Radial", "Space", "Flare"}));
220
		GridBagConstraints gbc_comboBox = new GridBagConstraints();
221
		gbc_comboBox.fill = GridBagConstraints.HORIZONTAL;
222
		gbc_comboBox.gridx = 0;
223
		gbc_comboBox.gridy = 1;
224
		panel_4.add(_comboBox, gbc_comboBox);
164 225

  
165
		JRadioButton rdbtnNewRadioButton = new JRadioButton("");
166
		GridBagConstraints gbc_rdbtnNewRadioButton = new GridBagConstraints();
167
		gbc_rdbtnNewRadioButton.anchor = GridBagConstraints.WEST;
168
		gbc_rdbtnNewRadioButton.insets = new Insets(0, 0, 5, 5);
169
		gbc_rdbtnNewRadioButton.gridx = 0;
170
		gbc_rdbtnNewRadioButton.gridy = 0;
171
		panel_4.add(rdbtnNewRadioButton, gbc_rdbtnNewRadioButton);
226
	}
172 227

  
173
		JPanel panel_5 = new JPanel();
174
		GridBagConstraints gbc_panel_5 = new GridBagConstraints();
175
		gbc_panel_5.fill = GridBagConstraints.BOTH;
176
		gbc_panel_5.insets = new Insets(0, 0, 5, 0);
177
		gbc_panel_5.gridx = 1;
178
		gbc_panel_5.gridy = 0;
179
		panel_4.add(panel_5, gbc_panel_5);
228
	private JPanel getOsgPanel() {
180 229

  
181
		JRadioButton rdbtnNewRadioButton_1 = new JRadioButton("");
182
		GridBagConstraints gbc_rdbtnNewRadioButton_1 = new GridBagConstraints();
183
		gbc_rdbtnNewRadioButton_1.fill = GridBagConstraints.BOTH;
184
		gbc_rdbtnNewRadioButton_1.insets = new Insets(0, 0, 5, 5);
185
		gbc_rdbtnNewRadioButton_1.gridx = 0;
186
		gbc_rdbtnNewRadioButton_1.gridy = 1;
187
		panel_4.add(rdbtnNewRadioButton_1, gbc_rdbtnNewRadioButton_1);
230
		int size = 140;
231
		JPanel aux3 = new JPanel();
232
		aux3.setPreferredSize(new Dimension(size, size));
188 233

  
189
		JPanel panel_6 = new JPanel();
190
		GridBagConstraints gbc_panel_6 = new GridBagConstraints();
191
		gbc_panel_6.fill = GridBagConstraints.BOTH;
192
		gbc_panel_6.insets = new Insets(0, 0, 5, 0);
193
		gbc_panel_6.gridx = 1;
194
		gbc_panel_6.gridy = 1;
195
		panel_4.add(panel_6, gbc_panel_6);
234
		if (_canvas3d == null) {
235
			_canvas3d = ViewerFactory.getInstance().createViewer(
236
					ViewerFactory.VIEWER_TYPE.CANVAS_VIEWER, null);
237
			_canvas3d.setSize(size, size);
238
			// _canvas3d.getOSGViewer().setClearColor(1.0, 1.0, 1.0, 0.0);
239
			ViewerFactory.getInstance().startAnimator();
240
		}
196 241

  
197
		JRadioButton rdbtnNewRadioButton_2 = new JRadioButton("");
198
		GridBagConstraints gbc_rdbtnNewRadioButton_2 = new GridBagConstraints();
199
		gbc_rdbtnNewRadioButton_2.fill = GridBagConstraints.BOTH;
200
		gbc_rdbtnNewRadioButton_2.insets = new Insets(0, 0, 0, 5);
201
		gbc_rdbtnNewRadioButton_2.gridx = 0;
202
		gbc_rdbtnNewRadioButton_2.gridy = 2;
203
		panel_4.add(rdbtnNewRadioButton_2, gbc_rdbtnNewRadioButton_2);
242
		loadFile();
204 243

  
205
		JPanel panel_7 = new JPanel();
206
		GridBagConstraints gbc_panel_7 = new GridBagConstraints();
207
		gbc_panel_7.fill = GridBagConstraints.BOTH;
208
		gbc_panel_7.gridx = 1;
209
		gbc_panel_7.gridy = 2;
210
		panel_4.add(panel_7, gbc_panel_7);
244
		aux3.add((Component) _canvas3d);
211 245

  
246
		return aux3;
212 247
	}
213 248

  
214
	private JPanel getOsgPanel() {
249
	private JPanel getAlternateOsgPanel() {
215 250

  
216 251
		int size = 140;
217 252
		JPanel aux3 = new JPanel();
218 253
		aux3.setPreferredSize(new Dimension(size, size));
219 254

  
220
		if (_canvas3d == null) {
221
			_canvas3d = ViewerFactory.getInstance().createViewer(
255
		if (_alternateCanvas3d == null) {
256
			_alternateCanvas3d = ViewerFactory.getInstance().createViewer(
222 257
					ViewerFactory.VIEWER_TYPE.CANVAS_VIEWER, null);
223
			_canvas3d.setSize(size, size);
258
			_alternateCanvas3d.setSize(size, size);
224 259
			// _canvas3d.getOSGViewer().setClearColor(1.0, 1.0, 1.0, 0.0);
225 260
			ViewerFactory.getInstance().startAnimator();
226 261
		}
227 262

  
228 263
		loadFile();
229 264

  
230
		aux3.add((Component) _canvas3d);
265
		aux3.add((Component) _alternateCanvas3d);
231 266

  
232 267
		return aux3;
233 268
	}

Also available in: Unified diff