com.esri.arcgis.carto
Interface ILabelEngineLayerProperties

All Superinterfaces:
Serializable
All Known Implementing Classes:
LabelEngineLayerProperties, MaplexLabelEngineLayerProperties

public interface ILabelEngineLayerProperties
extends Serializable

Provides access to some of the main properties for labeling features.

Superseded By

ILabelEngineLayerProperties2

When To Use

The ILabelEngineLayerProperties interface is the main interface for maintinging the labeling properties of a label class. For example use this interface to specify an Expression and Symbol to label features with.
ILabelEngineLayerProperties::BasicOverposterProperties is not implemented by MaplexLabelEngineLayerProperties. See ILabelEngineLayerProperties2 for methods for generic handling of labeling properties for both label engines.

Example:

// This example assumes a reference to an IGeoFeatureLayer(m_pFLayer)…
// First, get AnnoationLayerPropertiesCollection from Layer   
IAnnotateLayerPropertiesCollection pAnnoLayerPropsColl =       
m_pFLayer.getAnnotationProperties();
// Get the first property set in the collection   
IAnnotateLayerProperties pAnnoLayerProps = null;   
pAnnoLayerProps =        
pAnnoLayerPropsColl.queryItem(0,pAnnoLayerProps,null,null);
 
// Update LabelEngineLayerProperties   
ILabelEngineLayerProperties pLabelEngineLayerProps =        
new ILabelEngineLayerPropertiesProxy(pAnnoLayerProps);

Product Availability

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

See Also:
IAnnotateLayerProperties

Method Summary
 IBasicOverposterLayerProperties getBasicOverposterLayerProperties()
          The overposter properties, which specify how labels are placed relative to features.
 String getExpression()
          The VBScript or JScript expression that evaluates and formats the label.
 IAnnotationExpressionEngine getExpressionParser()
          The object that interprets the expression.
 double getOffset()
          The offset between the label and the feature.
 ITextSymbol getSymbol()
          The text symbol used to draw the label.
 int getSymbolID()
          The ID of the group symbol used to draw the label.
 boolean isExpressionSimple()
          Indicates if the expression is simple.
 void setBasicOverposterLayerPropertiesByRef(IBasicOverposterLayerProperties props)
          The overposter properties, which specify how labels are placed relative to features.
 void setExpression(String expression)
          The VBScript or JScript expression that evaluates and formats the label.
 void setExpressionParserByRef(IAnnotationExpressionEngine engine)
          The object that interprets the expression.
 void setIsExpressionSimple(boolean simpleExpression)
          Indicates if the expression is simple.
 void setOffset(double offset)
          The offset between the label and the feature.
 void setSymbolByRef(ITextSymbol textSymbol)
          The text symbol used to draw the label.
 void setSymbolID(int pSymbolID)
          The ID of the group symbol used to draw the label.
 

Method Detail

setSymbolByRef

void setSymbolByRef(ITextSymbol textSymbol)
                    throws IOException,
                           AutomationException
The text symbol used to draw the label.

Product Availability

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

Parameters:
textSymbol - 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.

getSymbol

ITextSymbol getSymbol()
                      throws IOException,
                             AutomationException
The text symbol used to draw the label.

Description

Symbol is the TextSymbol to be used for labeling.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.

setSymbolID

void setSymbolID(int pSymbolID)
                 throws IOException,
                        AutomationException
The ID of the group symbol used to draw the label.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pSymbolID - The pSymbolID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSymbolID

int getSymbolID()
                throws IOException,
                       AutomationException
The ID of the group symbol used to draw the label.

Description

SymbolID is the ID of the group symbol used for labeling.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The pSymbolID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOffset

void setOffset(double offset)
               throws IOException,
                      AutomationException
The offset between the label and the feature.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
offset - The offset (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOffset

double getOffset()
                 throws IOException,
                        AutomationException
The offset between the label and the feature.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The offset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBasicOverposterLayerPropertiesByRef

void setBasicOverposterLayerPropertiesByRef(IBasicOverposterLayerProperties props)
                                            throws IOException,
                                                   AutomationException
The overposter properties, which specify how labels are placed relative to features.

Product Availability

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

Parameters:
props - A reference to a com.esri.arcgis.carto.IBasicOverposterLayerProperties (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBasicOverposterLayerProperties

IBasicOverposterLayerProperties getBasicOverposterLayerProperties()
                                                                  throws IOException,
                                                                         AutomationException
The overposter properties, which specify how labels are placed relative to features.

Description

BasicOverposterLayerProperties is the placement properties.

Remarks

Use this to specify how labels will be placed relative to features.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.IBasicOverposterLayerProperties
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExpression

void setExpression(String expression)
                   throws IOException,
                          AutomationException
The VBScript or JScript expression that evaluates and formats the label.

Example:

//SIMPLE EXPRESSION 
pLabelEngineLayerProps.setExpressionSimple(true); 
pLabelEngineLayerProps.setExpression("Ucase([Name])”);
 
//ADVANCED EXPRESSION 
pLabelEngineLayerProps.setExpressionSimple(false);
 
//set the .Expression property = the entire function 
codepLabelEngineLayerProps.setExpression("Function FindLabel ([Name],[Area]) if [Area] > 1500 then FindLabel = UCase([Name]) else FindLabel = lcase([Name]) end if end function");

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
expression - The expression (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExpression

String getExpression()
                     throws IOException,
                            AutomationException
The VBScript or JScript expression that evaluates and formats the label.

Description

Expression is the expression that evaluates and formats the label (text). This can be a simple as a single field name enclosed in brackets or as complex as a script written in the language specified by the ExpressionParser. If the expression is a script it must contain a function call FindLabel and the IsExpressionSimple property should be set to FALSE.

Remarks

This can be based on either VBScript or JavaScript.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The expression
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setIsExpressionSimple

void setIsExpressionSimple(boolean simpleExpression)
                           throws IOException,
                                  AutomationException
Indicates if the expression is simple.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
simpleExpression - The simpleExpression (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isExpressionSimple

boolean isExpressionSimple()
                           throws IOException,
                                  AutomationException
Indicates if the expression is simple.

Description

IsExpressionSimple specifies whether or not the expression contains full code or a simple expression.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The simpleExpression
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExpressionParserByRef

void setExpressionParserByRef(IAnnotationExpressionEngine engine)
                              throws IOException,
                                     AutomationException
The object that interprets the expression.

Product Availability

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

Parameters:
engine - A reference to a com.esri.arcgis.carto.IAnnotationExpressionEngine (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExpressionParser

IAnnotationExpressionEngine getExpressionParser()
                                                throws IOException,
                                                       AutomationException
The object that interprets the expression.

Description

ExpressionParser is the parser that interprets the expression.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.IAnnotationExpressionEngine
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.