com.iver.cit.jdwglib.dwg
Class DwgObject

java.lang.Object
  extended bycom.iver.cit.jdwglib.dwg.DwgObject
Direct Known Subclasses:
DwgArc, DwgAttdef, DwgAttrib, DwgBlock, DwgBlockControl, DwgBlockHeader, DwgCircle, DwgEllipse, DwgEndblk, DwgInsert, DwgLayer, DwgLayerControl, DwgLine, DwgLinearDimension, DwgLwPolyline, DwgMText, DwgPoint, DwgPolyline2D, DwgPolyline3D, DwgSeqend, DwgSolid, DwgSpline, DwgText, DwgVertex2D, DwgVertex3D

public class DwgObject
extends java.lang.Object

The DwgObject class represents a DWG object

Author:
jmorell

Constructor Summary
DwgObject()
           
 
Method Summary
 int getColor()
           
 java.util.Vector getExtendedData()
           
 int getGraphicData()
           
 int getHandle()
           
 int getLayerHandle()
           
 int getLayerHandleCode()
           
 int getLinetypeFlags()
           
 int getMode()
           
 int getNumReactors()
           
 int getPlotstyleFlags()
           
 int getSizeInBits()
           
 int getSubEntityHandle()
           
 int getType()
           
 java.lang.String getVersion()
           
 int getXDicObjHandle()
           
 boolean isGraphicsFlag()
           
 boolean isNoLinks()
           
 int readObjectHeaderV15(int[] data, int offset)
          Reads the header of an object in a DWG file Version 15
 int readObjectTailV15(int[] data, int offset)
          Reads the tail of an object in a DWG file Version 15
 void setColor(int color)
           
 void setExtendedData(java.util.Vector extendedData)
           
 void setGraphicData(int graphicData)
           
 void setGraphicsFlag(boolean graphicsFlag)
           
 void setHandle(int handle)
           
 void setLayerHandle(int layerHandle)
           
 void setLayerHandleCode(int layerHandleCode)
           
 void setLinetypeFlags(int linetypeFlags)
           
 void setMode(int mode)
           
 void setNoLinks(boolean noLinks)
           
 void setNumReactors(int numReactors)
           
 void setPlotstyleFlags(int plotstyleFlags)
           
 void setSizeInBits(int sizeInBits)
           
 void setSubEntityHandle(int subEntityHandle)
           
 void setType(int type)
           
 void setVersion(java.lang.String version)
           
 void setXDicObjHandle(int dicObjHandle)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DwgObject

public DwgObject()
Method Detail

readObjectHeaderV15

public int readObjectHeaderV15(int[] data,
                               int offset)
                        throws java.lang.Exception
Reads the header of an object in a DWG file Version 15

Parameters:
data - Array of unsigned bytes obtained from the DWG binary file
offset - The current bit offset where the value begins
Returns:
int New offset
Throws:
java.lang.Exception - If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines.

readObjectTailV15

public int readObjectTailV15(int[] data,
                             int offset)
                      throws java.lang.Exception
Reads the tail of an object in a DWG file Version 15

Parameters:
data - Array of bytes obtained from the DWG binary file
offset - Offset for this array of bytes
Returns:
int New offset
Throws:
java.lang.Exception - If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines.

getSizeInBits

public int getSizeInBits()
Returns:
Returns the sizeInBits.

setSizeInBits

public void setSizeInBits(int sizeInBits)
Parameters:
sizeInBits - The sizeInBits to set.

getExtendedData

public java.util.Vector getExtendedData()
Returns:
Returns the extendedData.

setExtendedData

public void setExtendedData(java.util.Vector extendedData)
Parameters:
extendedData - The extendedData to set.

getGraphicData

public int getGraphicData()
Returns:
Returns the graphicData.

setGraphicData

public void setGraphicData(int graphicData)
Parameters:
graphicData - The graphicData to set.

getVersion

public java.lang.String getVersion()
Returns:
Returns the version.

setLinetypeFlags

public void setLinetypeFlags(int linetypeFlags)
Parameters:
linetypeFlags - The linetypeFlags to set.

setPlotstyleFlags

public void setPlotstyleFlags(int plotstyleFlags)
Parameters:
plotstyleFlags - The plotstyleFlags to set.

getSubEntityHandle

public int getSubEntityHandle()
Returns:
Returns the subEntityHandle.

setSubEntityHandle

public void setSubEntityHandle(int subEntityHandle)
Parameters:
subEntityHandle - The subEntityHandle to set.

getXDicObjHandle

public int getXDicObjHandle()
Returns:
Returns the xDicObjHandle.

setXDicObjHandle

public void setXDicObjHandle(int dicObjHandle)
Parameters:
dicObjHandle - The xDicObjHandle to set.

getLayerHandleCode

public int getLayerHandleCode()
Returns:
Returns the layerHandleCode.

setLayerHandleCode

public void setLayerHandleCode(int layerHandleCode)
Parameters:
layerHandleCode - The layerHandleCode to set.

getColor

public int getColor()
Returns:
Returns the color.

setColor

public void setColor(int color)
Parameters:
color - The color to set.

getHandle

public int getHandle()
Returns:
Returns the handle.

setHandle

public void setHandle(int handle)
Parameters:
handle - The handle to set.

getLayerHandle

public int getLayerHandle()
Returns:
Returns the layerHandle.

setLayerHandle

public void setLayerHandle(int layerHandle)
Parameters:
layerHandle - The layerHandle to set.

getMode

public int getMode()
Returns:
Returns the mode.

setMode

public void setMode(int mode)
Parameters:
mode - The mode to set.

isNoLinks

public boolean isNoLinks()
Returns:
Returns the noLinks.

setNoLinks

public void setNoLinks(boolean noLinks)
Parameters:
noLinks - The noLinks to set.

getNumReactors

public int getNumReactors()
Returns:
Returns the numReactors.

setNumReactors

public void setNumReactors(int numReactors)
Parameters:
numReactors - The numReactors to set.

getType

public int getType()
Returns:
Returns the type.

setType

public void setType(int type)
Parameters:
type - The type to set.

getLinetypeFlags

public int getLinetypeFlags()
Returns:
Returns the linetypeFlags.

getPlotstyleFlags

public int getPlotstyleFlags()
Returns:
Returns the plotstyleFlags.

setVersion

public void setVersion(java.lang.String version)
Parameters:
version - The version to set.

isGraphicsFlag

public boolean isGraphicsFlag()
Returns:
Returns the graphicsFlag.

setGraphicsFlag

public void setGraphicsFlag(boolean graphicsFlag)
Parameters:
graphicsFlag - The graphicsFlag to set.