com.esri.arcgis.carto
Class DimensionGraphic

java.lang.Object
  extended by com.esri.arcgis.carto.DimensionGraphic
All Implemented Interfaces:
IDimensionGraphic, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class DimensionGraphic
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDimensionGraphic

The graphic asscoiated with a DimensionFeature.

Description

The DimensionGraphic coclass draws DimensionFeatures.

Remarks

The DimensionGraphic is used for dynamically rendering dimensions using a DimensionStyle and DimensionShape .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
DimensionGraphic()
          Constructs a DimensionGraphic using ArcGIS Engine.
DimensionGraphic(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
DimensionGraphic theDimensionGraphic = (DimensionGraphic) obj;
 
Method Summary
 void draw(int hDC, ITransformation transformation)
          Draws the dimension style.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 double getCustomLength()
          The custom length of the dimension graphic.
 IPoint getDefaultTextPoint()
          The default location of the dimension text placement.
 IDimensionShape getDimensionShape()
          The begin dimension point.
 double getLength()
          The length of the dimension graphic.
 void getMask(int hDC, ITransformation transformation, IGeometry mask)
          The dimension graphic mask.
 ITransformation getNativeTransformation()
          The native transformation for the dimension graphic.
 int getNativeUnits()
          The native units of the dimension graphic.
 IDimensionStyle getStyle()
          The dimension style.
 int hashCode()
          the hashcode for this object
 boolean isUseCustomLength()
          Indicates if a custom length is displayed for the dimsnion graphic.
 void queryBoundary(int hDC, ITransformation transformation, IPolygon boundary)
          The boundary of the dimension style.
 void setCustomLength(double length)
          The custom length of the dimension graphic.
 void setDimensionShapeByRef(IDimensionShape shape)
          The begin dimension point.
 void setNativeTransformationByRef(ITransformation transformation)
          The native transformation for the dimension graphic.
 void setNativeUnits(int units)
          The native units of the dimension graphic.
 void setStyleByRef(IDimensionStyle style)
          The dimension style.
 void setUseCustomLength(boolean length)
          Indicates if a custom length is displayed for the dimsnion graphic.
 void updateShape(int hDC, ITransformation transformation, IFeature pFeature)
          Updates the dimension geometries for the dimension 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

DimensionGraphic

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

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

DimensionGraphic

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

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

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

setDimensionShapeByRef

public void setDimensionShapeByRef(IDimensionShape shape)
                            throws IOException,
                                   AutomationException
The begin dimension point.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDimensionShape

public IDimensionShape getDimensionShape()
                                  throws IOException,
                                         AutomationException
The begin dimension point.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getStyle

public IDimensionStyle getStyle()
                         throws IOException,
                                AutomationException
The dimension style.

Remarks

The Style property sets the DimensionStyle for the DimensionGraphic. The DimensionShape defines the location of the dimension’s measurements and text.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setStyleByRef

public void setStyleByRef(IDimensionStyle style)
                   throws IOException,
                          AutomationException
The dimension style.

Remarks

The Style property sets the DimensionStyle for the DimensionGraphic. The DimensionShape defines the location of the dimension’s measurements and text.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setStyleByRef in interface IDimensionGraphic
Parameters:
style - A reference to a com.esri.arcgis.carto.IDimensionStyle (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

draw

public void draw(int hDC,
                 ITransformation transformation)
          throws IOException,
                 AutomationException
Draws the dimension style.

Remarks

The Draw method draws a dimension on the device context specified by the hDC parameter using the transformation specified in the pTransformation parameter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
draw in interface IDimensionGraphic
Parameters:
hDC - The hDC (A COM typedef) (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.

queryBoundary

public void queryBoundary(int hDC,
                          ITransformation transformation,
                          IPolygon boundary)
                   throws IOException,
                          AutomationException
The boundary of the dimension style.

Remarks

The QueryBoundary method returns the Envelope of the dimension.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryBoundary in interface IDimensionGraphic
Parameters:
hDC - The hDC (A COM typedef) (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
boundary - A reference to a com.esri.arcgis.geometry.IPolygon (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLength

public double getLength()
                 throws IOException,
                        AutomationException
The length of the dimension graphic.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLength in interface IDimensionGraphic
Returns:
The length
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomLength

public double getCustomLength()
                       throws IOException,
                              AutomationException
The custom length of the dimension graphic.

Remarks

The Length property returns the current calculated length for the Dimension. A custom length value can be specified using the CustomLength and UseCustomLength properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCustomLength in interface IDimensionGraphic
Returns:
The length
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCustomLength

public void setCustomLength(double length)
                     throws IOException,
                            AutomationException
The custom length of the dimension graphic.

Remarks

The Length property returns the current calculated length for the Dimension. A custom length value can be specified using the CustomLength and UseCustomLength properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isUseCustomLength

public boolean isUseCustomLength()
                          throws IOException,
                                 AutomationException
Indicates if a custom length is displayed for the dimsnion graphic.

Remarks

The Length property returns the current calculated length for the Dimension. A custom length value can be specified using the CustomLength and UseCustomLength properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isUseCustomLength in interface IDimensionGraphic
Returns:
The length
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUseCustomLength

public void setUseCustomLength(boolean length)
                        throws IOException,
                               AutomationException
Indicates if a custom length is displayed for the dimsnion graphic.

Remarks

The Length property returns the current calculated length for the Dimension. A custom length value can be specified using the CustomLength and UseCustomLength properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMask

public void getMask(int hDC,
                    ITransformation transformation,
                    IGeometry mask)
             throws IOException,
                    AutomationException
The dimension graphic mask.

Remarks

The GetMask method returns the outline polygon of the dimension.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMask in interface IDimensionGraphic
Parameters:
hDC - The hDC (A COM typedef) (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
mask - 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.

updateShape

public void updateShape(int hDC,
                        ITransformation transformation,
                        IFeature pFeature)
                 throws IOException,
                        AutomationException
Updates the dimension geometries for the dimension graphic.

Remarks

If the properties of the DimensionGraphic are changed, it is necessary to call the UpdateShape method to recalculate the dimension. The pFeature parameter of the UpdateShape method is only necessary when the current style is using a text expression.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
updateShape in interface IDimensionGraphic
Parameters:
hDC - The hDC (A COM typedef) (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
pFeature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNativeUnits

public int getNativeUnits()
                   throws IOException,
                          AutomationException
The native units of the dimension graphic.

Remarks

If the current DimensionStyle supports text value conversion, the native units and transformation can be set with the NativeUnits and NativeTransformation properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNativeUnits in interface IDimensionGraphic
Returns:
A com.esri.arcgis.system.esriUnits constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setNativeUnits

public void setNativeUnits(int units)
                    throws IOException,
                           AutomationException
The native units of the dimension graphic.

Remarks

If the current DimensionStyle supports text value conversion, the native units and transformation can be set with the NativeUnits and NativeTransformation properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setNativeUnits in interface IDimensionGraphic
Parameters:
units - A com.esri.arcgis.system.esriUnits constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultTextPoint

public IPoint getDefaultTextPoint()
                           throws IOException,
                                  AutomationException
The default location of the dimension text placement.

Remarks

If the current DimensionShape contains a non-empty TextPoint, the default location for the text is available through the GetDefaultTextPoint method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDefaultTextPoint in interface IDimensionGraphic
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.

getNativeTransformation

public ITransformation getNativeTransformation()
                                        throws IOException,
                                               AutomationException
The native transformation for the dimension graphic.

Remarks

If the current DimensionStyle supports text value conversion, the native units and transformation can be set with the NativeUnits and NativeTransformation properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setNativeTransformationByRef

public void setNativeTransformationByRef(ITransformation transformation)
                                  throws IOException,
                                         AutomationException
The native transformation for the dimension graphic.

Remarks

If the current DimensionStyle supports text value conversion, the native units and transformation can be set with the NativeUnits and NativeTransformation properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setNativeTransformationByRef in interface IDimensionGraphic
Parameters:
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.