com.esri.arcgis.carto
Class LabelEnvironment

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

public class LabelEnvironment
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ILabelEnvironment

An object that works with the labeling environment.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
LabelEnvironment()
          Constructs a LabelEnvironment using ArcGIS Engine.
LabelEnvironment(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
LabelEnvironment theLabelEnvironment = (LabelEnvironment) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 ILabelStyle getLabelStyle()
          Label style.
 int getLabelStyleMethod()
          The label style method.
 int getPlacement()
          The label placement method.
 int hashCode()
          the hashcode for this object
 void setLabelStyleByRef(ILabelStyle labelStyle)
          Label style.
 void setLabelStyleMethod(int method)
          The label style method.
 void setPlacement(int placement)
          The label placement method.
 
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

LabelEnvironment

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

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

LabelEnvironment

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

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

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

setLabelStyleMethod

public void setLabelStyleMethod(int method)
                         throws IOException,
                                AutomationException
The label style method. This indicates whether the label style comes from the feature layer or the label environment.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setLabelStyleMethod in interface ILabelEnvironment
Parameters:
method - A com.esri.arcgis.carto.esriLabelEnvLabelStyleMethod constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLabelStyleMethod

public int getLabelStyleMethod()
                        throws IOException,
                               AutomationException
The label style method. This indicates whether the label style comes from the feature layer or the label environment.

Remarks

When the Label tool is used, this property determines whether the label style (which includes label placement properties and a text symbol) is chosen by the user on the Labeling dialog, or comes from the labeling properties of the layer being labeled.

If ILabelEnvironment::Placement is set to esriPlaceWhereClick, then no label placement properties are used, and only the text symbol is taken from either the chosen label style or the layer's labeling properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLabelStyleMethod in interface ILabelEnvironment
Returns:
A com.esri.arcgis.carto.esriLabelEnvLabelStyleMethod constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPlacement

public void setPlacement(int placement)
                  throws IOException,
                         AutomationException
The label placement method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setPlacement in interface ILabelEnvironment
Parameters:
placement - A com.esri.arcgis.carto.esriLabelEnvPlacement constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPlacement

public int getPlacement()
                 throws IOException,
                        AutomationException
The label placement method.

Remarks

When the Label tool is used, this property determines whether new labels are placed where the user clicks, or whether label placement properties are used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPlacement in interface ILabelEnvironment
Returns:
A com.esri.arcgis.carto.esriLabelEnvPlacement constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLabelStyleByRef

public void setLabelStyleByRef(ILabelStyle labelStyle)
                        throws IOException,
                               AutomationException
Label style.

Product Availability

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

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

getLabelStyle

public ILabelStyle getLabelStyle()
                          throws IOException,
                                 AutomationException
Label style.

Remarks

This property is only used if ILabelEnvironment::LabelStyleMethod is set to esriChooseLabelStyle.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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