Revision 25862 trunk/libraries/lib3DMap-share/src/main/java/com/iver/ai2/gvsig3d/map3d/layers/Layer3DProps.java

View differences:

Layer3DProps.java
33 33
import com.iver.utiles.XMLEntity;
34 34
import com.iver.utiles.xmlEntity.generate.XmlTag;
35 35

  
36
/**
37
 * This class is used to manage all the 3d properties that the layer has.
38
 * 
39
 * @author Salvador Bayarri
40
 * @author Julio Campos 
41
 *
42
 */
36 43
public class Layer3DProps implements IPersistence {
37 44

  
38 45
	// types of 3D layers
......
75 82
	
76 83
	private boolean isEditing = false;
77 84

  
78
	public boolean isEditing() {
79
		return isEditing;
80
	}
81 85

  
82
	public void setEditing(boolean isEditing) {
83
		this.isEditing = isEditing;
84
	}
85

  
86
	/**
87
	 * the constructor 
88
	 */
86 89
	public Layer3DProps() {
87 90
		m_tocOrder = -1; // not set
88 91
		m_planetOrder = -1;
89 92
	}
90 93

  
94
	/**
95
	 * This method make an instance of the 3D props of the layer that get from parameters
96
	 * 
97
	 * @param layer 
98
	 * @return the properties
99
	 */
91 100
	public static Layer3DProps getLayer3DProps(FLayer layer) {
92 101
		FLyrDefault baseLayer = (FLyrDefault) layer;
93 102
		Object propsObj = baseLayer.getProperty("3DLayerExtension");
......
104 113
		return props3D;
105 114
	}
106 115

  
116
	/**
117
	 * Return The editing state
118
	 * 
119
	 * @return true->editing. false->not editing 
120
	 */
121
	public boolean isEditing() {
122
		return isEditing;
123
	}
124
	
125
	/**
126
	 * Set the editing state
127
	 * 
128
	 * @param true->editing. false->not editing
129
	 */
130
	public void setEditing(boolean isEditing) {
131
		this.isEditing = isEditing;
132
	}
133
	
107 134
	public void setChooseType(boolean bChoose) {
108 135
		m_bChooseType = bChoose;
109 136
	}
......
116 143
		m_hooked = hooked;
117 144
	}
118 145

  
146
	/**
147
	 * Setting the layer
148
	 * 
149
	 * @param layer
150
	 */
119 151
	public void setLayer(FLayer layer) {
120 152

  
121 153
		if (m_layer == layer)
......
205 237
		}
206 238
	}
207 239

  
240
	/**
241
	 * Initialize the cache name for the layer. It uses the planet type the view projection and the type o coordinates 
242
	 * 
243
	 * @param planetType
244
	 * @param viewProj
245
	 * @param geocentricCoordinates
246
	 */
208 247
	public void initCacheName(int planetType, IProjection viewProj,
209 248
			int geocentricCoordinates) {
210 249
		// TODO: use full path of source or service, not just layer name
......
277 316
		}
278 317
	}
279 318

  
319
	/**
320
	 * Return the cacheService of this layer. It depends of the type of the layer.
321
	 * 
322
	 * @return
323
	 */
280 324
	public CacheService getCacheService() {
281 325
		return m_cacheService;
282 326
	}
283 327

  
328
	/**
329
	 * Set the cacheService of this layer. It depends of the type of the layer.
330
	 * 
331
	 * @param srv
332
	 */
284 333
	public void setCacheService(CacheService srv) {
285 334
		m_cacheService = srv;
286 335
	}
287 336

  
337
	/**
338
	 * Set the type of this layer
339
	 * 
340
	 * @param type
341
	 */
288 342
	public void setType(int type) {
289 343
		m_type = type;
290 344
	}
291 345

  
346
	/**
347
	 * Get the type of the layer
348
	 * 
349
	 * @return
350
	 */
292 351
	public int getType() {
293 352
		return m_type;
294 353
	}
295 354

  
355
	/**
356
	 * Set the toc order of this layer
357
	 * 
358
	 * @param order
359
	 */
296 360
	public void setTocOrder(int order) {
297 361
		m_tocOrder = order;
298 362
	}
