com.esri.arcgis.controls
Interface ITOCBuddy2

All Superinterfaces:
ITOCBuddy, Serializable
All Known Implementing Classes:
GlobeControl, ITOCBuddy2Proxy

public interface ITOCBuddy2
extends ITOCBuddy, Serializable

Provides access to members that control the TOC buddy.

Description

The ITOCBuddy2 interface provides additional members for tasks related to when the ITOCControl::Buddy is a GlobeControl or a custom control using GlobeLayer objects.

Product Availability

Available with ArcGIS Engine.


Method Summary
 boolean isLayerValid(ILayer pLayer)
          The TOCControl calls this method to ask the buddy if a layer is fully cached and valid if it cannot determine this on its own.
 boolean isLayerVisibleAtScale(ILayer pLayer, double scale)
          The TOCControl calls this method to ask the buddy if a layer is visible at the specified scale.
 void layerVisibilityChanged(IBasicMap pBasicMap, ILayer pLayer, boolean visibility)
          The TOCControl calls this method to instruct the buddy that layer visibility has changed.
 
Methods inherited from interface com.esri.arcgis.controls.ITOCBuddy
getActiveView, getScale
 

Method Detail

layerVisibilityChanged

void layerVisibilityChanged(IBasicMap pBasicMap,
                            ILayer pLayer,
                            boolean visibility)
                            throws IOException,
                                   AutomationException
The TOCControl calls this method to instruct the buddy that layer visibility has changed.

Description

The LayerVisibilityChanged method is called when the visibility of a layer is changed interactively using the TOCControl.

If a layer (typically a raster layer) within a Globe is fully cached the original data source does not need to be present in order for the layer to display. To ensure that the TOCControl changes the visibility of a cached layer the LayerVisibilityChanged method ensures the Globe changes the GlobeLayerProperties.

Product Availability

Available with ArcGIS Engine.

Parameters:
pBasicMap - A reference to a com.esri.arcgis.carto.IBasicMap (in)
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
visibility - The visibility (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLayerValid

boolean isLayerValid(ILayer pLayer)
                     throws IOException,
                            AutomationException
The TOCControl calls this method to ask the buddy if a layer is fully cached and valid if it cannot determine this on its own.

Description

The IsLayerValid method returns whether the specified layer is fullly cached and so valid, even if the connection to the layers data source is broken.

If a layer (typically a raster layer) within a GlobeControl is fully cached the original data source does not need to be present in order for the layer to display. To ensure that the TOCControl does not display this layer as broken (with a red exclamation symbol !), the IsLayerValid method additionally checks if layer is fully cached.

Product Availability

Available with ArcGIS Engine.

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

isLayerVisibleAtScale

boolean isLayerVisibleAtScale(ILayer pLayer,
                              double scale)
                              throws IOException,
                                     AutomationException
The TOCControl calls this method to ask the buddy if a layer is visible at the specified scale.

Description

The IsLayerVisibleAtScale method, called by the TOCControl, returns whether the specified layer is visible at the specified scale.

A layer in a globe has IGlobeLayerProperties::MinimumDistance and IGlobeLayerProperties::MaximumDistance properties. The IsLayerVisibleAtScale method allows the GlobeControl to override the ILayer::MinimumScale and ILayer::MaximumScale properties with the MinimumDistance and MaximumDistance properties to correctly manage the visibility of the layer.

Product Availability

Available with ArcGIS Engine.

Parameters:
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
scale - The scale (in)
Returns:
The visibility
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.