com.esri.arcgis.output
Class EmfExporter

java.lang.Object
  extended bycom.esri.arcgis.output.EmfExporter
All Implemented Interfaces:
IEmfExporter, IExporter, IExporterPriority, IOutputCleanup, ISupportErrorInfo, java.io.Serializable

public class EmfExporter
extends java.lang.Object
implements IEmfExporter, IExporter, IExporterPriority, ISupportErrorInfo, IOutputCleanup

Superseded by ExportEMF. Class used to export maps to Windows Enhanced Metafile (EMF) format.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
EmfExporter()
          Constructs a EmfExporter using ArcGIS Engine.
EmfExporter(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.
 IEmfExporter getAsIEmfExporter()
          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.
 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.
 ISupportErrorInfo getAsISupportErrorInfo()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
static java.lang.String getClsid()
           
 java.lang.String getDescription()
          A description string to embed in the file.
 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 getHENHMETAFILE()
          Handle to in-memory metafile.
 java.lang.String getName()
          The Name of the Exporter.
 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.
 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 metafile will be written to memory.
 void setClipToGraphicExtent(boolean clipToGraphicsExtent)
          Indicates if the Output will be clipped to the Graphics Extent.
 void setDescription(java.lang.String pDescription)
          A description string to embed in the file.
 void setExportFileName(java.lang.String fileName)
          The Export File Name.
 void setIsInMemory(boolean pIsInMemory)
          Indicates if the metafile will be written to memory.
 void setPixelBounds(IEnvelope pixelBounds)
          The Pixel Bounds of the Exporter.
 void setResolution(short res)
          The Resolution of the Exporter.
 int startExporting()
          Initializes the Exporter.
 int takeHENHMETAFILE()
          Returns the handle to the in-memory metafile.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmfExporter

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

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

EmfExporter

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

Construct a EmfExporter using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to EmfExporter.
EmfExporter theEmfExporter = (EmfExporter) 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()

getAsIEmfExporter

public IEmfExporter getAsIEmfExporter()
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.


getAsIExporterPriority

public IExporterPriority getAsIExporterPriority()
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.


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: IEmfExporter
Indicates if the metafile will be written to memory.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setIsInMemory in interface IEmfExporter
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: IEmfExporter
Indicates if the metafile will be written to memory.

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

getHENHMETAFILE

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

Supported Platforms

Windows, Solaris, Linux

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

takeHENHMETAFILE

public int takeHENHMETAFILE()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IEmfExporter
Returns the handle to the in-memory metafile. Valid only after ReleaseDC has been called. Ownership of the handle is transferred to the client who must call DeleteEnhMetafile on the returned handle. Subsequent calls to this routine will return 0.

Supported Platforms

Windows, Solaris, Linux

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

setDescription

public void setDescription(java.lang.String pDescription)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IEmfExporter
A description string to embed in the file.

Supported Platforms

Windows, Solaris, Linux

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

getDescription

public java.lang.String getDescription()
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: IEmfExporter
A description string to embed in the file.

Supported Platforms

Windows, Solaris, Linux

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

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.

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.

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.