com.esri.arcgis.display
Class SimpleLineCallout

java.lang.Object
  extended by com.esri.arcgis.display.SimpleLineCallout
All Implemented Interfaces:
ICallout, IDisplayName, IQueryGeometry, ISimpleLineCallout, ITextBackground, com.esri.arcgis.interop.RemoteObjRef, IClone, IPersist, IPersistStream, IXMLSerialize, Externalizable, Serializable

public class SimpleLineCallout
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISimpleLineCallout, ITextBackground, IQueryGeometry, IPersistStream, IPersist, IClone, IDisplayName, IXMLSerialize, Externalizable

A simple line that links text to a specified location.

Description

The SimpleLineCallout can be used to display a callout comprised of a single leader line drawn from the anchor point to the text.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
SimpleLineCallout()
          Constructs a SimpleLineCallout using ArcGIS Engine.
SimpleLineCallout(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SimpleLineCallout theSimpleLineCallout = (SimpleLineCallout) obj;
 
Method Summary
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 void draw(int hDC, ITransformation transform)
          Draws the text background.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 IPoint getAnchorPoint()
          The anchor point.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 IGeometry getGeometry(int hDC, ITransformation displayTransform, IGeometry drawGeometry)
          Gets the actual geometry of the boundary of the object (which may or may not be a polygon).
 double getLeaderTolerance()
          The closest distance to the text the anchor point can be for the callout to draw.
 IGeometry getLineGeometry()
          The geometry used for the Callout.
 ILineSymbol getLineSymbol()
          The line symbol used for the Callout.
 String getNameString()
          The display name of an object.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 ITextSymbol getTextSymbol()
          The text symbol.
 int hashCode()
          the hashcode for this object
 boolean isAutoSnap()
          Indicates if the auto-snap property is enabled.
 void isDirty()
          isDirty
 boolean isEqual(IClone other)
          Returns TRUE when the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Returns TRUE when the receiver and other are the same object.
 void load(IStream pstm)
          load
 void queryBoundary(int hDC, ITransformation transform, IPolygon boundary)
          Queries for the boundary of the text background.
 void queryEnvelope(int hDC, ITransformation displayTransform, IGeometry drawGeometry, IEnvelope envelope)
          Queries the envelope of the boundary of the object.
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 void setAnchorPoint(IPoint point)
          The anchor point.
 void setAutoSnap(boolean flag)
          Indicates if the auto-snap property is enabled.
 void setLeaderTolerance(double leaderTolerance)
          The closest distance to the text the anchor point can be for the callout to draw.
 void setLineGeometry(IGeometry geometry)
          The geometry used for the Callout.
 void setLineSymbol(ILineSymbol lineSymbol)
          The line symbol used for the Callout.
 void setTextBoxByRef(IEnvelope rhs1)
          The text box.
 void setTextSymbolByRef(ITextSymbol textSym)
          The text symbol.
 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

SimpleLineCallout

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

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

SimpleLineCallout

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

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

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

getLineGeometry

public IGeometry getLineGeometry()
                          throws IOException,
                                 AutomationException
The geometry used for the Callout.

Description

LineGeometry is the geometry that controls the actual shape of the leader. Use the IPolyLine object to create the coordinate spcifications for the leader.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLineGeometry in interface ISimpleLineCallout
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.

setLineGeometry

public void setLineGeometry(IGeometry geometry)
                     throws IOException,
                            AutomationException
The geometry used for the Callout.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setLineGeometry in interface ISimpleLineCallout
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.

getLineSymbol

public ILineSymbol getLineSymbol()
                          throws IOException,
                                 AutomationException
The line symbol used for the Callout.

Description

LineSymbol is the symbol used as the leader line for SimpleLineCallout. Any ILineSymbol object can be used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setLineSymbol

public void setLineSymbol(ILineSymbol lineSymbol)
                   throws IOException,
                          AutomationException
The line symbol used for the Callout.

Description

LineSymbol is the symbol used as the leader line for SimpleLineCallout. Any ILineSymbol object can be used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isAutoSnap

public boolean isAutoSnap()
                   throws IOException,
                          AutomationException
Indicates if the auto-snap property is enabled.

Description

AutoSnap is a boolean indicator that specifies if the leader will be snapped the the closest horizontal and vertical alignment zones of the text. The default AutoSnap is True.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setAutoSnap

public void setAutoSnap(boolean flag)
                 throws IOException,
                        AutomationException
Indicates if the auto-snap property is enabled.

Description

AutoSnap is a boolean indicator that specifies if the leader will be snapped the the closest horizontal and vertical alignment zones of the text. The default AutoSnap is True.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getAnchorPoint

public IPoint getAnchorPoint()
                      throws IOException,
                             AutomationException
The anchor point.

Description

AnchorPoint is the location from which the leader will be drawn to the callout. This is typically the X,Y coordinates of the feature being labeled.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAnchorPoint in interface ICallout
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.

setAnchorPoint

public void setAnchorPoint(IPoint point)
                    throws IOException,
                           AutomationException
The anchor point.

Description

AnchorPoint is the location from which the leader will be drawn to the callout. This is typically the X,Y coordinates of the feature being labeled.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setAnchorPoint in interface ICallout
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.

getLeaderTolerance

public double getLeaderTolerance()
                          throws IOException,
                                 AutomationException
The closest distance to the text the anchor point can be for the callout to draw.

Description

LeaderTolerance is the minimum distance the callout must be from the anchor before a leader is drawn. This distance is specified in points (approx. 1/72 of an inch).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLeaderTolerance in interface ICallout
Returns:
The leaderTolerance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLeaderTolerance

public void setLeaderTolerance(double leaderTolerance)
                        throws IOException,
                               AutomationException
The closest distance to the text the anchor point can be for the callout to draw.

Description

LeaderTolerance is the minimum distance the callout must be from the anchor before a leader is drawn. This distance is specified in points (approx. 1/72 of an inch).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTextSymbol

public ITextSymbol getTextSymbol()
                          throws IOException,
                                 AutomationException
The text symbol.

Description

The TextSymbol of which the Background is a property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setTextSymbolByRef

public void setTextSymbolByRef(ITextSymbol textSym)
                        throws IOException,
                               AutomationException
The text symbol.

Description

The TextSymbol of which the Background is a property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setTextBoxByRef

public void setTextBoxByRef(IEnvelope rhs1)
                     throws IOException,
                            AutomationException
The text box.

Description

The TextBox property is write-only. It is set by a TextSymbol before a call to ITextBackground::Draw or ITextBackground::QueryBoundary. For this reason, the ITextBackground also has a TextSymbol property, which is the TextSymbol of which the Background is a property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryBoundary

public void queryBoundary(int hDC,
                          ITransformation transform,
                          IPolygon boundary)
                   throws IOException,
                          AutomationException
Queries for the boundary of the text background.

Description

Use the QueryBoundary method to find the shape of a callout. This method populates a Polygon with the boundary of the callout. For a LineCallout, this is the minimum bounding rectangle of the leader line and text background box. For a BalloonCallout, this is the shape of the balloon. For a MarkerTextBackground, this is the union of the bounding box of the Marker and the Text.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

draw

public void draw(int hDC,
                 ITransformation transform)
          throws IOException,
                 AutomationException
Draws the text background.

Description

The Draw method is used in a similar way to the ISymbol::Draw method. Note that ISymbol::Draw called on a TextSymbol coclass will also call ITextBackground::Draw, if a Background is set, thus drawing both the background and the text. Note that there is no Geometry required in this method; the location and size of the TextBackground is determined by the TextSymbol.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getGeometry

public IGeometry getGeometry(int hDC,
                             ITransformation displayTransform,
                             IGeometry drawGeometry)
                      throws IOException,
                             AutomationException
Gets the actual geometry of the boundary of the object (which may or may not be a polygon).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getGeometry in interface IQueryGeometry
Parameters:
hDC - The hDC (A COM typedef) (in)
displayTransform - A reference to a com.esri.arcgis.geometry.ITransformation (in)
drawGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (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.

queryEnvelope

public void queryEnvelope(int hDC,
                          ITransformation displayTransform,
                          IGeometry drawGeometry,
                          IEnvelope envelope)
                   throws IOException,
                          AutomationException
Queries the envelope of the boundary of the object.

Description

You must instantiate the Envelope before calling QueryEnvelope. For example,

Dim pEnv as IEnvelope

Set pEnv = New Envelope

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryEnvelope in interface IQueryGeometry
Parameters:
hDC - The hDC (A COM typedef) (in)
displayTransform - A reference to a com.esri.arcgis.geometry.ITransformation (in)
drawGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
envelope - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
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.

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.

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
Returns TRUE when 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
Returns TRUE when 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.

getNameString

public String getNameString()
                     throws IOException,
                            AutomationException
The display name of an object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNameString in interface IDisplayName
Returns:
The displayName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

serialize

public void serialize(IXMLSerializeData data)
               throws IOException,
                      AutomationException
Serializes an object to XML.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deserialize

public void deserialize(IXMLSerializeData data)
                 throws IOException,
                        AutomationException
Deserializes an object from XML.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deserialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (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