org.kabeja.dxf
Class DXFEntity

java.lang.Object
  extended by org.kabeja.dxf.DXFEntity
Direct Known Subclasses:
DXFArc, DXFCircle, DXFDimension, DXFEllipse, DXFHatch, DXFImage, DXFInsert, DXFLeader, DXFLine, DXFMLine, DXFPoint, DXFPolyline, DXFRay, DXFRegion, DXFShape, DXFSolid, DXFSpline, DXFText, DXFTolerance, DXFViewport

public abstract class DXFEntity
extends java.lang.Object

Author:
Field Summary
protected  boolean block
           
protected  int color
           
protected  byte[] colorRGB
           
protected  DXFDocument doc
           
protected  DXFExtrusion extrusion
           
protected  int flags
           
protected  java.lang.String id
           
protected  java.lang.String layerID
           
protected  java.lang.String lineType
           
protected  double linetypeScaleFactor
           
protected  int lineWeight
           
protected  boolean modelSpace
          From the DXF Specs default all entities are in model space.
protected  double thickness
           
protected  double transparency
           
protected  boolean visibile
           
 
Constructor Summary
DXFEntity()
           
 
Method Summary
abstract  Bounds getBounds()
           
 int getColor()
           
 byte[] getColorRGB()
           
 DXFDocument getDXFDocument()
           
 DXFExtrusion getExtrusion()
           
 int getFlags()
           
 java.lang.String getID()
           
 java.lang.String getLayerName()
          Gives the name of the layer, which containts the entity.
abstract  double getLength()
          Returns the length of the entity or 0 if the entity has no length
 java.lang.String getLineType()
           
 double getLinetypeScaleFactor()
           
 int getLineWeight()
           
 double getThickness()
          The thickness reflects the height of the entity.
 double getTransparency()
           
abstract  java.lang.String getType()
           
 boolean isBlockEntity()
           
 boolean isModelSpace()
           
 boolean isOmitLineType()
           
 boolean isVisibile()
           
 void setBlockEntity(boolean b)
           
 void setColor(int color)
           
 void setColorRGB(byte[] colorRGB)
           
 void setDXFDocument(DXFDocument doc)
           
 void setExtrusion(DXFExtrusion extrusion)
           
 void setExtrusionX(double x)
           
 void setExtrusionY(double y)
           
 void setExtrusionZ(double z)
           
 void setFlags(int flags)
           
 void setID(java.lang.String id)
           
 void setLayerName(java.lang.String id)
          Set the name of the layer, which containts the entity.
 void setLineType(java.lang.String lineType)
           
 void setLinetypeScaleFactor(double linetypeScaleFactor)
           
 void setLineWeight(int lineWeight)
           
 void setModelSpace(boolean modelSpace)
           
 void setThickness(double thickness)
           
 void setTransparency(double transparency)
           
 void setVisibile(boolean visibile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doc

protected DXFDocument doc

id

protected java.lang.String id

layerID

protected java.lang.String layerID

visibile

protected boolean visibile

lineType

protected java.lang.String lineType

flags

protected int flags

block

protected boolean block

linetypeScaleFactor

protected double linetypeScaleFactor

color

protected int color

colorRGB

protected byte[] colorRGB

lineWeight

protected int lineWeight

transparency

protected double transparency

thickness

protected double thickness

extrusion

protected DXFExtrusion extrusion

modelSpace

protected boolean modelSpace
From the DXF Specs default all entities are in model space.

Constructor Detail

DXFEntity

public DXFEntity()
Method Detail

setDXFDocument

public void setDXFDocument(DXFDocument doc)

getDXFDocument

public DXFDocument getDXFDocument()

getLayerName

public java.lang.String getLayerName()
Gives the name of the layer, which containts the entity.

Returns:
the name of the layer

setLayerName

public void setLayerName(java.lang.String id)
Set the name of the layer, which containts the entity.


getBounds

public abstract Bounds getBounds()

getLineType

public java.lang.String getLineType()
Returns:
Returns the lineType.

setLineType

public void setLineType(java.lang.String lineType)
Parameters:
lineType - The lineType to set.

isVisibile

public boolean isVisibile()
Returns:
Returns the visibile.

setVisibile

public void setVisibile(boolean visibile)
Parameters:
visibile - The visibile to set.

getFlags

public int getFlags()
Returns:
Returns the flags.

setFlags

public void setFlags(int flags)
Parameters:
flags - The flags to set.

setBlockEntity

public void setBlockEntity(boolean b)

isBlockEntity

public boolean isBlockEntity()

setExtrusion

public void setExtrusion(DXFExtrusion extrusion)

getExtrusion

public DXFExtrusion getExtrusion()

getLinetypeScaleFactor

public double getLinetypeScaleFactor()

setLinetypeScaleFactor

public void setLinetypeScaleFactor(double linetypeScaleFactor)

getColor

public int getColor()

setColor

public void setColor(int color)

getColorRGB

public byte[] getColorRGB()

setColorRGB

public void setColorRGB(byte[] colorRGB)

getLineWeight

public int getLineWeight()

setLineWeight

public void setLineWeight(int lineWeight)

getTransparency

public double getTransparency()

setTransparency

public void setTransparency(double transparency)

setID

public void setID(java.lang.String id)

getID

public java.lang.String getID()

setExtrusionX

public void setExtrusionX(double x)

setExtrusionY

public void setExtrusionY(double y)

setExtrusionZ

public void setExtrusionZ(double z)

getType

public abstract java.lang.String getType()

getThickness

public double getThickness()
The thickness reflects the height of the entity.

Returns:
Returns the thickness.

setThickness

public void setThickness(double thickness)
Parameters:
thickness - The thickness /height of the entity to set.

isOmitLineType

public boolean isOmitLineType()

isModelSpace

public boolean isModelSpace()
Returns:
Returns the modelSpace.

setModelSpace

public void setModelSpace(boolean modelSpace)
Parameters:
modelSpace - The modelSpace to set.

getLength

public abstract double getLength()
Returns the length of the entity or 0 if the entity has no length

Returns: