Statistics
| Revision:

svn-gvsig-desktop / branches / v02_desarrollo / libraries / libCq CMS for java.old / src / org / cresques / px / dxf / DxfEntity.java @ 1607

History | View | Annotate | Download (1.26 KB)

1
/*
2
 * Created on 05-may-2004
3
 */
4
 
5
package org.cresques.px.dxf;
6

    
7
import org.cresques.cts.ICoordTrans;
8
import org.cresques.cts.IProjection;
9
import org.cresques.geo.Projected;
10

    
11
import org.cresques.px.PxObj;
12

    
13
/**
14
 * Clase ancestro para las entidades de dxf
15
 * jmorell: Implementaci?n del handle imprescindible para el formato DXF2000.
16
 * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
17
 */
18

    
19
public abstract class DxfEntity extends PxObj implements Projected  {
20
        IProjection proj = null;
21
        DxfLayer layer = null;
22
        //int dxfColor = 256;
23
        int dxfColor = 0;
24
        
25
        int entitiesFollow = 0;
26
        boolean space = false; // false --> model space, true paper space;
27
        
28
        private int handle;
29

    
30
        public DxfEntity(IProjection proj, DxfLayer layer) {
31
                setProjection(proj);
32
                this.layer = layer;
33
        }
34

    
35
        public void setProjection(IProjection p) { proj = p; }
36
        public IProjection getProjection() { return proj; }
37

    
38
        abstract public void reProject(ICoordTrans ct);
39
        
40
        public String getLayerName()
41
        {
42
                return layer.getName();
43
        }
44
        public String getColor()
45
        {
46
                return "" + dxfColor;
47
        }
48

    
49
        abstract public String toDxfString();
50
        /**
51
         * @return Returns the handle.
52
         */
53
        public int getHandle() {
54
                return handle;
55
        }
56
        /**
57
         * @param handle The handle to set.
58
         */
59
        public void setHandle(int handle) {
60
                this.handle = handle;
61
        }
62
}