com.esri.arcgis.enginecore
Interface IGraphicTracker

All Superinterfaces:
Serializable
All Known Implementing Classes:
GraphicTracker

public interface IGraphicTracker
extends Serializable

Provides access to members that set the state of a Graphic Tracker object

Product Availability

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


Method Summary
 int add(IGeometry pGeometry, IGraphicTrackerSymbol pGraphicTrackerSymbol)
          Adds a new graphic from the given geometry and symbol.
 IGraphicTrackerSymbol createSymbol(ISymbol pSymbol2D, ISymbol pSymbol3D)
          Creates a Graphic Tracker symbol given a 2D and a 3D symbol.
 IGraphicTrackerSymbol createSymbolFromPath(String pathTo2D, String pathTo3D)
          Creates a Graphic Tracker symbol given a path to a 2D symbol and a path to a 3D symbol.
 int getCount()
          Indicates the number of graphics in the collection.
 void highlight(int id, boolean bHighlight)
          Emphasizes the graphic.
 int hitTest(int x, int y)
          Returns the ID of the first graphic touched by the input window coordinates.
 void initialize(Object pMapOrGlobe)
          Sets the Map or Globe that will be used to render the Graphic Tracker.
 boolean isSuspendUpdate()
          Disables automatic refreshing of the display until unsuspended or until the display is explicitly refreshed.
 void moveTo(int id, double x, double y, double z)
          Moves the given graphic to the location specified by the input map coordinates.
 void remove(int id)
          Removes the graphic specified by the supplied ID.
 void removeAll()
          Removes all graphics from the collection.
 void replace(int id, IGeometry pGeometry, IGraphicTrackerSymbol pGraphicTrackerSymbol)
          Creates a new graphic which will replace the element specified by the given ID.
 void setElevationMode(int id, int eElevation)
          Sets the elevation mode for the given graphic.
 void setGeometry(int id, IGeometry pGeometry)
          Sets a new geometry for the given graphic.
 void setLabel(int id, String newLabel)
          Sets a label for the given graphic.
 void setOrientationMode(int id, int eOrientation)
          Sets the orientation mode for the given graphic.
 void setPointOrientation(int id, double dPitch, double dRoll, double dYaw)
          Sets the orientation for the given point graphic.
 void setPointSymbolSize(int id, double size)
          Sets the symbol size for the given point graphic.
 void setScaleMode(int id, int eScale)
          Sets the scaling mode for the given graphic.
 void setSuspendUpdate(boolean suspendUpdate)
          Disables automatic refreshing of the display until unsuspended or until the display is explicitly refreshed.
 void setSymbol(int id, IGraphicTrackerSymbol pGraphicTrackerSymbol)
          Sets a new symbol for the given graphic.
 void setTextSymbol(int id, ISimpleTextSymbol pSymbol)
          Sets the text symbol for the given graphic.
 void setTransparency(int id, int lTransparency)
          Sets the transparency for the given graphic.
 void setVisible(int id, boolean bVisible)
          Sets the visibility for the given graphic.
 

Method Detail

getCount

int getCount()
             throws IOException,
                    AutomationException
Indicates the number of graphics in the collection.

Description

The number of graphics tracked.

Product Availability

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

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createSymbol

IGraphicTrackerSymbol createSymbol(ISymbol pSymbol2D,
                                   ISymbol pSymbol3D)
                                   throws IOException,
                                          AutomationException
Creates a Graphic Tracker symbol given a 2D and a 3D symbol.

Product Availability

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

Parameters:
pSymbol2D - A reference to a com.esri.arcgis.display.ISymbol (in)
pSymbol3D - A reference to a com.esri.arcgis.display.ISymbol (in)
Returns:
A reference to a com.esri.arcgis.enginecore.IGraphicTrackerSymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createSymbolFromPath

IGraphicTrackerSymbol createSymbolFromPath(String pathTo2D,
                                           String pathTo3D)
                                           throws IOException,
                                                  AutomationException
Creates a Graphic Tracker symbol given a path to a 2D symbol and a path to a 3D symbol.

Product Availability

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

