Revision 9524 branches/piloto3d/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayer.java
FLayer.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package com.iver.cit.gvsig.fmap.layers; |
42 | 42 |
|
43 |
import java.awt.Graphics2D; |
|
44 |
import java.awt.geom.Rectangle2D; |
|
45 |
import java.awt.image.BufferedImage; |
|
46 |
import java.util.List; |
|
47 |
|
|
48 |
import javax.print.attribute.PrintRequestAttributeSet; |
|
49 |
import javax.swing.ImageIcon; |
|
50 |
|
|
51 |
import org.cresques.cts.ICoordTrans; |
|
52 |
import org.cresques.geo.Projected; |
|
53 |
|
|
43 | 54 |
import com.iver.cit.gvsig.fmap.DriverException; |
44 | 55 |
import com.iver.cit.gvsig.fmap.MapContext; |
45 | 56 |
import com.iver.cit.gvsig.fmap.ViewPort; |
46 | 57 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
47 | 58 |
import com.iver.cit.gvsig.fmap.edition.EditionException; |
48 |
|
|
49 | 59 |
import com.iver.utiles.XMLEntity; |
50 | 60 |
import com.iver.utiles.swing.threads.Cancellable; |
51 | 61 |
|
52 |
import org.cresques.cts.ICoordTrans; |
|
53 | 62 |
|
54 |
import org.cresques.geo.Projected; |
|
55 |
|
|
56 |
import java.awt.Graphics2D; |
|
57 |
import java.awt.geom.Rectangle2D; |
|
58 |
import java.awt.image.BufferedImage; |
|
59 |
|
|
60 |
import javax.swing.ImageIcon; |
|
61 |
|
|
62 |
|
|
63 | 63 |
/** |
64 | 64 |
* Interfaz que tienen que implementar todas las capas. |
65 | 65 |
*/ |
... | ... | |
200 | 200 |
* |
201 | 201 |
* @throws DriverException |
202 | 202 |
*/ |
203 |
void print(Graphics2D g, ViewPort viewPort, Cancellable cancel,double scale)
|
|
203 |
void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, PrintRequestAttributeSet properties)
|
|
204 | 204 |
throws DriverException; |
205 | 205 |
|
206 | 206 |
/** |
... | ... | |
304 | 304 |
|
305 | 305 |
public void setCacheImageDrawnLayers(BufferedImage cacheImageDrawnLayers); |
306 | 306 |
|
307 |
|
|
307 | 308 |
/** |
309 |
* Returns the status of the layer |
|
310 |
*/ |
|
311 |
public FLayerStatus getFLayerStatus(); |
|
312 |
/** |
|
313 |
* Sets the status of the layer |
|
314 |
* @param status |
|
315 |
*/ |
|
316 |
public void setFLayerStatus(FLayerStatus status); |
|
317 |
|
|
318 |
|
|
319 |
/* |
|
320 |
* This stuff is to save error's info that causes |
|
321 |
* unavailable status. |
|
322 |
* */ |
|
323 |
/** |
|
324 |
* Return if the layer is in OK status |
|
325 |
* (it hasnt got errors) |
|
326 |
*/ |
|
327 |
public boolean isOk(); |
|
328 |
/** |
|
329 |
* returns the number of errors that causes layer |
|
330 |
* unavailable status |
|
331 |
* @return |
|
332 |
*/ |
|
333 |
public int getNumErrors(); |
|
334 |
|
|
335 |
/** |
|
336 |
* return the specified error |
|
337 |
* @param i |
|
338 |
* @return |
|
339 |
*/ |
|
340 |
public DriverException getError(int i); |
|
341 |
|
|
342 |
/** |
|
343 |
* add an error cause to describe the layer's wrong status |
|
344 |
* @param error |
|
345 |
*/ |
|
346 |
public void addError(DriverException error); |
|
347 |
|
|
348 |
/** |
|
349 |
* Returns a list with all layer errors |
|
350 |
* @return |
|
351 |
*/ |
|
352 |
public List getErrors(); |
|
353 |
|
|
354 |
|
|
355 |
/** |
|
308 | 356 |
* @return set layer aviable or not. |
309 | 357 |
*/ |
310 | 358 |
public void setAvailable(boolean available); |
... | ... | |
345 | 393 |
* edits in itself. |
346 | 394 |
*/ |
347 | 395 |
public boolean isWritable(); |
396 |
|
|
397 |
/** |
|
398 |
* Useful to associate any object to a layer. For example, you |
|
399 |
* can attach a network definition to key "network" and |
|
400 |
* check if a layer has a network loaded if getAssociatedObject("network") |
|
401 |
* is not null |
|
402 |
* |
|
403 |
* @param key |
|
404 |
* @return null if key is not found |
|
405 |
*/ |
|
406 |
public Object getProperty(Object key); |
|
407 |
|
|
408 |
/** |
|
409 |
* @param key |
|
410 |
* @param obj |
|
411 |
*/ |
|
412 |
public void setProperty(Object key, Object obj); |
|
348 | 413 |
|
414 |
/** |
|
415 |
* This method can be used to have a fast cloned layer. The implementations should take care of |
|
416 |
* NOT recreate the layer. Instead of this, is better to use the same source (driver) and deepclone |
|
417 |
* the legend. Exception=> the labels aren't deepcloned to avoid memory consumption. |
|
418 |
* Note: Labels are memory consuming to speed up layers like PostGIS and so on. |
|
419 |
* @return clonedLayer |
|
420 |
* @throws Exception |
|
421 |
*/ |
|
422 |
public FLayer cloneLayer() throws Exception; |
|
349 | 423 |
|
424 |
|
|
350 | 425 |
} |
Also available in: Unified diff