Statistics
| Revision:

root / branches / CqCMSDvp / libraries / libCq CMS for java.old / src / org / cresques / px / dxf / DxfTableItem.java @ 2323

History | View | Annotate | Download (2.51 KB)

1 2249 igbrotru
/*
2 2312 igbrotru
 * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
3
 *
4
 * Copyright (C) 2004-5.
5 2249 igbrotru
 *
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 2312 igbrotru
 *
22
 * cresques@gmail.com
23 2249 igbrotru
 */
24 13 luisw
package org.cresques.px.dxf;
25
26
import org.cresques.io.DxfGroup;
27
28
/** Classe repr?sentant une table fichier DXF. */
29
public class DxfTableItem {
30
    public final static DxfGroup ENDTAB = new DxfGroup(0, "ENDTAB");
31
    public final static DxfGroup APPID = new DxfGroup(0, "APPID");
32
    public final static DxfGroup DIMSTYLE = new DxfGroup(0, "DIMSTYLE");
33
    public final static DxfGroup LAYER = new DxfGroup(0, "LAYER");
34
    public final static DxfGroup LTYPE = new DxfGroup(0, "LTYPE");
35
    public final static DxfGroup STYLE = new DxfGroup(0, "STYLE");
36
    public final static DxfGroup UCS = new DxfGroup(0, "UCS");
37
    public final static DxfGroup VIEW = new DxfGroup(0, "VIEW");
38
    public final static DxfGroup VPORT = new DxfGroup(0, "VPORT");
39
40
    private String name;
41 29 luisw
    int flags = 0;
42 13 luisw
43
    public DxfTableItem(String name, int flags) {
44
        this.name = name;
45
        this.flags = flags;
46
    }
47
48
    public String getName(){return name;}
49
    public void setName(String name) {this.name = name;}
50
    public int getFlags(){return flags;}
51
    public void setFlags(int flags) {this.flags = flags;}
52
53
    public boolean getFlag1(){return ((flags&1)==1);}
54
    public boolean getFlag2(){return ((flags&2)==2);}
55
    public boolean getFlag4(){return ((flags&4)==4);}
56
    public boolean getFlag8(){return ((flags&8)==8);}
57
    public boolean getFlag16(){return ((flags&16)==16);}
58
    public boolean getFlag32(){return ((flags&32)==32);}
59
    public boolean getFlag64(){return ((flags&64)==64);}
60
    public boolean getFlag128(){return ((flags&128)==128);}
61
62 14 luisw
    public String toDxfString() {
63 13 luisw
        return DxfGroup.toString(2, name) + DxfGroup.toString(70, flags);
64
    }
65
66
}