com.esri.arcgis.carto
Class DynamicGlyph

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

public class DynamicGlyph
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDynamicGlyph

Dynamic glyph class. A dynamic glyph is a handle to a resource that is used to render a dynamic symbol.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
DynamicGlyph(Object obj)
          Construct a DynamicGlyph using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 void getAnchor(float[] xAnchor, float[] yAnchor)
          Indicates the origin of the glyph from the the bottom left.
 int getGlyphType()
          Indicates the type of dynamic glyph.
 int hashCode()
          the hashcode for this object
 void queryDimensions(float[] width, float[] height)
          Returns the width and height, in pixels, of the glyph.
 void setAnchor(float xAnchor, float yAnchor)
          Indicates the origin of the glyph from the the bottom left.
 
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

DynamicGlyph

public DynamicGlyph(Object obj)
             throws IOException
Construct a DynamicGlyph using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to DynamicGlyph.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
DynamicGlyph o = (DynamicGlyph)obj; // will not work

DynamicGlyph o = new DynamicGlyph(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems DynamicGlyph theDynamicGlyph = (DynamicGlyph) obj;
Method Detail

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

getGlyphType

public int getGlyphType()
                 throws IOException,
                        AutomationException
Indicates the type of dynamic glyph.

Remarks

Indicates whether the Dynamic Glyph is of type Marker, Text, Line, or Fill.

Product Availability

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

Specified by:
getGlyphType in interface IDynamicGlyph
Returns:
A com.esri.arcgis.display.esriDynamicGlyphType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryDimensions

public void queryDimensions(float[] width,
                            float[] height)
                     throws IOException,
                            AutomationException
Returns the width and height, in pixels, of the glyph. The width of the text glyph will be the width of the space character.

Remarks

Retrieves the Dynamic Glyph’s actual size in pixels.

For Dynamic Text Glyphs, the height is the height of the font, and the width is the width of the space character. Use IDynamicSymbolProperties2.GetTextSize method to get the actual pixel size of a specific string (with a specific Dynamic Text Symbol).

Product Availability

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

Specified by:
queryDimensions in interface IDynamicGlyph
Parameters:
width - The width (in/out: use single element array)
height - The height (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAnchor

public void getAnchor(float[] xAnchor,
                      float[] yAnchor)
               throws IOException,
                      AutomationException
Indicates the origin of the glyph from the the bottom left.

Remarks

The anchor is an offset value, relative to the glyph’s lower left corner, that defines the anchor point (hot point) of the glyph. For example, for a glyph that represents an arrow, use the offset from the lower left glyph to the arrow’s base point as the anchor of the glyph.

The X values grow towards the right, and the Y values grow towards the top.

Product Availability

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

Specified by:
getAnchor in interface IDynamicGlyph
Parameters:
xAnchor - The xAnchor (in/out: use single element array)
yAnchor - The yAnchor (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAnchor

public void setAnchor(float xAnchor,
                      float yAnchor)
               throws IOException,
                      AutomationException
Indicates the origin of the glyph from the the bottom left.

Remarks

The anchor is an offset value, relative to the glyph’s lower left corner, that defines the anchor point (hot point) of the glyph. For example, for a glyph that represents an arrow, use the offset from the lower left glyph to the arrow’s base point as the anchor of the glyph.

The X values grow towards the right, and the Y values grow towards the top.

Product Availability

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

Specified by:
setAnchor in interface IDynamicGlyph
Parameters:
xAnchor - The xAnchor (in)
yAnchor - The yAnchor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.