com.esri.arcgis.carto
Class DimensionShape

java.lang.Object
  extended by com.esri.arcgis.carto.DimensionShape
All Implemented Interfaces:
IDimensionShape, ITransform2D, com.esri.arcgis.interop.RemoteObjRef, IClone, IPersist, IPersistStream, Externalizable, Serializable

public class DimensionShape
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDimensionShape, IClone, IPersist, IPersistStream, ITransform2D, Externalizable

A dimension shape associated with a dimesion feature.

Description

The DimensionShape coclass stores the geometry for a DimensionFeature.

Remarks

The DimensionShape coclass stores points for a dimension’s measurements. The DimensionFeature and DimensionGraphic use DimensionShapes to draw and store DimensionFeatures.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
DimensionShape()
          Constructs a DimensionShape using ArcGIS Engine.
DimensionShape(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
DimensionShape theDimensionShape = (DimensionShape) obj;
 
Method Summary
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 IPoint getBeginDimensionPoint()
          The begin dimension point.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 IPoint getDimensionLinePoint()
          The point which describes the height of the dimension line.
 IPoint getEndDimensionPoint()
          The end dimension point.
 double getExtensionLineAngle()
          The angle of the extension lines in radians.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 double getTextAngle()
          The angle of the text in radians.
 IPoint getTextPoint()
          The point for the text placement.
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 boolean isEqual(IClone other)
          Indicates if the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Indicates if the receiver and other are the same object.
 void load(IStream pstm)
          load
 void move(double dx, double dy)
          Moves dx units horizontally and dy units vertically.
 void moveVector(ILine v)
          Moves a direction and distance v.
 void readExternal(ObjectInput in)
           
 void rotate(IPoint origin, double rotationAngle)
          Rotates about the specified origin point.
 void save(IStream pstm, int fClearDirty)
          save
 void scale(IPoint origin, double sx, double sy)
          Scales about the specified origin using seperate horizonal and vertical scales.
 void setBeginDimensionPointByRef(IPoint point)
          The begin dimension point.
 void setDimensionLinePointByRef(IPoint point)
          The point which describes the height of the dimension line.
 void setEndDimensionPointByRef(IPoint point)
          The end dimension point.
 void setExtensionLineAngle(double angle)
          The angle of the extension lines in radians.
 void setTextAngle(double angle)
          The angle of the text in radians.
 void setTextPointByRef(IPoint point)
          The point for the text placement.
 void transform(int direction, ITransformation transformation)
          Applies an arbitrary transformation.
 void writeExternal(ObjectOutput out)
           
 
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

DimensionShape

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

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

DimensionShape

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

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

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

setBeginDimensionPointByRef

public void setBeginDimensionPointByRef(IPoint point)
                                 throws IOException,
                                        AutomationException
The begin dimension point.

Remarks

The BeginDimensionPoint and EndDimensionPoint properties define the Dimension’s measurement points.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getBeginDimensionPoint

public IPoint getBeginDimensionPoint()
                              throws IOException,
                                     AutomationException
The begin dimension point.

Remarks

The BeginDimensionPoint and EndDimensionPoint properties define the Dimension’s measurement points.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBeginDimensionPoint in interface IDimensionShape
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEndDimensionPointByRef

public void setEndDimensionPointByRef(IPoint point)
                               throws IOException,
                                      AutomationException
The end dimension point.

Remarks

The BeginDimensionPoint and EndDimensionPoint properties define the Dimension’s measurement points.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getEndDimensionPoint

public IPoint getEndDimensionPoint()
                            throws IOException,
                                   AutomationException
The end dimension point.

Remarks

The BeginDimensionPoint and EndDimensionPoint properties define the Dimension’s measurement points.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getEndDimensionPoint in interface IDimensionShape
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDimensionLinePoint

public IPoint getDimensionLinePoint()
                             throws IOException,
                                    AutomationException
The point which describes the height of the dimension line.

Remarks

The DimensionLinePoint property determines the height of the dimension line above the baseline. To create a two point dimension, the DimensionLinePoint must be the same value as the BeginDimensionPoint.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDimensionLinePoint in interface IDimensionShape
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDimensionLinePointByRef

public void setDimensionLinePointByRef(IPoint point)
                                throws IOException,
                                       AutomationException
The point which describes the height of the dimension line.

Remarks

The DimensionLinePoint property determines the height of the dimension line above the baseline. To create a two point dimension, the DimensionLinePoint must be the same value as the BeginDimensionPoint.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTextPoint

public IPoint getTextPoint()
                    throws IOException,
                           AutomationException
The point for the text placement.

Remarks

The DimensionShape supports a custom text location using the TextPoint property. For the default location of the dimension text, the TextPoint’s IGeometry::IsEmpty property should be True.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTextPoint in interface IDimensionShape
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTextPointByRef

public void setTextPointByRef(IPoint point)
                       throws IOException,
                              AutomationException
The point for the text placement.

Remarks

The DimensionShape supports a custom text location using the TextPoint property. For the default location of the dimension text, the TextPoint’s IGeometry::IsEmpty property should be True.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getExtensionLineAngle

public double getExtensionLineAngle()
                             throws IOException,
                                    AutomationException
The angle of the extension lines in radians.

Remarks

The ExtensionLineAngle property defines the angle between the dimension line and the extension line in degrees. This default angle is 90 degrees. Oblique dimensions have angles less than or greater than 90 degrees.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtensionLineAngle in interface IDimensionShape
Returns:
The angle
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExtensionLineAngle

public void setExtensionLineAngle(double angle)
                           throws IOException,
                                  AutomationException
The angle of the extension lines in radians.

Remarks

The ExtensionLineAngle property defines the angle between the dimension line and the extension line in degrees. This default angle is 90 degrees. Oblique dimensions have angles less than or greater than 90 degrees.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTextAngle

public double getTextAngle()
                    throws IOException,
                           AutomationException
The angle of the text in radians.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTextAngle in interface IDimensionShape
Returns:
The angle
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTextAngle

public void setTextAngle(double angle)
                  throws IOException,
                         AutomationException
The angle of the text in radians.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

esri_clone

public IClone esri_clone()
                  throws IOException,
                         AutomationException
Clones the receiver and assigns the result to *clone.

Product Availability

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

Specified by:
esri_clone in interface IClone
Returns:
A reference to a com.esri.arcgis.system.IClone
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

assign

public void assign(IClone src)
            throws IOException,
                   AutomationException
Assigns the properties of src to the receiver.

Description

Use Assign method to assign the properties of source object to receiver object. Both objects need to have the same CLSIDs. Both source and receiver objects need to be instantiated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
assign in interface IClone
Parameters:
src - A reference to a com.esri.arcgis.system.IClone (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
Indicates if the receiver and other have the same properties.

Description

IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEqual in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The equal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isIdentical

public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
Indicates if the receiver and other are the same object.

Description

IsIdentical returns true if the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isIdentical in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The identical
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

move

public void move(double dx,
                 double dy)
          throws IOException,
                 AutomationException
Moves dx units horizontally and dy units vertically.

Description

Moves the Geometry dX units along the X-Axis and dY units along the Y-Axis. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.

Remarks

Transform2D Move Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
move in interface ITransform2D
Parameters:
dx - The dx (in)
dy - The dy (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveVector

public void moveVector(ILine v)
                throws IOException,
                       AutomationException
Moves a direction and distance v. v can be in a different spatial reference than the geometry being moved.

Description

Moves the Geometry dX units along the X-Axis and dY units along the Y-Axis, where dX and dY are calculated from the input vector Line. Only the Length and Angle of the vector affect the transformation. The location of the vector does not change the transformation. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.

Remarks

Transform2D MoveVector Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
moveVector in interface ITransform2D
Parameters:
v - A reference to a com.esri.arcgis.geometry.ILine (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

scale

public void scale(IPoint origin,
                  double sx,
                  double sy)
           throws IOException,
                  AutomationException
Scales about the specified origin using seperate horizonal and vertical scales. The origin point can be in a different spatial reference than the geometry being scaled.

Description

Stretches the Geometry a factor of sX along the X-Axis and a factor of sY along the Y-Axis (where sX is the ratio of Old Width to New Width, and sY is the ratio of Old Height to New Height). The Origin point is the reference Point from which the transformation is performed (Regardless of the location of the Origin point, the Geometry resulting from the transformation is the same, except for a positional offset). The Origin is the only point in the transformation guaranted to remain in the same location after the transformation is complete.

Remarks

Note: Caution must be taken when scaling a CircularArc or a geometry containing CircularArc segments. Unless Abs(ScaleX) = Abs(ScaleY), the resulting CircularArcs will not retain the characteristics of the original geometry (since they remain CircularArcs).

Scale Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
scale in interface ITransform2D
Parameters:
origin - A reference to a com.esri.arcgis.geometry.IPoint (in)
sx - The sx (in)
sy - The sy (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rotate

public void rotate(IPoint origin,
                   double rotationAngle)
            throws IOException,
                   AutomationException
Rotates about the specified origin point. The angle is in radians. The origin can be in a different spatial reference than the geometry being rotated.

Description

Rotate performs an angular transform (rotation) on the Geometry. The Origin is the only point in the transformation guaranteed to remain in the same location after the transformation is performed. Regardless of the Origin, the transformed Geometry is the same, except for a positional offset. The RotationAngle is measured in radians.

Remarks

An Envelope cannot be Rotated.

Transform2D Rotate Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
rotate in interface ITransform2D
Parameters:
origin - A reference to a com.esri.arcgis.geometry.IPoint (in)
rotationAngle - The rotationAngle (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transform

public void transform(int direction,
                      ITransformation transformation)
               throws IOException,
                      AutomationException
Applies an arbitrary transformation. In particular, the transformation parameter can be either an affine transformation or a geographic transformation (datum shift).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
transform in interface ITransform2D
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException