Making a line callout
Line callouts provide a background for text that can be linked by a line to an anchor point. The symbols used for the leader line, accent bar, and border can be changed to suit the specific needs of the application for the callout. The following code example shows the basic steps for creating the callout:
[Java]
static void lineCallout()throws Exception{
// Create the background fill symbol
IRgbColor backgroundRgbColorCls = new RgbColor();
backgroundRgbColorCls.setRed(255);
ISimpleFillSymbol simpleFillSymbolCls = new SimpleFillSymbol();
simpleFillSymbolCls.setColor(backgroundRgbColorCls);
simpleFillSymbolCls.setStyle(esriSimpleFillStyle.esriSFSSolid);
// Create the line symbol used as the LeaderLine
IRgbColor leaderlineRgbColorCls = new RgbColor();
leaderlineRgbColorCls.setBlue(255);
ISimpleLineSymbol leaderlineSimpleLineSymbolCls = new SimpleLineSymbol();
leaderlineSimpleLineSymbolCls.setColor(leaderlineRgbColorCls);
leaderlineSimpleLineSymbolCls.setWidth(2);
// Create the line symbol used as the AccentBar
IRgbColor accentbarRgbColorCls = new RgbColor();
accentbarRgbColorCls.setGreen(255);
ISimpleLineSymbol accentbarSimpleLineSymbolCls = new SimpleLineSymbol();
accentbarSimpleLineSymbolCls.setColor(accentbarRgbColorCls);
// Create the Callout
ILineCallout lineCalloutCls = new LineCallout();
lineCalloutCls.setStyle(esriLineCalloutStyle.esriLCSFourPoint);
lineCalloutCls.setBorderByRef(simpleFillSymbolCls);
lineCalloutCls.setAccentBarByRef(accentbarSimpleLineSymbolCls);
lineCalloutCls.setLeaderLineByRef(leaderlineSimpleLineSymbolCls);
}
See Also:
How to make a cartographic line symbolHow to make a character marker symbol
How to make a gradient fill symbol
How to make a line fill symbol
How to make a picture marker symbol
How to make different types of colors
Development licensing | Deployment licensing |
---|---|
ArcView | ArcView |
ArcEditor | ArcEditor |
ArcInfo | ArcInfo |
Engine Developer Kit | Engine Runtime |