299 363

  
364
	/**
365
	 * Get the toc order of this layer
366
	 * 
367
	 * @return
368
	 */
300 369
	public int getTocOrder() {
301 370
		return m_tocOrder;
302 371
	}
303 372

  
373
	/**
374
	 * Set the planet order of this layer
375
	 * 
376
	 * @param order
377
	 */
304 378
	public void setPlanetOrder(int order) {
305 379
		m_planetOrder = order;
306 380
	}
307 381

  
382
	/**
383
	 * Get the planet order of this layer
384
	 * 
385
	 * @return
386
	 */
308 387
	public int getPlanetOrder() {
309 388
		return m_planetOrder;
310 389
	}
311 390

  
391
	/**
392
	 * Get the cache name for this layer
393
	 * 
394
	 * @return
395
	 */
312 396
	public String getCacheName() {
313 397
		return m_cacheName;
314 398
	}
......
379 463
		return this.getClass().getName();
380 464
	}
381 465

  
466
	/* (non-Javadoc)
467
	 * @see com.iver.utiles.IPersistence#getXMLEntity()
468
	 */
382 469
	public XMLEntity getXMLEntity() {
383 470
		XMLEntity xml = new XMLEntity();
384 471

  
......
391 478
		return xml;
392 479
	}
393 480

  
481
	/* (non-Javadoc)
482
	 * @see com.iver.utiles.IPersistence#setXMLEntity(com.iver.utiles.XMLEntity)
483
	 */
394 484
	public void setXMLEntity(XMLEntity xml) {
395 485
		if (xml.contains("type")) {
396 486
			m_bChooseType = false;
......
406 496
			m_cacheName = xml.getStringProperty("cacheName");
407 497
	}
408 498

  
499
	/**
500
	 * Return the opacity of this layer
501
	 * 
502
	 * @return
503
	 */
409 504
	public float getOpacity() {
410 505
		return m_opacity;
411 506
	}
412 507

  
508
	/**
509
	 * Set the opacity of this layer
510
	 * 
511
	 * @param A value between 0 and 1 
512
	 */
413 513
	public void setOpacity(float m_opacity) {
414 514
		this.m_opacity = m_opacity;
415 515
	}
416 516

  
517
	/**
518
	 * Get the vertical exaggeration for this layer
519
	 * 
520
	 * @return
521
	 */
417 522
	public float getVerticalEx() {
418 523
		return m_verticalEx;
419 524
	}
420 525

  
526
	/**
527
	 * Get the vertical exaggeration from this layer
528
	 * 
529
	 * @param ex
530
	 */
421 531
	public void setVerticalEx(float ex) {
422 532
		m_verticalEx = ex;
423 533
	}
424 534

  
535
	/**
536
	 * Get the height that this layer has when it draws in 3D
537
	 * 
538
	 * @return
539
	 */
425 540
	public float getHeigth() {
426 541
		return m_heigth;
427 542
	}
428 543

  
544
	/**
545
	 * Set the height that this layer has when it draws in 3D
546
	 * 
547
	 * @param heigth
548
	 */
429 549
	public void setHeigth(float m_heigth) {
430 550
		this.m_heigth = m_heigth;
431 551
	}
432 552

  
553
	/**
554
	 * If the features of this layer have z value this method will return true. In the other case it will return false
555
	 * 
556
	 * @return
557
	 */
433 558
	public boolean isZEnable() {
434 559
		return m_Zenable;
435 560
	}
436 561

  
562
	/**
563
	 * Set the z enable
564
	 * 
565
	 * @param zenable
566
	 */
437 567
	public void setZEnable(boolean zenable) {
438 568
		m_Zenable = zenable;
439 569
	}
440 570

  
571
	/**
572
	 * It is to know if this layer is new. It only works with the OSG layers
573
	 * 
574
	 * @return
575
	 */
441 576
	public boolean isNewLayerOSG() {
442 577
		return newLayerOSG;
443 578
	}
444 579

  
580
	/**
581
	 * Set if this layer is new. It only works with OSG layers.
582
	 * 
583
	 * @param newLayerOSG
584
	 */
445 585
	public void setNewLayerOSG(boolean newLayerOSG) {
446 586
		this.newLayerOSG = newLayerOSG;
447 587
	}

Also available in: Unified diff