Parameters:
pathTo2D - The pathTo2D (in)
pathTo3D - The pathTo3D (in)
Returns:
A reference to a com.esri.arcgis.enginecore.IGraphicTrackerSymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

int add(IGeometry pGeometry,
        IGraphicTrackerSymbol pGraphicTrackerSymbol)
        throws IOException,
               AutomationException
Adds a new graphic from the given geometry and symbol. The returned Id should be used to manage the graphic.

Description

Adds the symbol and geomety to be tracked and returns an integer used to identify the graphic. Only geometries which support IPoint, IPolyline and IPolygon can be added. The Graphic Tracker holds an internal copy of each geometry and symbol supplied to it. The symbol must be appropriate for the geometry type; i.e. use fill symbols, not point symbols, to represent polygon geometries.The first graphic added will appear underneath subsequent graphics if they have overlapping display areas.

Product Availability

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

Parameters:
pGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pGraphicTrackerSymbol - A reference to a com.esri.arcgis.enginecore.IGraphicTrackerSymbol (in)
Returns:
The id
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remove

void remove(int id)
            throws IOException,
                   AutomationException
Removes the graphic specified by the supplied ID.

Description

Removes the graphic; so it is no longer tracked.

Product Availability

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

Parameters:
id - The id (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeAll

void removeAll()
               throws IOException,
                      AutomationException
Removes all graphics from the collection.

Description

Removes all graphics; so they are no longer tracked.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replace

void replace(int id,
             IGeometry pGeometry,
             IGraphicTrackerSymbol pGraphicTrackerSymbol)
             throws IOException,
                    AutomationException
Creates a new graphic which will replace the element specified by the given ID.

Description

Replaces both the symbol and geometry associated with a graphic.

Product Availability

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

Parameters:
id - The id (in)
pGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pGraphicTrackerSymbol - A reference to a com.esri.arcgis.enginecore.IGraphicTrackerSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initialize

void initialize(Object pMapOrGlobe)
                throws IOException,
                       AutomationException
Sets the Map or Globe that will be used to render the Graphic Tracker.

Description

Initializes the Graphic Tracker to use either a map or globe. In 2D, setting a reference scale to the map will set it to the GT as well.

Product Availability

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

Parameters:
pMapOrGlobe - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLabel

void setLabel(int id,
              String newLabel)
              throws IOException,
                     AutomationException
Sets a label for the given graphic.

Description

Sets a text label for the graphic. If you don't use the SetTextSymbol() method first then a default text symbol will be used. Call SetLabel with an empty string to remove the label.

Product Availability

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

Parameters:
id - The id (in)
newLabel - The newLabel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGeometry

void setGeometry(int id,
                 IGeometry pGeometry)
                 throws IOException,
                        AutomationException
Sets a new geometry for the given graphic.

Product Availability

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

Parameters:
id - The id (in)
pGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSymbol

void setSymbol(int id,
               IGraphicTrackerSymbol pGraphicTrackerSymbol)
               throws IOException,
                      AutomationException
Sets a new symbol for the given graphic.

Product Availability

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

Parameters:
id - The id (in)
pGraphicTrackerSymbol - A reference to a com.esri.arcgis.enginecore.IGraphicTrackerSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setScaleMode

void setScaleMode(int id,
                  int eScale)
                  throws IOException,
                         AutomationException
Sets the scaling mode for the given graphic.

Product Availability

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

Parameters:
id - The id (in)
eScale - A com.esri.arcgis.enginecore.esriGTScale constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOrientationMode

void setOrientationMode(int id,
                        int eOrientation)
                        throws IOException,
                               AutomationException
Sets the orientation mode for the given graphic.

Product Availability

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

Parameters:
id - The id (in)
eOrientation - A com.esri.arcgis.enginecore.esriGTOrientation constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setElevationMode

void setElevationMode(int id,
                      int eElevation)
                      throws IOException,
                             AutomationException
Sets the elevation mode for the given graphic.

Product Availability

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

Parameters:
id - The id (in)
eElevation - A com.esri.arcgis.enginecore.esriGTElevation constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setVisible

void setVisible(int id,
                boolean bVisible)
                throws IOException,
                       AutomationException
Sets the visibility for the given graphic.

Description

Sets the graphic to be visible or invisible.

Product Availability

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

Parameters:
id - The id (in)
bVisible - The bVisible (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTransparency

void setTransparency(int id,
                     int lTransparency)
                     throws IOException,
                            AutomationException
Sets the transparency for the given graphic.

Description

Sets the graphic to be transparent or not. This is used only in 2D mode and only if the graphic's symbol supports ISymbolEffects.

Product Availability

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

Parameters:
id - The id (in)
lTransparency - The lTransparency (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTextSymbol

void setTextSymbol(int id,
                   ISimpleTextSymbol pSymbol)
                   throws IOException,
                          AutomationException
Sets the text symbol for the given graphic.

Description

Sets the text symbol which will be used for the graphic's label.

Product Availability

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

Parameters:
id - The id (in)
pSymbol - A reference to a com.esri.arcgis.display.ISimpleTextSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPointOrientation

void setPointOrientation(int id,
                         double dPitch,
                         double dRoll,
                         double dYaw)
                         throws IOException,
                                AutomationException
Sets the orientation for the given point graphic. Note that the orientation will only be applied if the graphic has its orientation mode set to esriGTOrientationFixed.

Description

Sets the point symbol's orientation to the supplied pitch, roll and yaw values. This applies only if the graphic's orientation is fixed using the SetOrientation() method. In 2D, only the yaw value is used.

Product Availability

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

Parameters:
id - The id (in)
dPitch - The dPitch (in)
dRoll - The dRoll (in)
dYaw - The dYaw (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPointSymbolSize

void setPointSymbolSize(int id,
                        double size)
                        throws IOException,
                               AutomationException
Sets the symbol size for the given point graphic.

Description

Sets the point symbol's size without the need to create an additional graphic tracker symbol.

Product Availability

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

Parameters:
id - The id (in)
size - The size (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

highlight

void highlight(int id,
               boolean bHighlight)
               throws IOException,
                      AutomationException
Emphasizes the graphic.

Description

Highlights or unhighlights the graphic. More than one graphic can be highlighted at a time.

Product Availability

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

Parameters:
id - The id (in)
bHighlight - The bHighlight (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hitTest

int hitTest(int x,
            int y)
            throws IOException,
                   AutomationException
Returns the ID of the first graphic touched by the input window coordinates.

Description

Returns the id of the graphic that was hit or -1 if no graphic was hit.

Product Availability

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

Parameters:
x - The x (in)
y - The y (in)
Returns:
The id
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveTo

void moveTo(int id,
            double x,
            double y,
            double z)
            throws IOException,
                   AutomationException
Moves the given graphic to the location specified by the input map coordinates.

Description

Moves the point, polyline or polygon geometry associated with a graphic according to its centroid's location. In 2D, the z-value is not used.

Product Availability

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

Parameters:
id - The id (in)
x - The x (in)
y - The y (in)
z - The z (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSuspendUpdate

boolean isSuspendUpdate()
                        throws IOException,
                               AutomationException
Disables automatic refreshing of the display until unsuspended or until the display is explicitly refreshed. Suspending automatic refresh is ideal before bulk updates.

Description

Suspends update (i.e refresh) of the display. This property is false by default. This means the GraphicTracker will automatically refresh the display after each graphic is changed.
Setting this property to true, moving the graphics and then setting this property to false will result in one refresh call and will draw all graphics at once. In an dynamic map, this property is not relevant.

Product Availability

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

Returns:
The suspendUpdate
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSuspendUpdate

void setSuspendUpdate(boolean suspendUpdate)
                      throws IOException,
                             AutomationException
Disables automatic refreshing of the display until unsuspended or until the display is explicitly refreshed. Suspending automatic refresh is ideal before bulk updates.

Description

Suspends update (i.e refresh) of the display. This property is false by default. This means the GraphicTracker will automatically refresh the display after each graphic is changed.
Setting this property to true, moving the graphics and then setting this property to false will result in one refresh call and will draw all graphics at once. In an dynamic map, this property is not relevant.

Product Availability

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

Parameters:
suspendUpdate - The suspendUpdate (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.