com.esri.arcgis.animation
Class AGAnimationUtils

java.lang.Object
  extended bycom.esri.arcgis.animation.AGAnimationUtils
All Implemented Interfaces:
IAGAnimationPlayer, IAGAnimationUtils, IConnectionPointContainer, IVideoExportUtils, java.io.Serializable

public class AGAnimationUtils
extends java.lang.Object
implements IAGAnimationPlayer, IAGAnimationUtils, IVideoExportUtils, IConnectionPointContainer

Class containing common implementation of utility methods.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
AGAnimationUtils()
          Constructs a AGAnimationUtils using ArcGIS Engine.
AGAnimationUtils(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 void addIAnimationEventsListener(IAnimationEvents theListener)
           
 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)
          Supported Platforms
 boolean equals(java.lang.Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          Supported Platforms
 IAGAnimationPlayer getAsIAGAnimationPlayer()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IAGAnimationUtils getAsIAGAnimationUtils()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IConnectionPointContainer getAsIConnectionPointContainer()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IVideoExportUtils getAsIVideoExportUtils()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
static java.lang.String 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)
          The bounding box navigation mode.
 void keyframeFromBookmark(IAGAnimationContainer pContainer, ISpatialBookmark pBookmark, IAGKeyframe[] ppKeyframe)
          Create a view keyframe from a spatial bookmark.
 void loadAnimationFile(IAGAnimationContainer pContainer, java.lang.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)
           
 void restorePreviousContext(IAGAnimationContainer pContainer)
          Restores the OpenGL rendering context after offscreen video export.
 void saveAnimationFile(IAGAnimationContainer pContainer, java.lang.String pFilename, int version)
          Save the animation to a file.
 void setBBoxNavigationMode(IAGAnimationContainer pContainer, boolean pbBBoxMode)
          The 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
 

Constructor Detail

AGAnimationUtils

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

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

AGAnimationUtils

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

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.
AGAnimationUtils theAGAnimationUtils = (AGAnimationUtils) 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()

getAsIAGAnimationPlayer

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


getAsIAGAnimationUtils

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


getAsIVideoExportUtils

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


getAsIConnectionPointContainer

public IConnectionPointContainer getAsIConnectionPointContainer()
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


addIAnimationEventsListener

public void addIAnimationEventsListener(IAnimationEvents theListener)
                                 throws java.io.IOException
Throws:
java.io.IOException

removeIAnimationEventsListener

public void removeIAnimationEventsListener(IAnimationEvents theListener)
                                    throws java.io.IOException
Throws:
java.io.IOException

playAnimation

public void playAnimation(IAGAnimationTracks pTracks,
                          IAGAnimationEnvironment pEnvironment,
                          IStatusBar pStatusBar)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IAGAnimationPlayer
Plays the animation according to the animation environment options.

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

recordAnimation

public void recordAnimation(IAGAnimationTracks pTracks,
                            IAGAnimationEnvironment pEnvironment,
                            boolean bOverwrite)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IAGAnimationPlayer
Records a view animation.

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

pauseAnimation

public void pauseAnimation()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IAGAnimationPlayer
Pauses the playing or recording of the animation.

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

stopAnimation

public void stopAnimation()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IAGAnimationPlayer
Stops playing or recording the animation.

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

createLayerGroupAnimation

public void createLayerGroupAnimation(IAGAnimationContainer pContainer,
                                      IAGGroupAnimationOptions pOptions)
                               throws java.io.IOException,
                                      AutomationException
Description copied from interface: IAGAnimationUtils
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.

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

createFlybyFromPath

public void createFlybyFromPath(IAGAnimationContainer pContainer,
                                IAGImportPathOptions pOptions)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IAGAnimationUtils
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.

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

keyframeFromBookmark

public void keyframeFromBookmark(IAGAnimationContainer pContainer,
                                 ISpatialBookmark pBookmark,
                                 IAGKeyframe[] ppKeyframe)
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IAGAnimationUtils
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.

 

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:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

captureCurrentView

public void captureCurrentView(IAGAnimationTracks pTracks,
                               IAGAnimationEnvironment pEnvironment)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IAGAnimationUtils
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).

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

calculateDisplayFrames

public void calculateDisplayFrames(IAGAnimationTracks pTracks,
                                   int[] pFrames)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IAGAnimationUtils
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.

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

saveAnimationFile

public void saveAnimationFile(IAGAnimationContainer pContainer,
                              java.lang.String pFilename,
                              int version)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IAGAnimationUtils
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.

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:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadAnimationFile

public void loadAnimationFile(IAGAnimationContainer pContainer,
                              java.lang.String pFilename)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IAGAnimationUtils
Load the animation from a file.

Remarks

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

 

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

restorePreviousContext

public void restorePreviousContext(IAGAnimationContainer pContainer)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IVideoExportUtils
Restores the OpenGL rendering context after offscreen video export.

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

getOffScreenBitmapHandle

public void getOffScreenBitmapHandle(IAGAnimationContainer pContainer,
                                     int[] phBitmap)
                              throws java.io.IOException,
                                     AutomationException
Description copied from interface: IVideoExportUtils
The bitmap handle from an offscreen rendering buffer.

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:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWindowBitmapHandle

public void getWindowBitmapHandle(IAGAnimationContainer pContainer,
                                  int[] phBitmap)
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IVideoExportUtils
The bitmap handle from an OpenGL or GDI rendered window.

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:
java.io.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 java.io.IOException,
                                          AutomationException
Description copied from interface: IVideoExportUtils
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.

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

isBBoxNavigationMode

public boolean isBBoxNavigationMode(IAGAnimationContainer pContainer)
                             throws java.io.IOException,
                                    AutomationException
Description copied from interface: IVideoExportUtils
The bounding box navigation mode.

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

setBBoxNavigationMode

public void setBBoxNavigationMode(IAGAnimationContainer pContainer,
                                  boolean pbBBoxMode)
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IVideoExportUtils
The bounding box navigation mode.

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

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IConnectionPointContainer

Supported Platforms

Windows, Solaris, Linux

Description

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

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

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IConnectionPointContainer

Supported Platforms

Windows, Solaris, Linux

Description

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

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.