|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.controls.ITOCControlProxy com.esri.arcgis.controls.ITOCControl2Proxy
public class ITOCControl2Proxy
Provides access to members that control the TOCControl.
The ITOCControl2 interface provides additional members for tasks related to the TOCControl, such as enabling the drag and drop of layers and working with selected items.
Field Summary | |
---|---|
boolean |
noncastable
|
Fields inherited from class com.esri.arcgis.interop.Dispatch |
---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef |
Constructor Summary | |
---|---|
|
ITOCControl2Proxy()
|
|
ITOCControl2Proxy(Object obj)
|
protected |
ITOCControl2Proxy(Object obj,
String iid)
|
Method Summary | |
---|---|
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
void |
getSelectedItem(int[] itemType,
IBasicMap[] basicMap,
ILayer[] layer,
Object[] unk,
Object[] data)
Returns the selected item in the TOCControl. |
boolean |
isEnableLayerDragDrop()
Indicates if layers can be dragged and dropped in the control. |
void |
removeListener(String iidStr,
Object theListener)
|
void |
selectItem(Object unk,
Object data)
Sets the selected item in the TOCControl. |
void |
setEnableLayerDragDrop(boolean newVal)
Indicates if layers can be dragged and dropped in the control. |
Methods inherited from class com.esri.arcgis.controls.ITOCControlProxy |
---|
aboutBox, esri_isEnabled, esri_setEnabled, getActiveView, getAppearance, getBorderStyle, getBuddy, getCustomProperty, getHWnd, getKeyIntercept, getLabelEdit, getLayerVisibilityEdit, getMouseIcon, getMousePointer, getObject, hitTest, setActiveView, setAppearance, setBorderStyle, setBuddyControl, setCustomProperty, setKeyIntercept, setLabelEdit, setLayerVisibilityEdit, setMouseIconByRef, setMousePointer, update |
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.ITOCControl |
---|
aboutBox, esri_isEnabled, esri_setEnabled, getActiveView, getAppearance, getBorderStyle, getBuddy, getCustomProperty, getHWnd, getKeyIntercept, getLabelEdit, getLayerVisibilityEdit, getMouseIcon, getMousePointer, getObject, hitTest, setActiveView, setAppearance, setBorderStyle, setBuddyControl, setCustomProperty, setKeyIntercept, setLabelEdit, setLayerVisibilityEdit, setMouseIconByRef, setMousePointer, update |
Field Detail |
---|
public boolean noncastable
Constructor Detail |
---|
public ITOCControl2Proxy()
public ITOCControl2Proxy(Object obj) throws IOException
IOException
protected ITOCControl2Proxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class ITOCControlProxy
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class ITOCControlProxy
IOException
public boolean isEnableLayerDragDrop() throws IOException, AutomationException
Determines whether layers can be dragged and dropped in the TOCControl. This property if false by default. When EnableLayerDragDrap is true, layers can be dragged and dropped as follows:
By default when dragging and dropping a layer within a map, the layer will be moved within the map to the drop location. To copy the layer, rather than move it press the CTRL key while dragging and dropping.
By default when dragging and dropping a layer between maps, a copy of the layer will be added into the map the layer is dropped into. To move the dragged layer, rather than copy it press the CTRL key while dragging and dropping.
Layers can not be dragged and dropped in the following cases:
isEnableLayerDragDrop
in interface ITOCControl2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEnableLayerDragDrop(boolean newVal) throws IOException, AutomationException
setEnableLayerDragDrop
in interface ITOCControl2
newVal
- The newVal (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSelectedItem(int[] itemType, IBasicMap[] basicMap, ILayer[] layer, Object[] unk, Object[] data) throws IOException, AutomationException
Returns the selected item in the TOCControl. The selected item may have been selected interactively by the end user clicking on the TOCControl or programmatically using the SelectItem method.
ItemType specifies an enumeration indicating the type of item (none, map, layer, heading or legend class).
Map specifies an IMap object.
Layer specifies an ILayer object.
Unk specifies an ILegendGroup object.
Data specifies a long indicating the index of the legend class within the legend group. Use this index in conjunction with the legend group to obtain a particular legend class. An index of -1 refers to the heading if it is present.
getSelectedItem
in interface ITOCControl2
itemType
- A com.esri.arcgis.controls.esriTOCControlItem constant (in/out: use single element array)basicMap
- A reference to a com.esri.arcgis.carto.IBasicMap (in/out: use single element array)layer
- A reference to a com.esri.arcgis.carto.ILayer (in/out: use single element array)unk
- A reference to another Object (IUnknown) (in/out: use single element array)data
- A Variant (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void selectItem(Object unk, Object data) throws IOException, AutomationException
Selects the specified item in the TOCControl. The selected item will appear blue when the TOCControl has keyboard focus and grey when the TOCControl does not have keyboard focus.
Unk specifies an IMap object, and ILayer object or and ILegendGroup object.
Data specifies a long indicating the index of the legend class within the legend group. Use this index in conjunction with the legend group to obtain a particular legend class.
To select an ILegendGroup::Heading either just pass an ILegendGroup object or pass an ILegendGroup object with an index of -1. To select a legend class within the LegendGroup pass an ILegendGroup object with a valid index.
selectItem
in interface ITOCControl2
unk
- A reference to another Object (IUnknown) (in)data
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |