com.partnersoft.io.formats.dxf
Class DXFEntity

java.lang.Object
  extended by com.partnersoft.io.formats.dxf.DXFEntity
All Implemented Interfaces:
DXFGroupActor
Direct Known Subclasses:
DXFBlock, DXFDictionary, DXFEndBlk, DXFGraphic, DXFIrd_Dsc_Record, DXFIrd_Obj_Record, DXFLayer, DXFSeqEnd, DXFXRecord

public class DXFEntity
extends java.lang.Object
implements DXFGroupActor

An entity object from a DXF file.

Author:
Paul Reavis Copyright 2000 Partner Software, Inc.

Field Summary
protected  java.lang.String appGroupName
           
 long handle
           
protected  boolean insideAppGroup
           
 
Constructor Summary
DXFEntity()
           
 
Method Summary
 void begin()
           
 java.lang.Object clone()
          The default reader reuses objects heavily; clone them if you need your own version.
 void copyStateFrom(DXFEntity nother)
          Copies the attributes from the given DXFEntity.
 void end()
           
 void processGroup(int code, DXFProtoValue value)
          Acts on groups; interprets them and populates properties.
 void resetToDefaults()
          Resets all values to defaults; useful when reusing objects.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handle

public long handle

insideAppGroup

protected boolean insideAppGroup

appGroupName

protected java.lang.String appGroupName
Constructor Detail

DXFEntity

public DXFEntity()
Method Detail

begin

public void begin()
Specified by:
begin in interface DXFGroupActor

end

public void end()
Specified by:
end in interface DXFGroupActor

resetToDefaults

public void resetToDefaults()
Resets all values to defaults; useful when reusing objects. Subclasses overriding this should prefix their own method bodies with:
 super.resetToDefaults();
 


processGroup

public void processGroup(int code,
                         DXFProtoValue value)
Acts on groups; interprets them and populates properties. Subclasses will generally override this; they should prefix their own methods however with:
        // let superclass do its thing, skip any codes inside app-specific
        // bracketed section
        super.processGroup(code, value);
        if (insideAppGroup)
                return;
 

Specified by:
processGroup in interface DXFGroupActor

copyStateFrom

public void copyStateFrom(DXFEntity nother)
Copies the attributes from the given DXFEntity. Subclasses should implement this, but call it as well:
 public void copyState(DXFEntity nother) {
    super.copyStateFrom(nother);
    someState = nother.someState;
    ....
 


clone

public java.lang.Object clone()
The default reader reuses objects heavily; clone them if you need your own version. Utilizes copyState() so subclasses do not need to override this.

Overrides:
clone in class java.lang.Object