Class DwgObject
- java.lang.Object
-
- org.hortonmachine.gears.io.dxfdwg.libs.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 Object
The DwgObject class represents a DWG object- Author:
- jmorell
-
-
Field Summary
Fields Modifier and Type Field Description protected intcolorprotected VectorextendedDataprotected intgraphicDataprotected booleangraphicsFlagprotected inthandleprotected intlayerHandleprotected intlayerHandleCodeprotected intlinetypeFlagsprotected intmodeprotected booleannoLinksprotected intnumReactorsprotected intplotstyleFlagsprotected intsizeInBitsprotected intsubEntityHandleprotected inttypeprotected Stringversionprotected intxDicObjHandle
-
Constructor Summary
Constructors Constructor Description DwgObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColor()VectorgetExtendedData()intgetGraphicData()intgetHandle()intgetLayerHandle()intgetLayerHandleCode()intgetLinetypeFlags()intgetMode()intgetNumReactors()intgetPlotstyleFlags()intgetSizeInBits()intgetSubEntityHandle()intgetType()StringgetVersion()intgetXDicObjHandle()booleanisGraphicsFlag()booleanisNoLinks()intreadObjectHeaderV15(int[] data, int offset)Reads the header of an object in a DWG file Version 15intreadObjectTailV15(int[] data, int offset)Reads the tail of an object in a DWG file Version 15voidsetColor(int color)voidsetExtendedData(Vector extendedData)voidsetGraphicData(int graphicData)voidsetGraphicsFlag(boolean graphicsFlag)voidsetHandle(int handle)voidsetLayerHandle(int layerHandle)voidsetLayerHandleCode(int layerHandleCode)voidsetLinetypeFlags(int linetypeFlags)voidsetMode(int mode)voidsetNoLinks(boolean noLinks)voidsetNumReactors(int numReactors)voidsetPlotstyleFlags(int plotstyleFlags)voidsetSizeInBits(int sizeInBits)voidsetSubEntityHandle(int subEntityHandle)voidsetType(int type)voidsetVersion(String version)voidsetXDicObjHandle(int dicObjHandle)
-
-
-
Field Detail
-
type
protected int type
-
handle
protected int handle
-
layerHandleCode
protected int layerHandleCode
-
version
protected String version
-
mode
protected int mode
-
layerHandle
protected int layerHandle
-
color
protected int color
-
numReactors
protected int numReactors
-
noLinks
protected boolean noLinks
-
linetypeFlags
protected int linetypeFlags
-
plotstyleFlags
protected int plotstyleFlags
-
sizeInBits
protected int sizeInBits
-
extendedData
protected Vector extendedData
-
graphicData
protected int graphicData
-
subEntityHandle
protected int subEntityHandle
-
xDicObjHandle
protected int xDicObjHandle
-
graphicsFlag
protected boolean graphicsFlag
-
-
Method Detail
-
readObjectHeaderV15
public int readObjectHeaderV15(int[] data, int offset) throws ExceptionReads the header of an object in a DWG file Version 15- Parameters:
data- Array of unsigned bytes obtained from the DWG binary fileoffset- The current bit offset where the value begins- Returns:
- int New offset
- Throws:
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 ExceptionReads the tail of an object in a DWG file Version 15- Parameters:
data- Array of bytes obtained from the DWG binary fileoffset- Offset for this array of bytes- Returns:
- int New offset
- Throws:
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 Vector getExtendedData()
- Returns:
- Returns the extendedData.
-
setExtendedData
public void setExtendedData(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 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(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.
-
-