com.esri.arcgis.animation
Class AGAnimationUtils

java.lang.Object
  extended by com.esri.arcgis.animation.AGAnimationUtils
All Implemented Interfaces:
IAGAnimationPlayer, IAGAnimationUtils, IVideoExportUtils, IVideoExportUtils2, IConnectionPointContainer, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class AGAnimationUtils
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IAGAnimationPlayer, IAGAnimationUtils, IVideoExportUtils2, IConnectionPointContainer

Class containing common implementation of utility methods.

Product Availability

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

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
AGAnimationUtils()
          Constructs a AGAnimationUtils using ArcGIS Engine.
AGAnimationUtils(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AGAnimationUtils theAGAnimationUtils = (AGAnimationUtils) obj;
 
Method Summary
 void addIAnimationEventsListener(IAnimationEvents theListener)
          addIAnimationEventsListener.
 void calculateDisplayFrames(IAGAnimationTracks pTracks, int[] pFrames)
          Calculate the number of frames to display based on the minimum animation interval.
 void captureCurrentView(IAGAnimationTracks pTracks, IAGAnimationEnvironment pEnvironment)
          Creates a keyframe to capture the current view and adds it to the current animation.
 void createFlybyFromPath(IAGAnimationContainer pContainer, IAGImportPathOptions pOptions)
          Create a flyby animation from a path.
 void createLayerGroupAnimation(IAGAnimationContainer pContainer, IAGGroupAnimationOptions pOptions)
          Create a layer group animation.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
 void getCameraProperties(IAGAnimationContainer pContainer, IDoubleArray[] ppCameraProps)
          The camera properties.
static String getClsid()
          getClsid.
 void getOffScreenBitmapHandle(IAGAnimationContainer pContainer, int[] phBitmap)
          The bitmap handle from an offscreen rendering buffer.
 void getOffScreenTiledBitmapHandle(IAGAnimationContainer pContainer, tagRECT pOutputRect, int[] phBitmap)
          The tiled bitmap handle from an offscreen rendering buffer.
 void getWindowBitmapHandle(IAGAnimationContainer pContainer, int[] phBitmap)
          The bitmap handle from an OpenGL or GDI rendered window.
 int hashCode()
          the hashcode for this object
 boolean isBBoxNavigationMode(IAGAnimationContainer pContainer)
          Indicates bounding box navigation mode.
 void keyframeFromBookmark(IAGAnimationContainer pContainer, ISpatialBookmark pBookmark, IAGKeyframe[] ppKeyframe)
          Create a view keyframe from a spatial bookmark.
 void loadAnimationFile(IAGAnimationContainer pContainer, String pFilename)
          Load the animation from a file.
 void pauseAnimation()
          Pauses the playing or recording of the animation.
 void playAnimation(IAGAnimationTracks pTracks, IAGAnimationEnvironment pEnvironment, IStatusBar pStatusBar)
          Plays the animation according to the animation environment options.
 void recordAnimation(IAGAnimationTracks pTracks, IAGAnimationEnvironment pEnvironment, boolean bOverwrite)
          Records a view animation.
 void removeIAnimationEventsListener(IAnimationEvents theListener)
          removeIAnimationEventsListener.
 void restorePreviousContext(IAGAnimationContainer pContainer)
          Restores the OpenGL rendering context after offscreen video export.
 void saveAnimationFile(IAGAnimationContainer pContainer, String pFilename, int version)
          Save the animation to a file.
 void setBBoxNavigationMode(IAGAnimationContainer pContainer, boolean pbBBoxMode)
          Indicates bounding box navigation mode.
 void stopAnimation()
          Stops playing or recording the animation.
 
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

AGAnimationUtils

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

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

AGAnimationUtils

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

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

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

addIAnimationEventsListener

public void addIAnimationEventsListener(IAnimationEvents theListener)
                                 throws IOException
addIAnimationEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.animation.IAnimationEvents interface.
Throws:
IOException - If there are communications problems.

removeIAnimationEventsListener

public void removeIAnimationEventsListener(IAnimationEvents theListener)
                                    throws IOException
removeIAnimationEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.animation.IAnimationEvents interface.
Throws:
IOException - If there are communications problems.

playAnimation

public void playAnimation(IAGAnimationTracks pTracks,
                          IAGAnimationEnvironment pEnvironment,
                          IStatusBar pStatusBar)
                   throws IOException,
                          AutomationException
Plays the animation according to the animation environment options.

Product Availability

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

Specified by:
playAnimation in interface IAGAnimationPlayer
Parameters:
pTracks - A reference to a com.esri.arcgis.animation.IAGAnimationTracks (in)
pEnvironment - A reference to a com.esri.arcgis.animation.IAGAnimationEnvironment (in)
pStatusBar - A reference to a com.esri.arcgis.system.IStatusBar (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

recordAnimation

public void recordAnimation(IAGAnimationTracks pTracks,
                            IAGAnimationEnvironment pEnvironment,
                            boolean bOverwrite)
                     throws IOException,
                            AutomationException
Records a view animation.

Product Availability

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

Specified by:
recordAnimation in interface IAGAnimationPlayer
Parameters:
pTracks - A reference to a com.esri.arcgis.animation.IAGAnimationTracks (in)
pEnvironment - A reference to a com.esri.arcgis.animation.IAGAnimationEnvironment (in)
bOverwrite - The bOverwrite (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

pauseAnimation

public void pauseAnimation()
                    throws IOException,
                           AutomationException
Pauses the playing or recording of the animation.

Product Availability

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

Specified by:
pauseAnimation in interface IAGAnimationPlayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopAnimation

public void stopAnimation()
                   throws IOException,
                          AutomationException
Stops playing or recording the animation.

Product Availability

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

Specified by:
stopAnimation in interface IAGAnimationPlayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createLayerGroupAnimation

public void createLayerGroupAnimation(IAGAnimationContainer pContainer,
                                      IAGGroupAnimationOptions pOptions)
                               throws IOException,
                                      AutomationException
Create a layer group animation.

Remarks

This utility function creates a group animation for the animation container specified by pContainer. Other options, such as the input layers, are specified by pOptions.

Product Availability

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

Specified by:
createLayerGroupAnimation in interface IAGAnimationUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
pOptions - A reference to a com.esri.arcgis.animation.IAGGroupAnimationOptions (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createFlybyFromPath

public void createFlybyFromPath(IAGAnimationContainer pContainer,
                                IAGImportPathOptions pOptions)
                         throws IOException,
                                AutomationException
Create a flyby animation from a path.

Remarks

This utility function creates a flyby-from-path animation track for the animation container specified by pContainer. Other options, such as the flyby path, are specified in pOptions.

Product Availability

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

Specified by:
createFlybyFromPath in interface IAGAnimationUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
pOptions - A reference to a com.esri.arcgis.animation.IAGImportPathOptions (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

keyframeFromBookmark

public void keyframeFromBookmark(IAGAnimationContainer pContainer,
                                 ISpatialBookmark pBookmark,
                                 IAGKeyframe[] ppKeyframe)
                          throws IOException,
                                 AutomationException
Create a view keyframe from a spatial bookmark.

Remarks

This utility function converts spatial bookmarks to keyframes. The input bookmark is specified by pBookmark. The output keyframe is specified by ppKeyframe.

Product Availability

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

Specified by:
keyframeFromBookmark in interface IAGAnimationUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
pBookmark - A reference to a com.esri.arcgis.carto.ISpatialBookmark (in)
ppKeyframe - A reference to a com.esri.arcgis.animation.IAGKeyframe (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

captureCurrentView

public void captureCurrentView(IAGAnimationTracks pTracks,
                               IAGAnimationEnvironment pEnvironment)
                        throws IOException,
                               AutomationException
Creates a keyframe to capture the current view and adds it to the current animation.

Remarks

This utility function captures a current view extent into a map view keyframe and add it to the animation track container (pTracks).

Product Availability

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

Specified by:
captureCurrentView in interface IAGAnimationUtils
Parameters:
pTracks - A reference to a com.esri.arcgis.animation.IAGAnimationTracks (in)
pEnvironment - A reference to a com.esri.arcgis.animation.IAGAnimationEnvironment (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

calculateDisplayFrames

public void calculateDisplayFrames(IAGAnimationTracks pTracks,
                                   int[] pFrames)
                            throws IOException,
                                   AutomationException
Calculate the number of frames to display based on the minimum animation interval.

Remarks

This utility function calculates the minimum number of frames required by a time animation to show every detail in the data. The calculation is based on the minimum time interval and the span of the time tracks. The input animation tracks are specified by pTracks, and the output number is stored in pFrames.

Product Availability

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

Specified by:
calculateDisplayFrames in interface IAGAnimationUtils
Parameters:
pTracks - A reference to a com.esri.arcgis.animation.IAGAnimationTracks (in)
pFrames - The pFrames (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveAnimationFile

public void saveAnimationFile(IAGAnimationContainer pContainer,
                              String pFilename,
                              int version)
                       throws IOException,
                              AutomationException
Save the animation to a file.

Remarks

This is the utility function to save an animation as a file. When an animation is saved as a file, all the animation environment settings, keyframe and track properties from the animation container (specified by pContainer) are persisted.

Product Availability

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

Specified by:
saveAnimationFile in interface IAGAnimationUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
pFilename - The pFilename (in)
version - A com.esri.arcgis.system.esriArcGISVersion constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadAnimationFile

public void loadAnimationFile(IAGAnimationContainer pContainer,
                              String pFilename)
                       throws IOException,
                              AutomationException
Load the animation from a file.

Remarks

Load an animation file into an animation container as specified by pContainer.

Product Availability

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

Specified by:
loadAnimationFile in interface IAGAnimationUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
pFilename - The pFilename (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCameraProperties

public void getCameraProperties(IAGAnimationContainer pContainer,
                                IDoubleArray[] ppCameraProps)
                         throws IOException,
                                AutomationException
The camera properties.

Product Availability

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

Specified by:
getCameraProperties in interface IVideoExportUtils2
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
ppCameraProps - A reference to a com.esri.arcgis.system.IDoubleArray (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

restorePreviousContext

public void restorePreviousContext(IAGAnimationContainer pContainer)
                            throws IOException,
                                   AutomationException
Restores the OpenGL rendering context after offscreen video export.

Product Availability

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

Specified by:
restorePreviousContext in interface IVideoExportUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOffScreenBitmapHandle

public void getOffScreenBitmapHandle(IAGAnimationContainer pContainer,
                                     int[] phBitmap)
                              throws IOException,
                                     AutomationException
The bitmap handle from an offscreen rendering buffer.

Product Availability

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

Specified by:
getOffScreenBitmapHandle in interface IVideoExportUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
phBitmap - The phBitmap (A COM typedef) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWindowBitmapHandle

public void getWindowBitmapHandle(IAGAnimationContainer pContainer,
                                  int[] phBitmap)
                           throws IOException,
                                  AutomationException
The bitmap handle from an OpenGL or GDI rendered window.

Product Availability

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

Specified by:
getWindowBitmapHandle in interface IVideoExportUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
phBitmap - The phBitmap (A COM typedef) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOffScreenTiledBitmapHandle

public void getOffScreenTiledBitmapHandle(IAGAnimationContainer pContainer,
                                          tagRECT pOutputRect,
                                          int[] phBitmap)
                                   throws IOException,
                                          AutomationException
The tiled bitmap handle from an offscreen rendering buffer.

Remarks

Using this method, you can export a custom resolution image (bitmap) from map or globe. The bitmap handle returned can be used to create a bitmap on disk. This method makes use of the offscreen rendering, which allows you to capture the bitmap even if a window is covering the main viewer. Offscreen rendering works best if your application window is maximized.

Product Availability

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

Specified by:
getOffScreenTiledBitmapHandle in interface IVideoExportUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
pOutputRect - A Structure: com.esri.arcgis.system.tagRECT (in)
phBitmap - The phBitmap (A COM typedef) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isBBoxNavigationMode

public boolean isBBoxNavigationMode(IAGAnimationContainer pContainer)
                             throws IOException,
                                    AutomationException
Indicates bounding box navigation mode.

Product Availability

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

Specified by:
isBBoxNavigationMode in interface IVideoExportUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
Returns:
The pbBBoxMode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBBoxNavigationMode

public void setBBoxNavigationMode(IAGAnimationContainer pContainer,
                                  boolean pbBBoxMode)
                           throws IOException,
                                  AutomationException
Indicates bounding box navigation mode.

Product Availability

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

Specified by:
setBBoxNavigationMode in interface IVideoExportUtils
Parameters:
pContainer - A reference to a com.esri.arcgis.animation.IAGAnimationContainer (in)
pbBBoxMode - The pbBBoxMode (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws IOException,
                                 AutomationException
enumConnectionPoints

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws IOException,
                                AutomationException
findConnectionPoint

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppCP - A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.