Statistics
| Revision:

svn-gvsig-desktop / branches / CqCMSDvp / libraries / libCq CMS for java.old / src / org / cresques / px / dxf / DxfTableItem.java @ 2669

History | View | Annotate | Download (2.72 KB)

1
/*
2
 * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
3
 *
4
 * Copyright (C) 2004-5.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 * cresques@gmail.com
23
 */
24
package org.cresques.px.dxf;
25

    
26
import org.cresques.io.DxfGroup;
27

    
28

    
29
/** Classe repr?sentant une table fichier DXF. */
30
public class DxfTableItem {
31
    public final static DxfGroup ENDTAB = new DxfGroup(0, "ENDTAB");
32
    public final static DxfGroup APPID = new DxfGroup(0, "APPID");
33
    public final static DxfGroup DIMSTYLE = new DxfGroup(0, "DIMSTYLE");
34
    public final static DxfGroup LAYER = new DxfGroup(0, "LAYER");
35
    public final static DxfGroup LTYPE = new DxfGroup(0, "LTYPE");
36
    public final static DxfGroup STYLE = new DxfGroup(0, "STYLE");
37
    public final static DxfGroup UCS = new DxfGroup(0, "UCS");
38
    public final static DxfGroup VIEW = new DxfGroup(0, "VIEW");
39
    public final static DxfGroup VPORT = new DxfGroup(0, "VPORT");
40
    private String name;
41
    int flags = 0;
42

    
43
    public DxfTableItem(String name, int flags) {
44
        this.name = name;
45
        this.flags = flags;
46
    }
47

    
48
    public String getName() {
49
        return name;
50
    }
51

    
52
    public void setName(String name) {
53
        this.name = name;
54
    }
55

    
56
    public int getFlags() {
57
        return flags;
58
    }
59

    
60
    public void setFlags(int flags) {
61
        this.flags = flags;
62
    }
63

    
64
    public boolean getFlag1() {
65
        return ((flags & 1) == 1);
66
    }
67

    
68
    public boolean getFlag2() {
69
        return ((flags & 2) == 2);
70
    }
71

    
72
    public boolean getFlag4() {
73
        return ((flags & 4) == 4);
74
    }
75

    
76
    public boolean getFlag8() {
77
        return ((flags & 8) == 8);
78
    }
79

    
80
    public boolean getFlag16() {
81
        return ((flags & 16) == 16);
82
    }
83

    
84
    public boolean getFlag32() {
85
        return ((flags & 32) == 32);
86
    }
87

    
88
    public boolean getFlag64() {
89
        return ((flags & 64) == 64);
90
    }
91

    
92
    public boolean getFlag128() {
93
        return ((flags & 128) == 128);
94
    }
95

    
96
    public String toDxfString() {
97
        return DxfGroup.toString(2, name) + DxfGroup.toString(70, flags);
98
    }
99
}