com.esri.arcgis.display
Class OutputContext

java.lang.Object
  extended by com.esri.arcgis.display.OutputContext
All Implemented Interfaces:
IOutputContext, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class OutputContext
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IOutputContext, ISupportErrorInfo

The context provided to pass from the map context to the output device.

Remarks

There are three reference frames which are used for data translation between geographic, map and output display context. These frames are:

  1. Geographic Reference Frame: A feature layer represents geographic data and may be re-projected prior to drawing the features onto a map.
  2. Map Reference Frame: This is an intermediate frame introduced to define a clear context in which geometric effects and all on-the-fly processing works. This frame is similar to the map sheet frame which is used with a 72 dpi graphic resolution centered at the center of the geographic spatial reference. The advantage of having the map reference frame is to provide a stable context for geometric effects and marker placement properties as this is in a graphic frame but independent of zoom levels and pan positions. All linear attributes (distance/length) are relative to this frame. For example, a 12 point offset is a 12 unit displacement in MRF. Effects will store these attributes in MRF units and use them without any transformation.
  3. Output Reference Frame: This consists of an output device, that displays the map with a zoom level which is not equal to the reference scale and a changed center position.

OutputContext CoClass relates to the Output Reference Frame. IOutputContext interface manages the map context object.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
OutputContext()
          Constructs a OutputContext using ArcGIS Engine.
OutputContext(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
OutputContext theOutputContext = (OutputContext) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 IGeometry fromMapToOutput(IGeometry ingeom)
          Converts map geometry to output geometry.
static String getClsid()
          getClsid.
 int getHDC()
          The device context that the display is currently drawing to.
 ITrackCancel getTrackCancel()
          Drawing will react on Cancel of ITrackCancel is not NULL.
 int hashCode()
          the hashcode for this object
 void init(double refScale, double currentScale, double resolution, double rotation, IPoint currentScreenCenter, tagRECT deviceRect, int outputDevice)
          Initializes the output context.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void setTrackCancel(ITrackCancel trackCancel)
          Drawing will react on Cancel of ITrackCancel is not NULL.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

OutputContext

public OutputContext()
              throws IOException,
                     UnknownHostException
Constructs a OutputContext using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

OutputContext

public OutputContext(Object obj)
              throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
OutputContext theOutputContext = (OutputContext) obj;

Construct a OutputContext using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to OutputContext.

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

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

init

public void init(double refScale,
                 double currentScale,
                 double resolution,
                 double rotation,
                 IPoint currentScreenCenter,
                 tagRECT deviceRect,
                 int outputDevice)
          throws IOException,
                 AutomationException
Initializes the output context.

Remarks

CurrentScreenCenter must be in Map reference frame.

Product Availability

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

Specified by:
init in interface IOutputContext
Parameters:
refScale - The refScale (in)
currentScale - The currentScale (in)
resolution - The resolution (in)
rotation - The rotation (in)
currentScreenCenter - A reference to a com.esri.arcgis.geometry.IPoint (in)
deviceRect - A Structure: com.esri.arcgis.system.tagRECT (in)
outputDevice - The outputDevice (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

fromMapToOutput

public IGeometry fromMapToOutput(IGeometry ingeom)
                          throws IOException,
                                 AutomationException
Converts map geometry to output geometry.

Product Availability

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

Specified by:
fromMapToOutput in interface IOutputContext
Parameters:
ingeom - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTrackCancel

public void setTrackCancel(ITrackCancel trackCancel)
                    throws IOException,
                           AutomationException
Drawing will react on Cancel of ITrackCancel is not NULL.

Product Availability

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

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

getTrackCancel

public ITrackCancel getTrackCancel()
                            throws IOException,
                                   AutomationException
Drawing will react on Cancel of ITrackCancel is not NULL.

Product Availability

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

Specified by:
getTrackCancel in interface IOutputContext
Returns:
A reference to a com.esri.arcgis.system.ITrackCancel
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHDC

public int getHDC()
           throws IOException,
                  AutomationException
The device context that the display is currently drawing to.

Remarks

Initialize OutputContext before accessing this property.

Product Availability

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

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

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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