com.esri.arcgis.controls
Class ITOCBuddy2Proxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.ITOCBuddyProxy
          extended by com.esri.arcgis.controls.ITOCBuddy2Proxy
All Implemented Interfaces:
ITOCBuddy, ITOCBuddy2, Externalizable, Serializable

public class ITOCBuddy2Proxy
extends ITOCBuddyProxy
implements ITOCBuddy2, 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.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  ITOCBuddy2Proxy()
           
  ITOCBuddy2Proxy(Object obj)
           
protected ITOCBuddy2Proxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 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.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.controls.ITOCBuddyProxy
getActiveView, getScale
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.controls.ITOCBuddy
getActiveView, getScale
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

ITOCBuddy2Proxy

public ITOCBuddy2Proxy()

ITOCBuddy2Proxy

public ITOCBuddy2Proxy(Object obj)
                throws IOException
Throws:
IOException

ITOCBuddy2Proxy

protected ITOCBuddy2Proxy(Object obj,
                          String iid)
                   throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class ITOCBuddyProxy
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class ITOCBuddyProxy
Throws:
IOException

layerVisibilityChanged

public 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.

Specified by:
layerVisibilityChanged in interface ITOCBuddy2
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

public 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.

Specified by:
isLayerValid in interface ITOCBuddy2
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

public 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.

Specified by:
isLayerVisibleAtScale in interface ITOCBuddy2
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.