com.esri.arcgis.display
Class RubberEnvelope

java.lang.Object
  extended by com.esri.arcgis.display.RubberEnvelope
All Implemented Interfaces:
IRubberBand, IRubberBand2, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class RubberEnvelope
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IRubberBand, IRubberBand2

Rubberbanding class for simple envelopes.

Description

Use RubberEnvelope to either create a new IEnvelope object or to track an existing one.

Remarks

RubberEnvelope implements the IRubberBand interface, which contains the TrackNew and TrackExisting methods. Use the TrackNew method to digitize a new rectangle on the map. Use the TrackExisting method to track existing envelopes. Both methods are commonly used in the MouseDown event.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
RubberEnvelope()
          Constructs a RubberEnvelope using ArcGIS Engine.
RubberEnvelope(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RubberEnvelope theRubberEnvelope = (RubberEnvelope) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 boolean isShiftToConstrain()
          Indicates whether the shift key constrain the shape.
 void setShiftToConstrain(boolean flag)
          Indicates whether the shift key constrain the shape.
 boolean trackExisting(IScreenDisplay screenDisplay, ISymbol symbol, IGeometry geometry)
          Indicates if to move or reshape an existing shape on the specified screen in response to a mouse down event.
 IGeometry trackNew(IScreenDisplay screenDisplay, ISymbol symbol)
          Call in response to mouse down event to rubberband a new shape on the specified screen.
 
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

RubberEnvelope

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

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

RubberEnvelope

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

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

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

trackNew

public IGeometry trackNew(IScreenDisplay screenDisplay,
                          ISymbol symbol)
                   throws IOException,
                          AutomationException
Call in response to mouse down event to rubberband a new shape on the specified screen.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
trackNew in interface IRubberBand
Specified by:
trackNew in interface IRubberBand2
Parameters:
screenDisplay - A reference to a com.esri.arcgis.display.IScreenDisplay (in)
symbol - A reference to a com.esri.arcgis.display.ISymbol (in)
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.

trackExisting

public boolean trackExisting(IScreenDisplay screenDisplay,
                             ISymbol symbol,
                             IGeometry geometry)
                      throws IOException,
                             AutomationException
Indicates if to move or reshape an existing shape on the specified screen in response to a mouse down event.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
trackExisting in interface IRubberBand
Specified by:
trackExisting in interface IRubberBand2
Parameters:
screenDisplay - A reference to a com.esri.arcgis.display.IScreenDisplay (in)
symbol - A reference to a com.esri.arcgis.display.ISymbol (in)
geometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
The completed
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isShiftToConstrain

public boolean isShiftToConstrain()
                           throws IOException,
                                  AutomationException
Indicates whether the shift key constrain the shape.

Product Availability

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

Specified by:
isShiftToConstrain in interface IRubberBand2
Returns:
The flag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShiftToConstrain

public void setShiftToConstrain(boolean flag)
                         throws IOException,
                                AutomationException
Indicates whether the shift key constrain the shape.

Product Availability

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

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