com.esri.arcgis.output
Class DibExporter

java.lang.Object
  extended bycom.esri.arcgis.output.DibExporter
All Implemented Interfaces:
IBmpExporter, IDibExporter, IExporter, IExporter2, IExporterPriority, IOutputCleanup, IStepProgressorSetup, ISupportErrorInfo, ITrackCancelSetup, IWorldFileSettings, java.io.Serializable

public class DibExporter
extends java.lang.Object
implements IDibExporter, IBmpExporter, IExporter, IExporter2, IExporterPriority, IWorldFileSettings, ISupportErrorInfo, IOutputCleanup, IStepProgressorSetup, ITrackCancelSetup

Superseded by ExportBMP. Class used to export maps to DIB (Device Independant Bitmap) format. Format also known as BMP.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
DibExporter()
          Constructs a DibExporter using ArcGIS Engine.
DibExporter(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 void cleanup()
          Cleanup should clean all temporary files, free used memory, etc...
 boolean equals(java.lang.Object o)
          Compare this object with another
 void finishExporting()
          Shuts down the Exporter.
 IBmpExporter getAsIBmpExporter()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IDibExporter getAsIDibExporter()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IExporter getAsIExporter()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IExporter2 getAsIExporter2()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IExporterPriority getAsIExporterPriority()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IOutputCleanup getAsIOutputCleanup()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IStepProgressorSetup getAsIStepProgressorSetup()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ISupportErrorInfo getAsISupportErrorInfo()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ITrackCancelSetup getAsITrackCancelSetup()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IWorldFileSettings getAsIWorldFileSettings()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IColor getBackgroundColor()
          The background color of the DIB.
 int getBitmap()
          The Windows Bitmap handle.
 short getBitsPerPixel()
          The color depth of the DIB.
static java.lang.String getClsid()
           
 java.lang.String getExportFileName()
          The Export File Name.
 java.lang.String getFileExtension()
          File Extension associated with Exporter.
 java.lang.String getFilter()
          Filter String used in the CFileDialog class.
 int getHDIB()
          Handle to in-memory DIB.
 short getHeight()
          The height of the DIB.
 IEnvelope getMapExtent()
          The Map Extent.
 java.lang.String getName()
          The Name of the Exporter.
 int getPalette()
          The Windows Bitmap color palette.
 IEnvelope getPixelBounds()
          The Pixel Bounds of the Exporter.
 int getPriority()
          Exporter's priority - the order of appearance in the user interface.
 short getResolution()
          The Resolution of the Exporter.
 short getWidth()
          The width of the DIB.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          Supported Platforms
 boolean isClipToGraphicExtent()
          Indicates if the Output will be clipped to the Graphics Extent.
 boolean isInMemory()
          Indicates if the bitmap should be written to memory.
 boolean isOutputWorldFile()
          Indicates if a World File will be created.
 void setBackgroundColor(IColor ppBackgroundColor)
          The background color of the DIB.
 void setBitsPerPixel(short pBitsPerPixel)
          The color depth of the DIB.
 void setClipToGraphicExtent(boolean clipToGraphicsExtent)
          Indicates if the Output will be clipped to the Graphics Extent.
 void setExportExtentByRef(IEnvelope rhs1)
          The Export Extent.
 void setExportFileName(java.lang.String fileName)
          The Export File Name.
 void setHeight(short pHeight)
          The height of the DIB.
 void setIsInMemory(boolean pIsInMemory)
          Indicates if the bitmap should be written to memory.
 void setMapExtent(IEnvelope mapExtent)
          The Map Extent.
 void setOutputWorldFile(boolean outputWorldFile)
          Indicates if a World File will be created.
 void setPixelBounds(IEnvelope pixelBounds)
          The Pixel Bounds of the Exporter.
 void setResolution(short res)
          The Resolution of the Exporter.
 void setStepProgressor(IStepProgressor rhs1)
          Updates a Progress Bar.
 void setTrackCancel(ITrackCancel rhs1)
          Reacts to a Cancel.
 void setWidth(short pWidth)
          The width of the DIB.
 int startExporting()
          Initializes the Exporter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DibExporter

public DibExporter()
            throws java.io.IOException,
                   java.net.UnknownHostException
Constructs a DibExporter using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

DibExporter

public DibExporter(java.lang.Object obj)
            throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

Construct a DibExporter using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to DibExporter.
DibExporter theDibExporter = (DibExporter) obj;

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()

getAsIDibExporter

public IDibExporter getAsIDibExporter()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIBmpExporter

public IBmpExporter getAsIBmpExporter()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIExporter

public IExporter getAsIExporter()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIExporter2

public IExporter2 getAsIExporter2()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIExporterPriority

public IExporterPriority getAsIExporterPriority()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIWorldFileSettings

public IWorldFileSettings getAsIWorldFileSettings()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsISupportErrorInfo

public ISupportErrorInfo getAsISupportErrorInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIOutputCleanup

public IOutputCleanup getAsIOutputCleanup()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIStepProgressorSetup

public IStepProgressorSetup getAsIStepProgressorSetup()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsITrackCancelSetup

public ITrackCancelSetup getAsITrackCancelSetup()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

public boolean equals(java.lang.Object o)
Compare this object with another


hashCode

public int hashCode()
the hashcode for this object


setIsInMemory

public void setIsInMemory(boolean pIsInMemory)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IDibExporter
Indicates if the bitmap should be written to memory. If false, it is written to a file specified by Path. If true, use HDIB to get the memory handle after ReleaseDC has been called.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setIsInMemory in interface IDibExporter
Parameters:
pIsInMemory - The pIsInMemory (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

isInMemory

public boolean isInMemory()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IDibExporter
Indicates if the bitmap should be written to memory. If false, it is written to a file specified by Path. If true, use HDIB to get the memory handle after ReleaseDC has been called.

Specified by:
isInMemory in interface IDibExporter
Returns:
The pIsInMemory
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getHDIB

public int getHDIB()
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IDibExporter
Handle to in-memory DIB. Valid only after ReleaseDC has been called.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getHDIB in interface IDibExporter
Returns:
The pHandle (A COM typedef)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBitsPerPixel

public void setBitsPerPixel(short pBitsPerPixel)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IDibExporter
The color depth of the DIB.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setBitsPerPixel in interface IDibExporter
Parameters:
pBitsPerPixel - The pBitsPerPixel (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getBitsPerPixel

public short getBitsPerPixel()
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IDibExporter
The color depth of the DIB.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBitsPerPixel in interface IDibExporter
Returns:
The pBitsPerPixel
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setBackgroundColor

public void setBackgroundColor(IColor ppBackgroundColor)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IDibExporter
The background color of the DIB.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setBackgroundColor in interface IDibExporter
Parameters:
ppBackgroundColor - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBackgroundColor

public IColor getBackgroundColor()
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IDibExporter
The background color of the DIB.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBackgroundColor in interface IDibExporter
Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setWidth

public void setWidth(short pWidth)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IDibExporter
The width of the DIB. If width or height is zero, screen size is used.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setWidth in interface IDibExporter
Parameters:
pWidth - The pWidth (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWidth

public short getWidth()
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IDibExporter
The width of the DIB. If width or height is zero, screen size is used.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getWidth in interface IDibExporter
Returns:
The pWidth
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHeight

public void setHeight(short pHeight)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IDibExporter
The height of the DIB. If width or height is zero, screen size is used.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setHeight in interface IDibExporter
Parameters:
pHeight - The pHeight (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getHeight

public short getHeight()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IDibExporter
The height of the DIB. If width or height is zero, screen size is used.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getHeight in interface IDibExporter
Returns:
The pHeight
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getBitmap

public int getBitmap()
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IBmpExporter
The Windows Bitmap handle.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBitmap in interface IBmpExporter
Returns:
The hBmp (A COM typedef)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getPalette

public int getPalette()
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IBmpExporter
The Windows Bitmap color palette.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPalette in interface IBmpExporter
Returns:
The hPal (A COM typedef)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IExporter
The Name of the Exporter.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getName in interface IExporter
Returns:
The name
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getFilter

public java.lang.String getFilter()
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IExporter
Filter String used in the CFileDialog class.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFilter in interface IExporter
Returns:
The filter
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getFileExtension

public java.lang.String getFileExtension()
                                  throws java.io.IOException,
                                         AutomationException
Description copied from interface: IExporter
File Extension associated with Exporter.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFileExtension in interface IExporter
Returns:
The name
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPixelBounds

public void setPixelBounds(IEnvelope pixelBounds)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IExporter
The Pixel Bounds of the Exporter.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setPixelBounds in interface IExporter
Parameters:
pixelBounds - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPixelBounds

public IEnvelope getPixelBounds()
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IExporter
The Pixel Bounds of the Exporter.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPixelBounds in interface IExporter
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExportFileName

public void setExportFileName(java.lang.String fileName)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IExporter
The Export File Name.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setExportFileName in interface IExporter
Parameters:
fileName - The fileName (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExportFileName

public java.lang.String getExportFileName()
                                   throws java.io.IOException,
                                          AutomationException
Description copied from interface: IExporter
The Export File Name.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExportFileName in interface IExporter
Returns:
The fileName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getResolution

public short getResolution()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IExporter
The Resolution of the Exporter.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getResolution in interface IExporter
Returns:
The res
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setResolution

public void setResolution(short res)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IExporter
The Resolution of the Exporter.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setResolution in interface IExporter
Parameters:
res - The res (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isClipToGraphicExtent

public boolean isClipToGraphicExtent()
                              throws java.io.IOException,
                                     AutomationException
Description copied from interface: IExporter
Indicates if the Output will be clipped to the Graphics Extent.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isClipToGraphicExtent in interface IExporter
Returns:
The clipToGraphicsExtent
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setClipToGraphicExtent

public void setClipToGraphicExtent(boolean clipToGraphicsExtent)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IExporter
Indicates if the Output will be clipped to the Graphics Extent.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setClipToGraphicExtent in interface IExporter
Parameters:
clipToGraphicsExtent - The clipToGraphicsExtent (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

startExporting

public int startExporting()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IExporter
Initializes the Exporter.

Supported Platforms

Windows, Solaris, Linux

Specified by:
startExporting in interface IExporter
Returns:
The hDC (A COM typedef)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

finishExporting

public void finishExporting()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IExporter
Shuts down the Exporter.

Supported Platforms

Windows, Solaris, Linux

Specified by:
finishExporting in interface IExporter
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setExportExtentByRef

public void setExportExtentByRef(IEnvelope rhs1)
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IExporter2
The Export Extent.

Specified by:
setExportExtentByRef in interface IExporter2
Parameters:
rhs1 - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPriority

public int getPriority()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IExporterPriority
Exporter's priority - the order of appearance in the user interface.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPriority in interface IExporterPriority
Returns:
The pPriority
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMapExtent

public void setMapExtent(IEnvelope mapExtent)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IWorldFileSettings
The Map Extent.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setMapExtent in interface IWorldFileSettings
Parameters:
mapExtent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapExtent

public IEnvelope getMapExtent()
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IWorldFileSettings
The Map Extent.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMapExtent in interface IWorldFileSettings
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOutputWorldFile

public void setOutputWorldFile(boolean outputWorldFile)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IWorldFileSettings
Indicates if a World File will be created.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setOutputWorldFile in interface IWorldFileSettings
Parameters:
outputWorldFile - The outputWorldFile (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

isOutputWorldFile

public boolean isOutputWorldFile()
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IWorldFileSettings
Indicates if a World File will be created.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isOutputWorldFile in interface IWorldFileSettings
Returns:
The outputWorldFile
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: ISupportErrorInfo

Supported Platforms

Windows, Solaris, Linux

Description

Indicates whether the interface supports IErrorInfo.

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

cleanup

public void cleanup()
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IOutputCleanup
Cleanup should clean all temporary files, free used memory, etc...

Supported Platforms

Windows, Solaris, Linux

Specified by:
cleanup in interface IOutputCleanup
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setStepProgressor

public void setStepProgressor(IStepProgressor rhs1)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IStepProgressorSetup
Updates a Progress Bar.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setStepProgressor in interface IStepProgressorSetup
Parameters:
rhs1 - A reference to a com.esri.arcgis.system.IStepProgressor (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTrackCancel

public void setTrackCancel(ITrackCancel rhs1)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: ITrackCancelSetup
Reacts to a Cancel.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setTrackCancel in interface ITrackCancelSetup
Parameters:
rhs1 - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.