com.esri.arcgis.display
Class LineTracker

java.lang.Object
  extended by com.esri.arcgis.display.LineTracker
All Implemented Interfaces:
IPointCollectionTracker, ISelectionTracker, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class LineTracker
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISelectionTracker, IPointCollectionTracker

Display feedback for line tracking.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
LineTracker()
          Constructs a LineTracker using ArcGIS Engine.
LineTracker(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
LineTracker theLineTracker = (LineTracker) obj;
 
Method Summary
 boolean deactivate()
          Cancel tracking.
 void draw(IDisplay display, int hDC, int style)
          Draw selection indicater.
 boolean equals(Object o)
          Compare this object with another
 int findNodeIndex(IPoint cursorPosition)
          Finds the node index for the vertex under the given point.
 IEnvelope getBounds(IDisplay display)
          The area covered by the tracker including handles.
static String getClsid()
          getClsid.
 IGeometry getGeometry()
          Geometry used for tracking feedback.
 int hashCode()
          the hashcode for this object
 int hitTest(IPoint point)
          Check if mouse is over tracker.
 boolean isLocked()
          Indicates if the tracker is locked or not.
 boolean isShowHandles()
          Indicates if the tracker is showing handles or not.
 boolean onKeyDown(int keyCode, int shift)
          Special keypress processing while tracking.
 boolean onKeyUp(int keyCode, int shift)
          Special keypress processing while tracking.
 void onMouseDown(int button, int shift, int x, int y)
          Begin tracking move or resize based on the location of the mouse over the tracker handles.
 void onMouseMove(int button, int shift, int x, int y)
          In process move or resize tracking.
 void onMouseUp(int button, int shift, int x, int y)
          Finish move or resize tracking.
 int queryCursor(IPoint point)
          If the mouse is over the tracker, return an HCURSOR to indicate legal operations based on mouse's relation to selection handles: move resize, etc.
 void queryMoveFeedback(IDisplayFeedback moveFeedback)
          The move feedback for the selection tracker.
 void queryResizeFeedback(IDisplayFeedback resizeFeedback)
          The resize feedback for the selection tracker.
 void setDisplayByRef(IScreenDisplay rhs1)
          The display used by the tracker.
 void setGeometry(IGeometry geometry)
          Geometry used for tracking feedback.
 void setLocked(boolean locked)
          Indicates if the tracker is locked or not.
 void setShowHandles(boolean showHandles)
          Indicates if the tracker is showing handles or not.
 
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

LineTracker

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

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

LineTracker

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

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

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

setDisplayByRef

public void setDisplayByRef(IScreenDisplay rhs1)
                     throws IOException,
                            AutomationException
The display used by the tracker.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setDisplayByRef in interface ISelectionTracker
Parameters:
rhs1 - A reference to a com.esri.arcgis.display.IScreenDisplay (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGeometry

public void setGeometry(IGeometry geometry)
                 throws IOException,
                        AutomationException
Geometry used for tracking feedback.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setGeometry in interface ISelectionTracker
Parameters:
geometry - 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.

getGeometry

public IGeometry getGeometry()
                      throws IOException,
                             AutomationException
Geometry used for tracking feedback.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getGeometry in interface ISelectionTracker
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.

getBounds

public IEnvelope getBounds(IDisplay display)
                    throws IOException,
                           AutomationException
The area covered by the tracker including handles.

Product Availability

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

Specified by:
getBounds in interface ISelectionTracker
Parameters:
display - A reference to a com.esri.arcgis.display.IDisplay (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryCursor

public int queryCursor(IPoint point)
                throws IOException,
                       AutomationException
If the mouse is over the tracker, return an HCURSOR to indicate legal operations based on mouse's relation to selection handles: move resize, etc. Return 0 if mouse isn't over tracker.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryCursor in interface ISelectionTracker
Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Returns:
The cursor (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hitTest

public int hitTest(IPoint point)
            throws IOException,
                   AutomationException
Check if mouse is over tracker. Return a TrackerLocation to indicate which handle mouse is over.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
hitTest in interface ISelectionTracker
Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Returns:
A com.esri.arcgis.display.esriTrackerLocation constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

draw

public void draw(IDisplay display,
                 int hDC,
                 int style)
          throws IOException,
                 AutomationException
Draw selection indicater. Usually a color outline with selection handles.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
draw in interface ISelectionTracker
Parameters:
display - A reference to a com.esri.arcgis.display.IDisplay (in)
hDC - The hDC (A COM typedef) (in)
style - A com.esri.arcgis.display.esriTrackerStyle constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onMouseDown

public void onMouseDown(int button,
                        int shift,
                        int x,
                        int y)
                 throws IOException,
                        AutomationException
Begin tracking move or resize based on the location of the mouse over the tracker handles.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onMouseDown in interface ISelectionTracker
Parameters:
button - The button (in)
shift - The shift (in)
x - The x (in)
y - The y (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onMouseMove

public void onMouseMove(int button,
                        int shift,
                        int x,
                        int y)
                 throws IOException,
                        AutomationException
In process move or resize tracking.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onMouseMove in interface ISelectionTracker
Parameters:
button - The button (in)
shift - The shift (in)
x - The x (in)
y - The y (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onMouseUp

public void onMouseUp(int button,
                      int shift,
                      int x,
                      int y)
               throws IOException,
                      AutomationException
Finish move or resize tracking.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onMouseUp in interface ISelectionTracker
Parameters:
button - The button (in)
shift - The shift (in)
x - The x (in)
y - The y (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onKeyDown

public boolean onKeyDown(int keyCode,
                         int shift)
                  throws IOException,
                         AutomationException
Special keypress processing while tracking.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onKeyDown in interface ISelectionTracker
Parameters:
keyCode - The keyCode (in)
shift - The shift (in)
Returns:
The complete
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onKeyUp

public boolean onKeyUp(int keyCode,
                       int shift)
                throws IOException,
                       AutomationException
Special keypress processing while tracking.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onKeyUp in interface ISelectionTracker
Parameters:
keyCode - The keyCode (in)
shift - The shift (in)
Returns:
The complete
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deactivate

public boolean deactivate()
                   throws IOException,
                          AutomationException
Cancel tracking.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deactivate in interface ISelectionTracker
Returns:
The complete
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLocked

public void setLocked(boolean locked)
               throws IOException,
                      AutomationException
Indicates if the tracker is locked or not. Locked means nodes cannot be moved.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setLocked in interface ISelectionTracker
Parameters:
locked - The locked (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLocked

public boolean isLocked()
                 throws IOException,
                        AutomationException
Indicates if the tracker is locked or not. Locked means nodes cannot be moved.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isLocked in interface ISelectionTracker
Returns:
The locked
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowHandles

public void setShowHandles(boolean showHandles)
                    throws IOException,
                           AutomationException
Indicates if the tracker is showing handles or not.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setShowHandles in interface ISelectionTracker
Parameters:
showHandles - The showHandles (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isShowHandles

public boolean isShowHandles()
                      throws IOException,
                             AutomationException
Indicates if the tracker is showing handles or not.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isShowHandles in interface ISelectionTracker
Returns:
The showHandles
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryMoveFeedback

public void queryMoveFeedback(IDisplayFeedback moveFeedback)
                       throws IOException,
                              AutomationException
The move feedback for the selection tracker.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryMoveFeedback in interface ISelectionTracker
Parameters:
moveFeedback - A reference to a com.esri.arcgis.display.IDisplayFeedback (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryResizeFeedback

public void queryResizeFeedback(IDisplayFeedback resizeFeedback)
                         throws IOException,
                                AutomationException
The resize feedback for the selection tracker.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryResizeFeedback in interface ISelectionTracker
Parameters:
resizeFeedback - A reference to a com.esri.arcgis.display.IDisplayFeedback (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findNodeIndex

public int findNodeIndex(IPoint cursorPosition)
                  throws IOException,
                         AutomationException
Finds the node index for the vertex under the given point. Returns -1 if the point is not within the tolerance distance of a vertex in the point collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findNodeIndex in interface IPointCollectionTracker
Parameters:
cursorPosition - A reference to a com.esri.arcgis.geometry.IPoint (in)
Returns:
The nodeIndex
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.