|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.enginecore.GraphicTracker
public class GraphicTracker
A collection of Graphics that will be displayed on a Map or Globe
Constructor Summary | |
---|---|
GraphicTracker()
Constructs a GraphicTracker using ArcGIS Engine. |
|
GraphicTracker(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. GraphicTracker theGraphicTracker = (GraphicTracker) obj; |
Method Summary | |
---|---|
int |
add(IGeometry pGeometry,
IGraphicTrackerSymbol pGraphicTrackerSymbol)
Adds a new graphic from the given geometry and symbol. |
void |
addIActiveViewEventsListener(IActiveViewEvents theListener)
addIActiveViewEventsListener. |
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. |
boolean |
equals(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
int |
getCount()
Indicates the number of graphics in the collection. |
int |
hashCode()
the hashcode for this object |
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 |
removeIActiveViewEventsListener(IActiveViewEvents theListener)
removeIActiveViewEventsListener. |
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. |
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 |
---|
public GraphicTracker() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic GraphicTracker(Object obj) throws IOException
GraphicTracker theGraphicTracker = (GraphicTracker) obj;
obj
to GraphicTracker
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void addIActiveViewEventsListener(IActiveViewEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.carto.IActiveViewEvents interface.
IOException
- If there are communications problems.public void removeIActiveViewEventsListener(IActiveViewEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.carto.IActiveViewEvents interface.
IOException
- If there are communications problems.public int getCount() throws IOException, AutomationException
The number of graphics tracked.
getCount
in interface IGraphicTracker
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGraphicTrackerSymbol createSymbol(ISymbol pSymbol2D, ISymbol pSymbol3D) throws IOException, AutomationException
createSymbol
in interface IGraphicTracker
pSymbol2D
- A reference to a com.esri.arcgis.display.ISymbol (in)pSymbol3D
- A reference to a com.esri.arcgis.display.ISymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGraphicTrackerSymbol createSymbolFromPath(String pathTo2D, String pathTo3D) throws IOException, AutomationException
createSymbolFromPath
in interface IGraphicTracker
pathTo2D
- The pathTo2D (in)pathTo3D
- The pathTo3D (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int add(IGeometry pGeometry, IGraphicTrackerSymbol pGraphicTrackerSymbol) throws IOException, AutomationException
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.
add
in interface IGraphicTracker
pGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)pGraphicTrackerSymbol
- A reference to a com.esri.arcgis.enginecore.IGraphicTrackerSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void remove(int id) throws IOException, AutomationException
Removes the graphic; so it is no longer tracked.
remove
in interface IGraphicTracker
id
- The id (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void removeAll() throws IOException, AutomationException
Removes all graphics; so they are no longer tracked.
removeAll
in interface IGraphicTracker
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void replace(int id, IGeometry pGeometry, IGraphicTrackerSymbol pGraphicTrackerSymbol) throws IOException, AutomationException
Replaces both the symbol and geometry associated with a graphic.
replace
in interface IGraphicTracker
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void initialize(Object pMapOrGlobe) throws IOException, AutomationException
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.
initialize
in interface IGraphicTracker
pMapOrGlobe
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLabel(int id, String newLabel) throws IOException, AutomationException
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.
setLabel
in interface IGraphicTracker
id
- The id (in)newLabel
- The newLabel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setGeometry(int id, IGeometry pGeometry) throws IOException, AutomationException
setGeometry
in interface IGraphicTracker
id
- The id (in)pGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSymbol(int id, IGraphicTrackerSymbol pGraphicTrackerSymbol) throws IOException, AutomationException
setSymbol
in interface IGraphicTracker
id
- The id (in)pGraphicTrackerSymbol
- A reference to a com.esri.arcgis.enginecore.IGraphicTrackerSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setScaleMode(int id, int eScale) throws IOException, AutomationException
setScaleMode
in interface IGraphicTracker
id
- The id (in)eScale
- A com.esri.arcgis.enginecore.esriGTScale constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOrientationMode(int id, int eOrientation) throws IOException, AutomationException
setOrientationMode
in interface IGraphicTracker
id
- The id (in)eOrientation
- A com.esri.arcgis.enginecore.esriGTOrientation constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setElevationMode(int id, int eElevation) throws IOException, AutomationException
setElevationMode
in interface IGraphicTracker
id
- The id (in)eElevation
- A com.esri.arcgis.enginecore.esriGTElevation constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setVisible(int id, boolean bVisible) throws IOException, AutomationException
Sets the graphic to be visible or invisible.
setVisible
in interface IGraphicTracker
id
- The id (in)bVisible
- The bVisible (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTransparency(int id, int lTransparency) throws IOException, AutomationException
Sets the graphic to be transparent or not. This is used only in 2D mode and only if the graphic's symbol supports ISymbolEffects.
setTransparency
in interface IGraphicTracker
id
- The id (in)lTransparency
- The lTransparency (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTextSymbol(int id, ISimpleTextSymbol pSymbol) throws IOException, AutomationException
Sets the text symbol which will be used for the graphic's label.
setTextSymbol
in interface IGraphicTracker
id
- The id (in)pSymbol
- A reference to a com.esri.arcgis.display.ISimpleTextSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPointOrientation(int id, double dPitch, double dRoll, double dYaw) throws IOException, AutomationException
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.
setPointOrientation
in interface IGraphicTracker
id
- The id (in)dPitch
- The dPitch (in)dRoll
- The dRoll (in)dYaw
- The dYaw (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPointSymbolSize(int id, double size) throws IOException, AutomationException
Sets the point symbol's size without the need to create an additional graphic tracker symbol.
setPointSymbolSize
in interface IGraphicTracker
id
- The id (in)size
- The size (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void highlight(int id, boolean bHighlight) throws IOException, AutomationException
Highlights or unhighlights the graphic. More than one graphic can be highlighted at a time.
highlight
in interface IGraphicTracker
id
- The id (in)bHighlight
- The bHighlight (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int hitTest(int x, int y) throws IOException, AutomationException
Returns the id of the graphic that was hit or -1 if no graphic was hit.
hitTest
in interface IGraphicTracker
x
- The x (in)y
- The y (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void moveTo(int id, double x, double y, double z) throws IOException, AutomationException
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.
moveTo
in interface IGraphicTracker
id
- The id (in)x
- The x (in)y
- The y (in)z
- The z (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isSuspendUpdate() throws IOException, AutomationException
isSuspendUpdate
in interface IGraphicTracker
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSuspendUpdate(boolean suspendUpdate) throws IOException, AutomationException
setSuspendUpdate
in interface IGraphicTracker
suspendUpdate
- The suspendUpdate (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |